Learn to code the hard way

code_the_hard_way.jpg

One of the biggest challenges of learning a new language is knowing and remembering the grammatical rules for constructing your sentences. Take it from me, a guy who really struggled to understand the syntax of French—the first time as a high school student, and the second time as a working professional who was obligated to learn it as a company requirement. I was convinced French wasn’t for me. There were some things that I thought my brain was just not wired for, and French happened to be one of them. 

But this blog post is not to tell you about my woes in learning how to read, write or speak French. I want to tell you about something that is quite similar, but yet still very different. Let’s talk about how to read and write code. 

So, I teach a course in web design at West Virginia University, and our approach at the department has been to teach our graphic design students how to build fully-functional websites by learning the basic building blocks of code (the ABC of code) so that they can write statements that tell the web browser to do something. Sounds really simple right? Well, for the most part it is. But the truth is that learning how to code by hand is like learning a new language. Indeed, it is a new language; it is the language of the web, known as HTML and CSS. Our students do not use WYSIWYG editors like Dreamweaver, but rather code editors like TextWrangler and Sublime Text. The absence of the visual interface (I use the term loosely) demands that students have an understanding of the language so that the endless lines of roman alphabets and symbols can make something magically appear in the browser. Staring at code for long hours can be very interesting when you know exactly what you’re doing, but it can get really frustrating for beginners, especially when they face issues with their design and don’t know which part of the code is breaking it. 

My students have been doing pretty well so far. They’ve barely had 50 hours of class sessions, but most of them know the basics of how to read and write HTML and CSS. Their fingers are growing calluses from the continuous hacking on their keyboards, and their browser refresh buttons have been burning with incessant clicks to preview their designs. Given their impressive performance so far, I decided to make things a bit harder for them. Last week, I walked into class and asked them to write a valid HTML page on a piece of paper. The look on their faces was priceless. You should understand that asking designers to write the code for a valid webpage on paper is like telling Johann Sebastian Bach to write the music notes of one of his signature pieces with a needle and thread. The results were quite interesting. Only 13% of my students were able to write a valid HTML web page. Not like the others didn’t try, but there were errors in their code which would have prevented the site from validating. 

Honestly, the results weren’t that shocking to me. I knew that a 50-hour experience with coding wasn’t sufficient to make students really fluent in HTML and CSS. Especially when they had so many other assignments to attend to. But, the question is, if they can whip up a valid HTML page on the computer, why can’t they do it on paper? The clue to that may lie in the same reason why some pundits criticize search engines and word processors for limiting our ability to use our brain. When we work on computers, something woefully horrible happens to us: we get sucked into a mode of utter dependency on a series of microchips that claim the ability to know and do it all. In a sense, that is how computers have been marketed to us, and maybe it is true. Maybe computers are really becoming geniuses. Or, maybe we have willingly given away our autonomy in design to a bunch of microchips. 

Whatever the case may be, the exercise did teach my students a lot. I’m no psychologist and I have no proof for this theory yet, but I think the motor skills we utilize when writing translates more effectively into our human cognition than when we type on a keyboard. I have experienced it myself, I tend to remember things more when I write them down. It’s like literally inscribing the words onto my brain. My students admitted to me that after the exercise, they were certain they’ll remember the syntax much more easily the next time. 

Learning to code with a pencil and paper may seem a bit retrogressive, but I think it’s a good way to prepare our web designers to maintain autonomy when they’re coding on their computers. It's about gaining mastery of the syntax so you can construct meaningful statements, just as you would do if you were learning French, which by the way, I still struggle with. Help needed!

blog comments powered by Disqus