CODING TODDLER

25 Apr 2024

Block Games

Design patterns are basically the block games that you played when you were just a young lad learning motor skills. The clueless baby will spend hours pondering and drooling wondering how to put a triangle block inside of a circle hole. Eventually a solution is found and that child will learn from that experience and usually try to apply what motor skills they learned to other toys that they may receive. This is similar to the way that design patterns are formed. When faced with a problem, many different attempts and approaches were employed until the most efficient or universally accepted one emerged. These design patterns are important foundations to problem solving since there really is no need to reinvent the wheel. Additionally, being able to be on the same page as your peers who also happen to know about them will speed up the process in which solutions to problems can be made.

Bop It is a Hard Game

To be completely honest I didn’t know what design patterns were until very recently. But looking back at all of the code that I have made, it is clear that I was implementing these ideas without really knowing what exactly they were. For example, when I coded a Tic-Tac-Toe game in Java, I implemented a GUI with buttons, labels, and listeners. I had thought that using a GUI would be much more interactive with the user and would provide a better experience with different colors. This was me implementing the MVC design pattern. In conjunction with that, the use of ActionListeners to the buttons was an implementation of the observers design pattern. Not being able to know how to implement ActionListeners would honestly just defeat the whole purpose of having buttons in general. Imagine getting the game Bop it but not having the motor skills to be able to Twist it. To a complete beginner in the game of life (a literal child), Bop It would be a pretty hard game. Similarly implementing a GUI with buttons without knowing how to implement event listeners would be nearly impossible.

It’s me, I’m the Coding Toddler

After dipping my toes in 3 different languages (Java, JavaScript, C), I can say now without a doubt that I can probably learn how to iterate through an array in all those languages. I’m no different than my son who can press down a toy in order for it to make a sound or spin. However, when I gave him tangible food for the first time, he did not know that it was for him to put in his mouth. Instead, he did what he does best, mushing an hour of my hard work all over the floor and table. This is me coding. If there was no google to help me, I would probably make a 3 layered for loop to solve all the problems that I will ever run into.