No Tic-Tac-Toe To Show - say that 10 times fast

29 Jul 2020

First, Happy anniversary to my older brother! I think today marks 20 years! Wow! That’s awesome! I remember this wedding day well, and From This Moment in time, there are some moments for which I’d rather there not exist a permanent video record… I’m not going to bother embedding this video in my blog, so don’t ask.

Today I’m frustrated. I worked on euler 10, and i solved the algorithm in maybe 20 to 30 minutes and even practiced good TDD by rewriting the prime factors kata. I do have to admit that I was impressed when I went back to euler 3 and found that I’d just written, functionally, the exact same lines of code to find the factors as those I’d written months ago in euler 3! I guess I attribute this to the tests. In today’s function I better names, and seeing this and the identical code led me to challenge myself further to make today’s function just a little better. I was able to remove one line; not sure if the one i removed counts as all I did was change an if to cond, but it still eliminated a line, and that was cool.

So why I am frustrated? Well, the euler problem wanted me to find the sum of all prime numbers under 2MM. I solved it for 1000, 20,000, 200,000, but when it came to 2MM, i let the thing run for like 15 minutes and still got no output! I went back and solved the whole problem again in a different way trying to eliminate some of the calculations & factoring and still, it took too long. I’m frustrated that I feel like i solved the problem pretty quickly (twice!), and yet the number I need to solve for requires just too much processing. After another 2 hours or so, I finally gave up to come back to it later, but now it was 2:00PM, and so I now only had 3 hours to work on TTT. Argh!

As for that, I actually back tracked today, by starting the ‘play-best-move’ function over from scratch with an empty test and focusing on letting the tests drive the production code. I think this action actually had a lot of value to it as it made things a little cleaner and got me, well, right back to the point I’d been at yesterday without final score output. And so, I still have no TTT to show…