Learning to learn to program

Learning to program is not easy. Learning to learn to program is even harder. It’s easy to start learning, but even easier to get lost along the way. I have just written my first comment on the Coding Horror blog (by Jeff Atwood of Stack Overflow). It’s for this post. I wrote about how hard it is to go from “Hello World” to advanced programming, and how the post topic – programmers’ communication skills – relates to that. When learning to program there are few maps to follow and those few that exist are not easy to find. This blog is an attempt to create a map for myself as I try to find my way, as I get lost, as I get back on track, and so on. Hopefully someday it will start being useful for others as well.

I certainly hope many programmers will take Jeff Atwood’s advice and start sharing their knowledge and maps. Programming is a big and complex field, and it often takes a guide or a map to help you figure out how things are interconnected and how the pieces work together. There will always be books, and recently there are also some universities, like MIT, that put a lot of material online (see MIT Open Course Ware). But sharing directly, on the Internet, can help us see get insights from many valuable points of view and that’s interesting.

In case you are wondering why, on this blog, I am writing about certain subjects and not (yet) about others, I will explain.  I am especially behind with the theory – I definitely should write about algorithms and data structures, just haven’t found the time yet. It’s been a year since I’ve returned to programming after trying other paths, and in the first months I had started with the theory (books and MIT Open Course Ware, etc), but after a few months I tried concentrating more on PHP, Python and practical web development. And the blog came much later. I am always trying to find a balance between theory and practice, and I hope that soon this blog will start reflecting that.

Click “continue reading” if you want to read 5 basic pieces of advice to fellows apprentices and more thoughts. If you have thoughts and advice of your own on this subject, I would love to read it in your comments! Thank you in advance. BTW do visit the new Stack Exchange (a platform for Questions and Answers site brought to you by the creators of Stack Overflow) for all your writing needs: http://writers.stackexchange.com/. You’ll find advice on common writing tasks we face everyday and beyond: from e-mails and making technical issues accessible, to actual short stories.

When learning to learn to program…

1) Take notes. Take better notes. Learn on your note-taking mistakes to learn making better notes on learning to code better. Your notes are maps, they will help you get lost less often.

2) Remember, as they teach at MIT, that often the bug is something more trivial then you think. Could be a typo. Check that you are running the same code that you are modifying. Don’t panic or question yourself every time. Keep a checklist of your particular common errors. Everyone has those annoying “oh, I’ve done that again” mistakes, apparently. It’s OK.

3) Read books about programming and books about learning to program, which luckily now exist. I’ll write a separate post about books later.

4) Don’t waste time arguing on IRC, no matter what. Sometimes you can get good advice on IRC. Sometimes you’ll even get answers from core developers. But if things go less well, breathe deeply and move on.

5) Program. A lot. Try to transform every little annoyance into inspiration for writing code, be it a simple script, an app, or something bigger. Some website you use has a lousy interface, and you click too much? Write a powerbrowsing script that scrapes the important parts and makes them into an RSS feed for you, for example. You repeatedly have to go through some steps to accomplish a task? Write a script. You have an idea for a program? Write a very simple prototype to start with. It’s better to improve something that you’ve actually finished, then to create something elaborate and perfect that exists only in your head. And this particular advice is not easy for me to put in practice:)

These 5 are just some things on top of my mind. I’ll continue thinking about this argument and will certainly write more well thought out posts about it in the future.

I’ve started learning programming many times since I was a kid – starting from copying “snake” games in BASIC on my ZX Spectrum. And I’ve even worked as a programmer in PHP before. But there are so many strange obstacles when it comes to improving your skills as a programmer.

There are subjects such as Regular Expressions or Databases, or even pointers, that are sort of surrounded by a cloud of fear so you convince yourself you won’t understand them before even trying. That fear is a real obstacle, and makes us concentrate on not making a fool of ourselves instead of on having fun learning something new.

Another obstacle that comes to mind is reading other people’s code. Programming goes from simple scripts to complex programs that are very hard to read, but you don’t find tutorials about going from scripts to complex. It’s like the world is divided between those who read others’ code and those who don’t, and as if they were all just born that way. I’m determined to learn to read other people’s code and learn from it, and will blog about it in the future. Any advice on how to go about that would be perfect! How do you approach a complex application? Where do you start? How do you map it, and take notes to help yourself find your way around? How did you learn? What was the first program you read? Any comments are welcome.

This time I am serious. This time I am serious about learning to program. And I’m also serious about learning to learn.


About apprenticecoder

My blog is about me learning to program, and trying to narrate it in interesting ways. I love to learn and to learn through creativity. For example I like computers, but even more I like to see what computers can do for people. That's why I find web programming and scripting especially exciting. I was born in Split, Croatia, went to college in Bologna, Italy and now live in Milan. I like reading, especially non-fiction (lately). I'd like to read more poetry. I find architecture inspiring. Museums as well. Some more then others. Interfaces. Lifestyle magazines with interesting points of view. Semantic web. Strolls in nature. The sea.
This entry was posted in learn-to-learn and tagged , , , , . Bookmark the permalink.

10 Responses to Learning to learn to program

  1. Terri says:

    I am looking forward to reading your post about books about learning to program. I have been searching for an easier path for some time.

  2. I found the best way to learn to read code is by reading libraries. Many times libraries are produced in a very functional style and have little state that you have to keep in your head. Of course this can differ based on the language/libraries you are reading.

    Also I would add that beginners should work on something with a visual representation (a game or GUI). It helps to be able to see the effects of the code that you are writing. I would recommend vpython to an absolute beginner, it will get them started in a very easy to use, interactive 3d environment.

  3. Pingback: Tips for a New Programmer « Pointless Programming

  4. Hey I like your blog! It’s good for others in the same boat to get another perspective on the trials of learning. I have a similar blog about learning web development. mcquistonator.wordpress.com. Best of luck!

  5. King Vista says:

    Hopefully, I’ve reached someone who is actually concerned about the learning to learn programming, “the infinite loop of learning”, and not just some marketing/spam guru. Anyway, you’ve touched on a critical topic here that I believe many of us are stuck on or fail to understand the basic guide/map of learning to learn. Yes, there are many books out that will help one to learn a specific code, however, now comes the daunting question of which one is right for me? Then some might ask, “well what are you wanting to learn?”. Well, if I knew the answer to that question, I wouldn’t be stuck in this loop of learning absolutely nothing. I mean, which programs are really the best to learn? I mean, finding it to sacrifice any real time in a program has cost me the utmost price and that is programming ignorance. How does one decide which is the right one(s) that will help lead them to their goal of understanding and
    and which ones are just a waste of time? Suppose you want to learn how to create active script (what is active script and its benifits) and how well does it play with other codes? Anyway, a reference guide would be great of all the different codes and what they are for and how they are used and the different codes that can be useful to learn with each, etc.. etc.. would be great. Something that will outline one’s learning path rather than one having to guess which ones are geared to work together our better yet which ones are even worth learning at all. I mean, are COBOLT & C+ the same type of language just different types of format? Well, thanks for your time hope you can get back with me because it would be really nice to finally get a little direction in this field.

    • Thank you for the interesting comment.

      Yes, the path of a programmer is full of choices, but to me choosing the language was not even the hardest one for me. Looking back I would have preferred to have chosen Python instead of PHP, but then again Python was new back then so it wasn’t likely to happen. Or maybe C/C++ would have been great, who knows where that would have taken me.
      My first programming language ever was BASIC, when I was a kid, and then Pascal.
      Anyway, I’d suggest Python if you want to do interesting things, both in web and in other areas like data analysis and what not.
      For a safer easier choice there is either PHP or Java, which are very present on the Web. Some of my friends claim that so is Perl, but I wouldn’t know.
      Then there is Ruby.
      And of course the ever present JavaScript on the client side and now also on the server side.
      Or you can learn C and the Assembly language and do super cool stuff with the GNU/Linux kernel and networks and what not:D

      There are many other languages, of course.
      BTW shell scripting skills come in handy too, no matter what language you use.

      And I suggest GNU/Linux over other Operating Systems. These days it’s easy to use, and it teaches you a lot about the computer and programming and networks etc.

      But after all a language is just a tool. Maybe it could be useful to pick one, and start doing things with it, and when you find out what it is you want to do, find a better tool to do that.

      Remember that programming is a big field, and offers many interesting opportunities.
      You will need to play around a bit to see if you prefer the web, or operating systems, or finance and banking software, or video games, or writing libraries or drivers, or data analysis, or data visualization, or scrapers, or experimenting with Arduino, or cryptography, or security, or operating system monitoring and administration, or Internet telephony, or knowledge management, or customer relations management, or any other area.

      You’ll need to study many things, theory and practice, experiment and read a lot.

      I hope you find what you find what you are looking for and have a great experience searching for it and learning new stuff along the way and creating your projects.

      Let me know if you have any other questions or if something isn’t clear.

      As always it comes down to do things, tell people like in this inspirational post:

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s