Failure is Learning

Hello, my name is Amy and I am a former educator on the journey to becoming a programmer. This is my first blog assignment for Flatiron School where I am a Software Engineering student. The main thing I learned in these first few weeks is that I am really good at throwing errors. This was quite frustrating at first, because I was taking it as a personal insult to my ability to code and that attitude was all wrong. At some point my thoughts wandered back to my days teaching Montessori, and more specifically, the trinomial cube. And it became clear that throwing and reading errors is actually making me a better programmer.

The trinomial cube is preparation for algebra and the proof formula of (a+b+c)3. It is hands on material with a control of error so that the child can physically see when it is done correctly and when there is an error. Finding errors is a critical executive function and in a pedagogical world we learn that there are new specific neurons that are ‘error neurons’. From their location on the frontal cortex these neurons respond immediately to errors. As teachers we want to encourage awareness of the alarm without causing such anxiety that a child might give up the effort or overcompensate with fear, creating a pattern of checking and rechecking, but rather feels the joy of the learning process and the pride that comes with mastering a skill.

Trinomial Cube

In coding I need to recognize my errors and self-monitor using the feed-back from those corrections as the building blocks of learning. In other words, error correction is a critical part of the learning process and I need to embrace, rather than fear it. The more errors I throw and fix the more I learn.And there are a lot of tools to help show errors and point in the direction of of solution. Learning to read these errors is similar to learning to assemble the trinomial cube, with practice and one block at a time. Let’s take a look at some of the tools at our disposal. I am currently using the text editor Visual Studio Code and it offers some wonderful visual cues when coding.

For example, in the function below the variable ‘leftNumber’ is declared but its value is never read because it is misspelled in the parseInt. These kinds of visual cues are great when getting stuck.

Similarly, if a word like function is misspelled the color will be different. With a quick glance at the page, it is easy to spot a mistake that has an easy fix.

Chrome’s Developer Tools are another amazing tool in a programmers tool belt. The developers tools offer up a plethora of information, from something as simple as trying to redeclare a const variable:

Or forgetting to close a function:

To pointing to the line in your code that needs attention:

There are many tools at a programmers hands to help them debug and find solutions. I am learning the art of debuting and console.logging more often than not, and to appreciate the beauty of reading errors.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store