Twenty years ago, Clarke Ching fell in love with programming. Then he got a job doing just that and fell out of love within five years. Fifteen years later, Clarke sought the help of a well-known programmer for advice on how to rekindle his dormant passion for programming. The advice Clarke received led to a greater discovery.
Twenty years ago-half my life-I was an excellent developer. Then I got my first full-time, grown-up job as a programmer, and I hated it. I was working on a COBOL credit-card system that was older than I was. I'd gone from a world where I excelled to one where it was difficult to be anything other than average. Five years or so I worked as a programmer in different languages and different environments until eventually I admitted it: My love affair with programming was over.
Since then I've worked as a manager, analyst, consultant, and author. But you know what? Fifteen years later, I still love programming. And I miss it.
A few months ago, I decided to do something about it. I asked Andy Hunt-a guy whom I think of as a programmer's programmer-if and how I could learn to code again. He knew that I didn't want to write code professionally. I just wanted to get my hands dirty for a little while to see if I still "got it."
In the process, I also hoped to understand my programmer friends a little more than I currently did. Andy suggested learning Ruby. He also recommended reading "Learn to Program" by Chris Pine.
Ruby is an interpreted programming language that runs on Windows, Linux, and Mac (and probably a few other operating systems as well). It's an easy language to set up (it's pre-installed on Macs), and it's really easy to learn compared to most programming languages. Ruby is also free, which never hurts, and it's used commercially as well. Within thirty minutes of downloading the book, I had set up Ruby, written, and executed my first program. The program added 1 and 2 together then wrote the answer to the screen. If you are wondering, the answer was 3, not "Hello World."
Now, this probably sounds daft to you since you weren't there, but I was delighted with myself when I saw the number 3 come up on the screen. For a brief but pleasant moment, I thought to myself, "I've still got it!"
If you feel even the merest pang of envy, then why not grab your nearest, friendly programmer and ask him to help you download and install Ruby. Then fire up a text editor and type in "puts 1 + 2", save the file as myprog.rb, run it from the command line and see what happens. You could probably manage this without a programmer, but if it makes it easier, then why not ask for help?
I originally learned to code using languages like Pascal, Modula-2, and C. Things have changed a lot since then. The world's gone all object-oriented, for a start, and according to my developer friends, a whole lot more complicated with Java and C# and their enormous libraries.
But, did you see how short myprog.rb was? That's why Ruby is a good choice for learning or relearning programming. It is short, simple, and to the point. As a developer friend put it, you type less but get more done.
Of course, that's all a bit "Programming 101," and there's a lot more to programming than that. One must learn loops, variables, objects, methods, arrays, and recursion. The good news: I relearned all of those on day two of my affair with Ruby. I worked my way through the book, doing some of the exercises and skipping others. I wrote an integer-to-Roman-number conversion program. It read the integer and wrote out its Roman number equivalent. I wrote it as a loop, and then I rewrote it recursively. I only scratched the surface,