Learning How To Program / You're doing it wrong
Published: 2018-09-02 17:04:28

---
title: Learning How To Program / You're doing it wrong
published: true
description: I care about theory
tags: 
---

Read this with the caveat that it's specific to my experience and interest, and is more an exercise in talking about my process and mindset, rather than something that's necessarily generalizable to a broader base of CS newbies.

In the past month, I've started to become fairly serious about teaching myself Javascript. I did [Lambda School's free intro to JS](https://lambdaschool.com/courses/cs/web/101/) course, started working through [Eloquent Javascript](http://eloquentjavascript.net), am attending free workshops at Hack Reactor, and went to [Node School](https://nodeschool.io/), here in LA.

I've been trying to understand the way that I learn, and to figure out a good path for self-teaching, and I think that people who already understand how to program may not always be the best at understanding what it's like to learn for the first time.

The biggest flaw I've found with various resources (and codecademy is the worst of them at this) is that they tend to think that theory is harder than it is, and less valuable than it is.

I don't mean this in the sense of really formalized theory, but in terms of cosntructing a robust mental model of how a program works, it's absolutely key both to producing individuals who can actually solve problems, and to maintaining interest in learning (at least for me).

When it comes to codecademy, their model of teaching is one of "here's a thing you can do in [insert language here]", and if you type these commands into a file, it will do it for you. Now type these commands into the editor and run it.

I can understand why they thought it was a good idea. Ostensibly, it immediately gives a student both a specific use case and the exact way of accomplishing the task at hand, skipping abstract considerations of structures or concepts that might create a frustrating or boring amount of overhead before a student gets the chance to write code.

Instead, though, it completely fails to provide a paradigm for understanding how and why to write programs. It reduces the coder to a trained monkey that memorizes a task and recites it. I found this frustrating; I felt like I was being kept in the dark, and that everyone else had access to something I was missing- that I could really learn and understand it if only I had a broader view. I could understand what a function did, but not what it was *for*, or how to do it *well*. It's like someone trying to teach you how to write an essay by giving you a list of dictionary definitions. 

Actually, it's worse than that- it's someone handing you a grab bag of words and imagining that they're teaching you how to love literature.

There are a couple ways that I've managed to dig myself out of this self-study purgatory. Starting to work through a book (rather than exercises and tutorials) has helped to situate me in a broader context for learning, as well as develop a mindset that lets me sit in a coffee shop for two hours, read a technical book, write code, and google for the things I don't understand.

The other strategy that's worked well (at least the one time I've tried it) has been going to meetups and taking classes. In these types of spaces, I'm able to formulate and test my mental models by simply asking the right questions. As I continue to level up and refine my skills, I'll have to fill in more of this context by reading documentation and working through problems myself, but here, at the beginning, it's often trivial for experienced developers to provide me with a key piece of information that might be taken for granted by an author or the creator of a tutorial.

TL;DR:  
* Syntax isn't more useful or interesting than theory.  
* You can't handwave context when a program's behavior is determined by the context in which it is run.
* Many of the learning resources available don't understand what's interesting or useful about computer science to a newbie, and are totally unconcerned with the long-term growth of the learner.

The (or at least one) solution is to actually do the foundational, scaffolding work, and to build out a mindset that is able to effectively handle the specificity and consistency intrinsic to programming.