Tips for beginner programmers

June 20, 2016

“When I write, I feel like an armless, legless man with a crayon in his mouth.”
— Kurt Vonnegut

If you’re starting to program, you might feel like that man. It’s hard to wrap your head around a complex new world filled with intricacies, best practices, and alien-looking examples.

As a self-taught developer who’s worked in the industry for several years, these are some of the things I wish someone had told me when I was just starting out.

Being on fire (and recursion)

For how many times my teachers told me to “stop, drop, and roll” as a kid, I thought I’d be on fire more times in my life.

It’s the same thing with programming terms like recursion — I thought it was going to be much more common than it is in practice.

If you’re just starting out, learn the very basics: variables, comments, functions, and so on. Tackle the harder concepts once you have a need for them. It’s much easier to learn something when you understand why you need to use it.

Lean into motivation

After you learn the basics, try building something you’re curious about. Maybe it’s a small Chrome extension or a text adventure. You’ll learn faster and stay more motivated when you’re interested in the finished product.

When I was starting out, I tried my hand at everything from WordPress plugins to Zelda-like dungeon generators. Each project helped me build on my previous knowledge.

Search for everything

When you’re learning to code, you’ll spend the majority of your time browsing the web for answers to your questions. Everyone has to do this – even Larry Page. (He founded Google.)

You’re not supposed to memorize everything!

Choose your favorite approach

In software, problems can be solved in many different ways. There’s usually not a single “right way” to do something. There are many.

Frustration and anger

If you get frustrated, take a deep breath and keep working.

But if you get angry, take a break.

The silence between the notes creates the music

To find a solution to a hard problem, you often need to step away and gain perspective. Your best ideas will come at weird times — in the shower, or during a walk, or right after you wake up. And they’ll seem like common sense: How did I not think of that?!

Take care of your mind

Carpenters use their hands; programmers use their minds. If a carpenter’s hands were broken, they couldn’t do their job; likewise, if a programmer’s mind isn’t functioning well, they won’t be able to do their work.

What this means: give yourself time to relax. Make sure you’re getting enough sleep. Reduce stress where possible. Make sure you’re in an environment where you can focus.

Use paper

Have a pencil and paper right next to you. When you encounter a problem, try drawing it out before you tackle it with code. My college roommate was a computer science major and kept a miniature whiteboard at his desk; Notch, the creator of Minecraft, uses grid paper. I use a sketchbook.

It’s amazing how much this simple tool can help.

Even your best efforts will sometimes be messy

I once heard that even the greatest developers can feel like their projects are held together with chewing gum and coat hangers.

Basically, all of your solutions might not be as elegant as you’d like.

Comment to understand

In the beginning, you probably won’t be able to get through 5 lines of code without a comment. Mark up the code – every line if you need to – with clear comments in plain English. Walk yourself through the code, line by line, to understand what it’s doing. Sometimes it helps to say what it’s doing out loud.

Languages aren’t what you think

If you’re just starting out, don’t worry too much about which language you choose. Once you learn one, you can learn others much faster.

The learning curve for a programming language is less like a spoken language and more like a video game: if you’re a magic user on your first playthrough and an archer on your second, the core gameplay will still be the same. Or with music: if you learn the piano, you’ll have a much easier time learning the xylophone.

Just pick something that looks readable so you can understand the core concepts. For the record, here’s what some popular languages look like:

// JavaScript

function hello(name) {
  console.log(`Hello ${name}!`);

# Ruby

def hello name
  puts "Hello #{name}!"

hello "Mark"
# Python

def hello(name):
  print("Hello " + name + "!")


Feeling stupid

It might seem like everyone is really smart except for you. You might beat yourself up for not understanding “supposedly simple” concepts instantly. The secret is that most people feel this way. They just don’t talk about it a lot, because really, who would want to hear that?

There’s no gatekeeper

In Harry Potter, there’s a magical hat called the Sorting Hat. It sorts new students into houses by their personalities — brave students are sorted into Gryffindor, cunning students into Slytherin, and so on. But if a student has a burning desire to be in a certain house, the Sorting Hat will grant them entry into that one instead.

Programming is one of those kind of things: if you want to learn it, you’ll be able to. You don’t need to be a genius. And, while a computer science education can help, it’s not absolutely necessary. (I’m proof, as are some of the best programmers I know.)

You just need curiosity (which you already have if you’re reading this post) and the ability to sit down and type some words.

And if you need someone to believe in you, I do.