Don't Be Afraid

At my most recent code and coffee session my mentor told me, “Don’t be afraid to write some really bad code.” I had been struggling to figure out how to analyze a tic tac toe board in order to determine if a winning combination is present. I was paralyzed because I could not envision a complete solution. Instead of pursuing an ideal algorithm, I chose to write some code that would determine if there is a winning combination in the top row. Then for the second row. Then for the third. Eventually I had written a small method for each of the eight possible places a winning combination could exist. About halfway through writing all of these functions I started to see the beginnings of how I might be able to generalize the solution and create the elegant function I wanted to write in the first place. Had I not started out by writing some really bad code, I would not have reached the end goal. Yet even that solution is but a step towards the final abstracted and scalable goal. My function that checks for a winner only works for a 3x3 board, but does not work for a 4x4, 5x5, or larger; I will get there eventually. Breaking large problems into their smaller component parts continues to prove to be an invaluable pattern.

“Every day that you are not programming is another step away from becoming a journeyman.” -Apprenticeship Patterns, p. 52

Another quote that stuck out to me was, “Don’t be afraid to do something different with your life.” It reminded me of a conversation I had with an investment banker when I was a consulting intern in Germany. We were discussing possible career options and ambitions to go along with them. I had mentioned that it would be cool to take some time off after working and saving for a few years to sail around various parts of the globe. He wasn’t too keen on the idea from a standpoint of career advancement, as “most HR people in big companies don’t like it.” I look to work abroad again one day, and perhaps do some sailing along the way.