A memorable failure.


One of my biggest failures in self teaching happened in November 2017. I was trying to design an algorithm for a tic tac toe game. From searching google, the recommended result was the mini-max algorithm. After spending several hours reading articles and watching explanations on youtube, I thought I was well prepared to write this algorithm from scratch. As I tried to code up a solution, I hit a wall and had no idea how to proceed further. I understood the algorithm in my head but was unable to translate it into code.

After stubbornly spending a whole day trying to write this algorithm from scratch. I went to bed feeling defeated and miserable. The next day, I tried again but ultimately ended up looking at the code and memorizing it. Looking back in retrospect almost 5 years later, I can honestly say that at this time I did not have the proper coding and algorithm-pattern recognition skills to solve this problem. As someone who had only written simple client side code during this time, this task was an exponential jump in difficulty and required coding skills that can’t be developed from simple client side scripting.

How do I know this?

I spent several months last year grinding leetcode and solving 200+ problems. The first step to solving this algorithm would be to categorize it. After the leetcode grind, I know from experience that this is a Depth First Search problem with backtracking. These problems usually involve recursion and some sort of data structure to allow backtracking.

As someone who will be resuming the leetcode grind after the end of this quarter, I keep these experiences in the forefront of my mind. Coding is a skill that can be improved and while you may not have the skill today, you can in the future with effort and dedication.

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *