How to Form a Mental Model For Programming, From the Desk of Tedi Konda

By

Tedi Conda Image

I’m a nerd. I have been taking apart, assembling, and programming machines since I was in the single digits. Being exposed to computers at an early age, I have a strong grasp on the way they think (sometimes even stronger than I do with humans). However, those of you who haven’t spent the majority of your lives speaking to machines may experience some frustrating challenges in your attempts to communicate.

Let’s face it, machines are dumb (for now), and we have to bring ourselves down to their level to have a successful conversation. I do, however, think there are some valuable lessons to be gained when learning to speak a technical language, even if your end goal is not to become a technical linguist (programmer).

As humans our brains have the wonderful ability to adapt and learn new material primarily by association. We break up information into small chunks and associate each chunk with a certain trigger. Our memory is inherently poor, so using this chunking mechanism, whether consciously or subconsciously, is a very powerful tool. Learning by association is not a new concept. We have been using analogies and metaphors for centuries.

Those associations become more difficult when learning programming concepts; this is because writing code is an intangible byproduct of talking to a dumb machine. Our brains are genetically trained to make physical associations, so solving impalpable problems that have no physical equivalence can be challenging for an experienced practitioner, let alone a newcomer.

An excellent example, that admittedly blew my mind, is a solution to programming the ghosts who chase you around in the classic video game Pac-Man. This old school favorite has been designed and programmed hundreds, if not thousands of times. The way programmers generally approach the ghost artificial intelligence is with hundreds and thousands of lines of code giving the ghost every possible conditional response to the PacMan’s location.

Our brains are trained to deal with physical rules, so programmers tell the ghosts to turn right if the PacMan turns right. Switch direction if the PacMan switches direction, and so on. What we most likely will not take into account is that machines don’t need to play by our rules. The ingenious solution that was mentioned to me a few years ago is a much simpler one. Instead of injecting all of this artificial intelligence into the ghost, why not target the PacMan and give it a scent. The closer you are, the heavier the scent, so all the ghosts will have to do is get to the point where the scent is strongest.

As a teacher and a programmer I can show you fancy concepts all day long, but without forming your mental model for what’s possible, you will always be bound to use the tools I give you and be limited to the constraints of only what you already know. What makes a great teacher and leader is not only someone who preaches jargon and rules, but someone who teaches their audience how to think in a way that will allow them to continue making those associations long after the teaching period is over.

We are in an era of abundant information, where we can pull up the definition for any concept imaginable. I urge everyone, teacher or student, to acquire and teach the ability to build the mental models before absorbing the information that’s available in abundance. Teaching and learning new mental models will not only make you a better practitioner in the desired craft, but also expand your mind so that your tool belt of available associations can be applied to all new and old concepts.

Meet Tedi

Tedi has been involved in building products for the web since the late 90’s. He is a software engineer by trade, but has played a variety of roles in the industry ranging from research and experience design to full stack development and data analysis. He has worked with companies such as Cisco, Gannett, Politico, Ogilvy, sweetgreen, Smithsonian, DC Council, USAID, Bozzuto, and Micros. Tedi is currently the technical director at Unison where he plays a leadership and hands on role in the engineering and user experience practices.

Want to Contribute to GA Blog?

Every newsletter we will have an Instructor write their thoughts and experience teaching at GA. If you’d like to be a guest blogger, please contact Talisha@ga.co or Charmaine@ga.co.