Lessons from (trying) to learn to code: WIP

For an awfully long time, my procrastination when it came to learning how to program was terrible. I’d download a book, or find some lectures, or sign up to some website, and I’d do a few basic tasks. Then I would get distracted by some article on Hacker News or Reddit about some new, better, or just different course, and I’d try that one instead.

This would have been problematic even if I were covering different material each time, but unfortunately this was not the case. I’ve covered the very basics of Python about five times since I decided to learn. It ended up as a vicious cycle, with boredom with the fundamentals causing me to switch more regularly, causing me to be covering the fundamentals again.

After reading a couple of rationality blogs and books, I applied such introspection to my failures and noticed what was going wrong. I spent some time choosing a new book, promised to finish it, and began to work through it.

I recently finished this course, and I’m learning more practical stuff now I have the necessary knowledge. Here’s what I’ve learned from my previous failed attempts at learning to program.

Spend time choosing at the start
If, instead of just launching in to the first free book on python, I’d spent half an hour looking at the options, writing up some notes on what people said, and making what seemed to be a good decision from the very start, I might have saved myself all this trouble. I certainly wasn’t thinking rationally when deciding what to use in the first place, with my decisions more weighted on what was most easily accessible.

It’s tempting just to get started straight away, but you might end up with something too technical, or assumes previous programming experience, or is paced too slowly to be interesting. Look at the recommendations of other beginners who are now showing results. And remember to consider languages such as Ruby.

Stick with your choice
This is another obvious one. A large part of what I was doing wrong was always looking for better material to learn from. There definitely were superior books to what I began with, and each time I changed I might have been moving to something better still. However, the time I lost in each attempt more than made up for any potential gains in efficiency from the superior learning resource. When you’ve chosen your course, stick to it.

Don’t expect to be a pro immediately
After skimming through the contents pages of some books, I saw what I would have learned by the end and thought “Then what?”I knew that variables, loops, and functions were necessary, but at the end of the day you can’t create a program that’s very useful for a novice from just such basic components. I could write some easy things, use it to solve some Project Euler puzzles, but nothing much more.

The important thing to remember is that an introductory text won’t make you a capable programmer straight away, but rather give you the skills you need to learn the actually practical stuff. It has been written to teach some programming thinking, to get the syntax down, to learn the stuff that will need to be known intimately for anything to get done. It has not been written to teach you GUI programming or game graphics.

Have something to move on to next
Something that really committed me to the book I used in the end was the fact that it had a recommendation for the next step, a more advanced book to read. It doesn’t have to be the same thing. It could be an existing project to understand, or a basic application to make, or whatever. The important thing is to have a goal in sight for the end, otherwise there’s no motivation.

Do all the exercises, read all the text
Perhaps you’ve tried and failed at learning to program before, but did learn a little of the basics. This is not necessarily helpful, and different resources teach things in a different order. If you’re starting a new course, go all the way through the stuff you already know. It’ll suck, but it’s likely you’ll pick up something new that you’ll need later.

Don’t expect to learn everything from the book
Not all the skills you need will be found in the text you’re working with. I previously mentioned that the introductory book will teach you to think in the right way, but it doesn’t do it magically. Only by completing exercises and solving other problems do you really begin to understand what writing code is about.

Read source code
Even when you don’t understand very much, going through other’s source code will both give you an idea as to how programs are structured in the real world, and hint some of the other stuff you’ll need to learn. You’ll spend a lot of your time reading it once you actually have a project to work on too, so keep that in mind.

Conclusion
This is probably obvious for those of you who have engaged in autodidactic behaviour from a younger age, or simply thought about things before jumping into it. Thanks to hindsight bias, I could slap myself for making so many obvious mistakes. The worst of it is that I cost myself so much time in which I could have develop my skills further. As it is, I hope I can prevent others from doing the same things wrong as I did, though I’m sure everyone will find new and inventive ways to make everything go horribly wrong.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s