Show newer

@billstclair Well, that is the choices + or ....
Or with layer. Probably ultimately 6 of 1...

... sell me.

I have started to do a bit more and lisp like language things. This just generally pushes me into the world (just feels wrong doing lisp stuff in Vim). But if I am going to gear up and retool Emacs to use, maybe it is time to reconsider Spacemacs.

I am open minded enough to consider facts in making a decision. :)

Just to clean it up a little, and add some more entertainment.

Okay, here's one with a story :) Let's see if this is entertaining enough :D

Here is a problem that involves being jerk.

You receive a parking ticket and decide to pay in the least
convient way possible... change. This decision comes to mind
because the tickets are in strange amounts because they use
the cents portion for some kind of internal encoding.

You decide to pay all in pennies but when you start to collect
them someone informs you that although change will be accepted,
if the counts of coins exceed the quantities required for a wrapper
then you must roll them. You also figure out that collecting all
these coins is a bit of a nuisance for you. So your goal is to
reduce the overall number of coin rolls while maximizing the
number of free (or unrolled individual coins).

US Coinage count to a roll
0.01 = 50
0.05 = 40
0.10 = 50
0.25 = 40
0.50 = 20
$1.00 = 25 (small) or 20 (large)

Question 1.
How many rolls and free coins of each can you provide to pay your
$100.37 ticket in order to use the highest count of unrolled coins
while using the least number of rolled coins?

Considering that a ticket can cost anywhere from $1.00 to $250.00.
You start telling everyone else about your plan and they decide to
play too, so you calculate how they should pay as well.

To make things a little more interesting, you show up at a city council
meeting and propose that because of the time involved in processing
unrolled coinage that the parking authority should, rather than
bother with unrolled coins, all unrolled coins they collect should
just be donated to the city coucil's general fund. They pass this
unanimously.

For example, 45 pennies 21 nickles for a $1.00 ticket might be
pretty obnoxious :).

Question 2. Which fine amount (in that range) would allow you to
provide the highest number of unrolled coins?

Question 3. The parking authority figures out what you are doing
and decides to change things up by hiring you. Your job is to
determine the best fine values to get paid in the least amount of
unrolled coins. What are those amounts what are those amounts (still
within that range of $1.00 to $250.00)

Show thread

@khird Yes we still have the Ike's (Eisenhower 38.1 mm dollars) Huge wonderful pieces of clad coinage. :) But we also have Susan B. Anthony "Carter Quarters", Sacagawea "Golden Dollars" and Newer native american and presidential head dollars, all in the 26 mm variation. All of them are much less interesting than the Ike, but they work for change in stamp machines at the post office. Most Americans, don't like dollar coins. But I digress.

The 38mm ones are 20 to a roll and the 26mm ones are 25 to a roll, and can't be mixed together in a roll.

Okay, here's one with a story :) Let's see if this is entertaining enough :D

Here is a problem that involves being jerk.

You receive a parking ticket and decide to pay in the least
convient way possible... change. This decision comes to mind
because the tickets are in strange amounts because they use
the cents portion for some kind of internal encoding.

You decide to pay all in pennies but when you start to collect
them someone informs you that although change will be accepted,
if the counts of coins exceed the quantities required for a wrapper
then you must roll them.

US Coinage count to a roll
0.01 = 50
0.05 = 40
0.10 = 50
0.25 = 40
0.50 = 20
$1.00 = 25 (small) or 20 (large)

Question 1.
How many rolls and free coins of each can you provide to pay your
$100.37 ticket in order to use the highest count of unrolled coins?

Considering that a ticket can cost anywhere from $1.00 to $250.00.
You start telling everyone else about your plan and they decide to
play too, so you calculate how they should pay as well.

For example, 45 pennies 21 nickles for a $1.00 ticket might be
pretty obnoxious :).

Question 2. Which fine amount (in that range) would allow you to
provide the highest number of unrolled coins?

Question 3. The parking authority figures out what you are doing
and decides to change things up by hiring you. Your job is to
determine the best fine values to get paid in the least amount of
unrolled coins. What are those amounts what are those amounts (still
within that range of $1.00 to $250.00)

@namark what? REPL.it? bummer, it even works on my phone.. :(

@namark well thanks for the snark, I figured an easy one would gauge if anyone was even able to handle TDD, the string calculator is being fun at present

@namark I am doing that other one on REPL.it right now if you care to come join me :)
repl.it/join/evjnthdk-reasintp

Here is a link to REPL.it Where it has been done via TDD 

@namark @freemo @Lossberg

I think we are in agreement. Maybe it is not as cool as I believe, I am used to my wife rolling her eyes when I get excited about stuff like this... :)

@namark @freemo @Lossberg

I am not saying that you shouldn't solve the problem that way. That is as legitimate solution as any. And as a solution that comes from just diving in and doing it that is what I would expect. But it is not what I would expect from doing the TDD technique.

@Lossberg @namark @freemo good reason to have tests reviewed as well as code. Maybe a reviewer can find a case you haven't done to test some aspect of the specification.

Here is a link to REPL.it Where it has been done via TDD 

@namark @freemo @Lossberg

Short of walking you through it, here is one instance where it was walked through. You can see the the unit tests that were used, unfortunately, there is not a really good way to see each of the coding steps and refactorings. I think I will have to do a Git solution that does a commit on each phase-step.

There are a couple commented solutions that are further ideas I wanted to keep.

repl.it/@reasintper/One-Kata-a

@freemo @namark @Lossberg No matter. Not all problems are for everyone. Do the ones you like, ignore the ones you don't.

@freemo @namark @Lossberg

@freemo, I assumed that you would consider this as uninteresting as problems that require brute force. I am disappointed that you are not willing to give it a shot. But i didn't really expect you to find much interest in it in the first place.

@namark @freemo @Lossberg

Those are the types of assumtions one arrives at when not using TDD :)

Show older
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.