Teaching My Brother To Code

Published: 2014-12-07

3 min read

I just returned to the US after a few months in Asia, and my goal for the month of December is to teach my brother how to code. One month, that's how much time I have to get him up to speed. Sound crazy? It might be, but that depends on the concrete goal. "Learn to code" is far too abstract.

The Goal

In one month's time I intend to get my brother up to speed with front-end development. But "up to speed" does not mean he will be writing the next front-end framework in just one month. My goal is more along the lines of quickly smashing through the usual barriers people face when they want to learn code. These usually include things like:

  • All sorts of mental barriers ("It's too hard.", "I'm starting too late?", "Where do I start?")
  • Frustration
  • Time constraints. (If you have a full-time job it might be hard to find the time to code.)

When I learned to code those first two points were the biggest barriers to progress. Not knowing where to start is a big hurdle to overcome if you are brand new to coding and don't know anyone in the field. Luckily I do this for a living so I can help my bro get passed that pretty quickly.

Over the next month, I see frustration as the largest obstacle to progress, especially since we're focusing on the front-end.

Moreover, I hope to give him enough knowledge that he can continue comfortably on his own. That is the ultimate goal.

Curriculum

Since we're focusing on the front-end, I'll be teaching the classic front-end technologies:

  • HTML
  • CSS
  • JavaScript

Each have their own challenges.

HTML

HTML is busywork. It's not particularly difficult to understand or implement, the number of tags and attributes are all quite limited and there's no logic to consider. That being said, it's just not interesting. In fact, writing HTML is intensely boring, especially once you know what you're doing. (That's why I moved to Jade 😄.)

CSS

CSS is a terrible language. It was designed for a very different web than we design for today. Styling text is usually simple enough, but when you want to get into any sort of layout styling things can get very frustrating very fast. Want to put something on the right? Just use float: right; and everything will be fine... until your containing div collapses and you have to figure out what "clearfix" means and how to implement it. Or you could just use overflow: hidden;, but that is unintuitive at best and at worst can cause issues with absolutely positioned elements and shadows.

There are a million other ways CSS can frustrate people, since so many of its properties simply don't work the way you expect, or you need to ensure certain display properties to make them work as advertised.

The other issue with CSS in my mind is that like HTML, it's boring. There's more opportunity in CSS to write good code, but it still lacks logic and lacks features that seem wildly obvious (Variables anyone?).

For a partial solution, learn CSS well then never touch it again and only use Stylus.

JavaScript

Finally, the actual programming language of the front-end. I haven't yet started teaching this to my brother, but I'm looking forward to it. Real programming is a thrill once you gain even a tiny amount of knowledge. Being able to create things from scratch that are actually useful is liberating; at least it was for me. By the end of this makeshift bootcamp I hope my brother feels the same way.

Stay tuned

I'll be posting updates as time goes on.


About me

I'm Ian. I'm a software engineer. Here are some things I'm into: javascript, functional programming, simplicity, Mandarin. If you want to chat you can find me on Twitter and GitHub.