Tip #9 - Learn Programming Theory

2008-04-16 13:18:55 +0000

Being a Rails developer means that, yes, you too need to learn how to (gasp) program! No, seriously! Here are my tips on that subject.

This is part of my 8-Part tip-a-thon on the Must Know Facets of Ruby on Rails. If you haven’t already, please read the first part and then come forward (there is a link at the bottom of the previous link to this article)

Learning how to Program is an interesting one. Where on Earth do you find a definitive guide on how to program?

I can tell you what not to do here, don’t go out and buy the latest “Learn Ruby on Rails in 24 Hours” book, or “Ruby on Rails for Dummies”, if and when such a beast surfaces. No. Actually, I am not even talking about Ruby, Java, C or any other language, what I am talking about is Learning to Program a computer.

A computer teacher of mine once said “A computer will ALWAYS do what you tell it to do. Not only what you WANT it to do.”. I have kept this as a stable learning datum ever since. When I find a program is not working the way I would expect, I will go through the code, line by line inspecting it until I find where I TOLD it to do something I didn’t WANT it to do.

If you don’t find the idea of pouring through code for hours to find that one bug interesting or exciting, then programming may not be your thing and you might find more fun somewhere else.

But for the rest of us, this is where we want to be.

You know, probably the best write up of this I have found is called Teach Yourself Programming in 10 Years and it is a great read with a lot of good advice. I recommend you go and read this now and see what areas you can clean up and improve on.

If you are a complete beginner to programming, don’t fear, the way to mastery is by taking small and deliberate steps.

I would recommend you go and read Chris Pine’s fantastic “Learn to Program:http://pine.fm/LearnToProgram/ book. The first edition is on the website for free and is very good. You can get later editions from the store from his site.

Where to go from there? Well, for starters, you should subscribe to the Ruby Talk mailing list at least, maybe even Ruby Core. You should read through some of the posts from the more experienced Ruby Programmers as they come up and watch with interest when someone says “How do I solve XYZ?” and see the answers, test the answers and see if you could do better (you might surprise yourself).

Also, if you do see an answer from one of the Ruby Gurus, don’t be afraid to ask how it works if you don’t understand it. The Ruby Community is one of the friendliest communities I have met, and they are always willing to explain their methodologies or ways of answering a problem.

Finally, go look at the Ruby Quiz Series done and hosted by James Edward Gray II. It is a good exercise to sit down and actually try to do these quizzes in any order. It teaches you a LOT about programming. Just like an elite Athlete needs to train in all sorts of exercises to be competent at their core devotion, so to do you need to exercise your programming mental powers to think about problems differently or to expand your ideas and ability to think.

Next step, The Ruby Language

blogLater

Mikel