Skip to content

Instantly share code, notes, and snippets.

@dillonforrest
Last active October 6, 2015 01:06
Show Gist options
  • Save dillonforrest/d4d3bdc0e050812ee0b0 to your computer and use it in GitHub Desktop.
Save dillonforrest/d4d3bdc0e050812ee0b0 to your computer and use it in GitHub Desktop.
prewriting for a post

What is this?

A concise and tactical guide to learn to code.

Rationale

Learning to code is hard. Many people are trying to learn to code, and many of them are frustrated with their progress not matching their expectations. Developer bootcamps have emerged to monetize this frustration.

Who is this for?

People who are:

  1. Still beginner programmers
  2. Short on time
  3. Frustrated with the process of learning to code

Describe the problem: why is learning to code so hard?

You don't know what you don't know

Writing substantial code requires more knowledge and practice than most beginners realize.

Let's say learning to code is like climbing a hill. Beginners start at the bottom. You can see the top of the hill, and you want to climb up the hill, in a straight line, up to the top.

Learning to code requires conquering unforeseen obstacles every footstep along the way. The path up the hill becomes less straight and predictable as it looked when you were standing at the bottom of the hill.

The core problem of learning to code is that you don't know what you don't know. You can't see all your obstacles from the bottom of the hill, and the path becomes much longer and more difficult than it initially looked.

The vocabular chicken-and-egg problem

Unfortunately, you can't just learn how to write Ruby or Python or JavaScript syntax and then suddenly know how to code. In addition to your first programming language, you have to learn the language of programming, of computers, and of the internet.

There is a chicken-and-egg problem when it comes to the vocabulary of code. You need to know the vocabulary to understand fundamental concepts, but you need to understand fundamental concepts to understand vocabulary.

Beginners will see an inflexion point in their progress once they understand the technical jargon.

Beginners want to build apps, not become great programmers

The typical beginner wants to build web or mobile apps. Definitely not all beginners, but I'd say the majority do. Building apps is different from computer science. Unfortunately, most programmers advise beginner programmers on becoming better computer scientists, not better app builders.

For many beginners, learning to code is a means to an end. The end goal is not code. It's building apps. Most people advising beginners fail to realize this.

Just-In-Time learning is more effective than Just-In-Case learning

Just-In-Time learning is when you acquire knowledge to apply that knowledge immediately. Just-In-Case learning is when you acquire knowledge without any tangible, pressing need for it. Most of us were educated in a Just-In-Case manner for many years of our lives. However, Just-In-Time learning is a much faster way of learning than Just-In-Case.

Beginners struggle to learn because there's usually no tangible, pressing need for programming knowledge, so all their self-study reduces to Just-In-Case learning.

Programming tools are not beginner-friendly

Text editors feel clunky and unproductive for beginners. Text editors usually require customization and learning before they're helpful, which makes them even less beginner-friendly.

Worse is the terminal.

Nobody likes the terminal when they start using it.

  • Jason Laster

Sadly, there's no getting away from the terminal. You're stuck with it.

Enumerate solutions: what can I do to learn to code?

Start reading about code and talking to programmers

The main objective for a beginner is to break the vocabulary chicken-and-egg problem. I think the best way to do this is immersing yourself into the language of programming by reading it and by speaking it.

Learn to use search engines

When you start breaking the vocabulary chicken-and-egg problem and you start grokking the technical jargon, you'll know what search terms to google. Using search engines is a primary Just-In-Time learning tactic.

99.99% of programming problems you'll experience were already solved publicly on the internet. You can find their solutions for free.

As you google more, you'll start recognizing specific websites as reliable sources, which will help you find your answers faster.

Learn to debug

When you're writing code, most of your time is spent fixing code rather than actually writing new code. You must learn to debug broken code. Not a single beginner ever realized how much time would be spent debugging.

The first way people learn to debug is usually with print statements. Print debugging is the most basic form of debugging.

Debuggers are an alternate method, a tool specifically for debugging. If you have access to a debugger, use it! Even as you get comfortable with print debugging, a debugger will always find ways to be useful for you.

The lessons you learn from debugging are also Just-In-Time lessons. As you improve at debugging, you'll learn more and more.

Try pair programming

Pair programming is when two programmers work together on the same computer. Pair programming can be a tremendous way to learn to code if you happen to match with your partner.

Some programmers are better at pairing than others. I'm not entirely sure what makes the difference, but I think it's communication and empathy.

I encourage you try pair programming with an experienced friend. If you learn a lot with them, great! Try pairing with them more. Bribe them with food if you want. If you're not learning with them, or if they make you feel uncomfortable with your inexperience, stop. Don't take it personally. It just means that your friend is bad at pairing, not that you're bad at learning.

Get some beginner programming books

The most helpful books will:

  • be written primarly for beginners
  • be about a topic that the beginner is particularly excited about
  • have great reviews

Books are great for speeding up your learning because they are targeted towards both your interest and skill level.

@chadhs
Copy link

chadhs commented Sep 4, 2015

I general I like the idea of this essay existing as I feel like I've not exited this beginner stage myself.

  • I'm digging the discussion on syntax vs semantics
  • on the chicken and egg thing… i've found comp sci material to start slow and then sort of get impatient and the difficulty rate of change increases greatly. I believe this is due to concepts and terms not making a lick of sense until you know them and then you take them for granted more and more as you move away from beginner. newbie's eyes glaze over when you say things like "idiomatic to python" or when you don't understand why their brain seems to seize the first time they have to deal with a for loop within another for loop.
  • JIT vs JIC i'm in favor of JIT as I'm impatient and have to apply a lot of will to maintain disciple. I do see value in optimizing for the long term as well… but that probably is separate from JIC? JIC == learning the whole python standard library inside and out vs just some basics and get going?
  • I'm probably a bad person to ask about text editors and the terminal. Being a nix admin for so long I get cranky about people not learning the basics of standard in, standard out, redirection etc (Unix 101 stuff). I also get preachy about modality and lot leaving home row (vim) lol. ← a lot of that is in jest, sorta… JIT ftw probably in this realm too.
    PS this is *the
    best Unix/Linux primer I've ever seen: http://www.ee.surrey.ac.uk/Teaching/Unix/ (i tell people tutorial 7 is optional)
  • 👍 on the advice around searching, debugging (print statements ftw), and talking to other programmers. I'd often fear pairing sessions with Rodrigo or Leif at iDoneThis, but they were always more interested in helping me think through things than demonizing my approach to something. :-)
  • interesting comments on DSL vs general purpose, i usually think of DSLs as this config tool's syntax is a DSL made in ruby. SQL, CSS, HTML, etc; wow didn't think of it that way. Nice!
  • Blogging. I'm super anxious to hear more on this. Isn't one of the selling points, if you blog on what you learn you're both "giving back" so others searching can learn from your challenges, and you're showing potential employers that you really do know some things / care about your craft?

All in all, great thoughts thus far Broseph (@dillonforrest) . ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment