Teaching My Younger Self to Program: A case study of how I’d pass on my skill at self-learning

Link post

When I was 21 I wanted to become a video game programmer.

Except I didn’t know how to program.

I tried to teach myself and failed. Then I went back to school and learned the basics of Java in a week, aced the course in two months, and earned a cum laude MSc in Computer Science three years later.

I’m 38 now and can teach myself nearly everything.

By “nearly everything” I mean that if I want to learn a thing, I will achieve this if the knowledge is out there and it is within my intellectual ability. The presence of a teacher or a curriculum has become unnecessary — It used to be crucial.

I wish I could share the skill I developed with everybody, but the more I think about it, the more I have no clue what I actually learned to do.

So instead, I want to try an exercise: I’m going to pretend I’m teaching my younger self to program — that younger self of 21 who got stuck and gave up and went back to school instead.

So what did she do?

At 21 I was a video game tester and later a manager of testers. My job was easy. I craved a challenge. Programming seemed like a great challenge.

I had never programmed before. I knew boys in my high school would code Asteroids into their graphical calculators. My father was a high school math teacher. He’d confiscate those calculators, remove the games, and give the calculators back.

Then he’d give me all the best games he’d collected.

I played them, but I never made them. Cause that just seemed boring.

Then my first crush in college was studying computer science. We played video games together. I was good at math and logic. He loved teaching. He was excited to show me his code and teach me how to make a text adventure game. He showed me how to write ‘Hello World’. And again, I was thoroughly bored and suggested we get back to playing video games.

So why become a game programmer then?

Cause I like hard things. I like to get a headache when I study. I like to figure out if I can do it.

Well, dear reader, I couldn’t fucking do it.

What I tried is this:

  • W3 Schools tutorial on HTML—yay, this is easy! Why am I doing this? There are no interesting games in HTML![1]

  • W3 Schools tutorial on Javascript—I hate how everything looks! I don’t actually want to learn this. No game I like is written in Javascript!

  • Various books on video game programming for C# - YES. This is the thing. Oh look a bug. I’m stuck. I’ve stared at this bug for three hours now. I don’t know how to fix it!

  • UNREAL ENGINE. UNITY. HELL YEAH. — Oh no, I’m moving around textures. Wait, the game logic is broken. How do I … what? Nothing works, shit, what did I do? I’ll never figure this out!

There is a common theme here of getting distracted or getting stuck. These problems are solved for me in a school setting. For some cosmic reason I won the motivational lottery and just naturally find school riveting.

Getting stuck though … let me tell you a little story about that.

So I aced that Java course, right? Well, that involved me failing very hard at drawing a circle.

Yes.

During one of the first exercises we had to hand in, I spent 12 hours trying to figure out how to draw a circle. I worked late into the night, haunted by the returning specter of “I CANT FUCKING PROGRAM WHY AM I DOING THIS TO MYSELF”.

The next day, I asked the Teaching Assistent what I got wrong. He checked everything. He couldn’t find any errors. There should have been a circle. There was no circle.

He came back 20 minutes later with a brainwave: I had apparently somewhere set the default color for drawing to the same color as the background color.

The circle was there. We just couldn’t see it.

And thus began my journey into learning to program.

What I should have done instead

Here is what I’d tell my past self to do while she was trying to learn to program without a teacher or a curriculum.

1. Stop learning other stuff. Focus on the thing you actually want to learn.

I burned a lot of energy and confidence learning HTML and Javascript first cause people told me they were “easy places to start” and you could “make games in those too”.

No.

Go learn the thing you actually want to learn. C# and the game engines were the only relevant pieces to learn. Sure, maybe those spun off a bunch of math studies for graphics or compiler optimizations for runtime gains, but then that would have been instrumental to the thing I wanted to learn: Making Badass Games.

2. If the course is boring, find some other way to learn.

If learning to code with a certain book is boring, pick a different book. If you don’t like books, watch videos. If you don’t like videos, tinker with code examples.

Do something you actually want to be doing.

Attention is a very sensitive and precious resource. Yes, you can apply discipline to blast through blockers, but you can’t apply discipline to run the entire marathon. At some point you need to be doing something you actually enjoy or are motivated for on a moment-to-moment basis.

I actually ran into this with Unity versus Unreal as well. Everyone told me to use Unity—It’s easier. It’s more beginner-friendly.

But Unreal looked cooler to me. I wasted a bunch of time and confidence on trying to learn Unity while not liking any of the results I was getting cause the games came out in a style that didn’t appeal to me.

So do what you actually want. Find an angle. Explore before you exploit.

3. If you are stuck, either go to sleep or get help.

There is no teacher to save you, but a fresh pair of eyes often can. That fresh pair of eyes can be yours or someone else’s. And maybe you need to refresh them a few times, but your problems are surmountable. They are within the realm of human knowledge (or if they aren’t, that’s a whole different essay).

Getting stuck on a bug or a problem can have you going in circles. At some point, you are pouring energy into a black hole. There is a skill to noticing the hole, stepping back and chucking your worst enemy into it figuring a way around it.

4. No seriously, ask for help.

The internet is your friend. If you are shy, post anonymous questions online. If your bold, find a meetup to visit in real life[2]. Either way, helpful people are one of humanity’s greatest treasures. Honestly, the energy I lost learning HTML, Javascript, and Unity should have been invested here — into this meta-skill of getting the right help.

Stack Exchange would have been the best place to start back in the day. But I’d recommend to go as wide as you can. This is where now and 17 years ago diverge pretty hard. I’m not sure what were the best sites to visit back then, but the heuristic is the same: Just try 5 different ones. No, 10 different ones. Honestly, try as many as you can.

You really want to go hard on this.

In an alternate universe you were stuck for 12 hours drawing a white circle on a white background and questioning your ability to ever learn anything again. You need to have a way to sanity check your work. Peer review is the backbone of the programmer world, and a crucial ingredient in the journey to becoming one[3].

5. Pop up a level once in awhile.

It’s easy to get sucked into doing the thing you are doing, and not checking in why the hippity-hell you were doing it in the first place. The self-learning equivalent of brains-over-brawn is to spend 10-20% of your time strategizing.

So ask yourself: Is this the best way to reach your goals? Are you using all the tools you could be? What’s some other way to reach your goals? How motivated are you feeling? Are there blockers in your daily life that are sucking away your energy?

If you notice anything amiss, action it. If you don’t know how to action it, experiment and iterate instead.

6. Exploit your natural motivations.

Awhile ago I wrote about exploiting your natural motivations to achieve progress toward a life direction. At 21 I had already developed this technique, but wasn’t applying it across the board. The basic idea is to use your natural motivations as rocket fuel to make progress toward where ever you want to go. The trick is to let yourself freely pursue whatever captures your attention but then be sure to round off every project by tying it back to the thing you want to make progress on.

This works for self-learning too.

Much of self-learning is the ability to manage your attention and motivation all the way to the end of your project. No one is going to tell you to keep going. No one is going to give you deadlines or grades. No one is going to hand you a diploma at the end. You have to build these motivational structures yourself. And the easiest way to do that is by leveraging your innate biochemistry: Do whatever you already enjoy doing.

In my case, I liked drawing, working out, reading, writing, logic, socializing, and learning new things. Let’s see how we can connect those with learning to program:

Drawing—I could have made graphs or art of everything I was learning, visualized my work on whiteboards, or written pseudocode in calligraphy.

Working Out—Custom workout trackers are easy to code! Could have headed off the entire gamefied workout industry really.

Reading—I bet there was a bunch of sci-fi literature with hackers and software developers in it.

Writing—Write games about stories or stories about games!

Logic—That just is programming, though programming puzzles or algorithm design might have been closer to the mark.

Socializing—Programmers are online a lot, so joining chat groups or mailing lists would have been a great place to start.

Learning New Things—Programming has touched almost every field, and if any field was untouched back in 2007, it would have been exciting to be one of the first contributers in writing little programs to help people.

7. Figure out how to tune yourself.

School has a rhythm, but when you are self-studying you have to create your own rhythm. What this means is that you need to make sure you are well-fed and comfortable, take breaks, work out, get accountability buddies, practice body doubling, and anything else to get you firing on all cylinders.

Actually, I just realised half of school’s value to me was the accountability and body doubling: You are expected to finish X work by Y time, and will regularly sit in a room with loads of other people expected to be doing the same. That’s powerful stuff!

And something you can recreate by joining or creating a study group.

Accountability and body doubling help to minimize distraction, and distraction is generally a failure of self-tuning. If you notice your interest waning, or you are low on energy, or your mood is slipping, then that’s something you can fix. It’s a skill to notice these things and it’s a skill to fix these things. A very very trainable skill. It mostly takes practice. Practice in noticing what your body and mind need, and practice in then actually getting up and fulfilling that need.

Would this advice have worked?

I think so.

I think if someone can deliver these notes to my past self, it would have been enough for me to learn to program on my own. I am, however, not sure the above is a full guide to self-learning. It’s just the diff between 21!me and 38!me, where the latter has the skills the former does not.

That said, I presume it is actually a partial guide to self-learning: Focus on what you actually want to learn, disregard unmotivating learning material, if you are stuck then go to sleep or get help, develop the skill of asking effective help, strategize regularly, exploit your natural motivations toward your learning goal, and learn how to tune yourself into the best state for learning.

This exercise has made me realize one funny thing though: I think to my mind, the ideal teacher would make themselves obsolete by teaching all the above and more.

  1. ^

    Yes, you can prove me wrong with an exception, but my career ambitions lay in the direction of AAA games.

  2. ^

    And if you are not literally my younger self living in 2007, also just loop in ChatGPT and Claude the same way as you’d loop in knowledgeable peers and approachable experts.

  3. ^

    Even better, try to reviewing other people’s code.