Should you really be using Enumerable.Range() and other LINQ stuff when a simple FOR loop will do. No, no you should not. It is silly and makes your code harder to read. The only reason you would do that is[…]↓ Read the rest of this entry…
100 Days of Code 2025
Todays exercise was Resistor Color Trio. Same as before except the third does a 10^n scaling factor so we can have kilo/mega/giga ohms. For the rails API backend and the modified front end from the Django book. It looks like[…]↓ Read the rest of this entry…
With today’s exercise the number of exercises I have done in the C# track now matches the count in the Python track. There are less exercises in the Python track so that track is at the half way mark. The[…]↓ Read the rest of this entry…
Today’s exercise was the Difference of Squares – the sum of numbers between 1 and max squared minus the sum of each number squared between 1 and the max. The tricky part was they wanted you to use LINQ as[…]↓ Read the rest of this entry…
My code for today’s exercise Meetup (schedule a meetup based on week of month and day of week) wasn’t particularly great. I probably could have figured out which day with some modulus arithmetic but I just iterated over the seven[…]↓ Read the rest of this entry…
Today’s exercise was to compute a scrabble score. I put the different letter values in a Dictionary, someone else used a switch case. Mine was easier to map into a LINQ query but the switch/case is probably better overall. Four[…]↓ Read the rest of this entry…
Todays exercise was to validate a phone number for correctness and return the number as digits only. This is a perfect place to use a regular expression. Years ago I would have been too timid to use them. I probably[…]↓ Read the rest of this entry…
Today’s exercise was the Collatz Conjecture. I remember the Coding Train doing a cool video on this. It has a nice visualization. I decided to also do my own visualization using python and turtle graphics (plus a Perlin Noise background[…]↓ Read the rest of this entry…
Today’s exercise was Perfect Numbers. If the sum of the factors of a number is equal to the number it is perfect. Less than and Greater than are either deficient or abundant. I have been promising myself I would make[…]↓ Read the rest of this entry…
Another secret requirement in the exercise Grains. I am supposed to throw an ArgumentOutOfRange if the value passed in is not between 1 and 64. Maybe put that in the problem description. I shouldn’t stumble across it in the tests[…]↓ Read the rest of this entry…






