Several years ago I discovered Project Euler. A couple of months after that discovery I came up for air and discovered the world had moved on while I was under the Euler spell. I still have a terrible jones for Project Euler but I have learned to Just Say No. Then Mike Zamansky, who I had learned to trust, posted this. Advent of Code my $#@. “Advent of Time Lost” is more appropriate. Or maybe “Advent of There Has Got to Be a Better Way to Code This And I Am Going to Spend an Inordinate Amount of Time Finding It”.
Now I am not a good coder in any language. I teach high school programming and every bit of programming has been learned while teaching high school programming. This does not lead to good technique. But I can beat a problem to death in several languages with almost equal lack of finesse. I look at Advent Day three (I got that far in an hour or so) and think “I can beat this to death with a big matrix of ones and zeros but that lacks finesse. There has got to be a better way.” I have been trying to think of the “better way” solution for about three hours. I have kids to teach, dishes to wash, laundry to fold, dinner to eat, a snow board binding to build a wedge for, a Christmas tree to put up before Christmas, you know, the usual life activities.
I sent this to our business teacher who teaches Programming I (Scratch, Small Basic, and very basic Visual Basic). I thought to share this black hole of time. He wanders in 5 minutes later with a solution for the first day elevator problem. “Count the left brackets, count the right brackets, subtract.” All with the “find” in a text document. So much for my cute little Python program.
I have a feeling the code for these (if it is a code solution and not just counting and subtracting) in each case is going to be trivial. It is the finding of the “best” way to solve the problem that is going to take time. Thank goodness there is no school for a while after tomorrow. I can dedicate many wasted hours to solving the stupid things.
There are evil people lurking across the internet just waiting to entrap the innocents of the post reading world. Mike Zamansky is one of them.