Wolfram|Alpha: Systematic knowledge, immediately computable.

Monday, May 10, 2010

So You Wanna Be A Programmer?

A recent comment gave me the impetus for this entry. Often, as I answer a question about computers and computing fielded by non-programmer friends, I'm asked 'How hard would it be to learn simple programming?'

It goes without saying that to become truly expert in programming takes much time and experience. Researchers in the field quote 10,000 Hours as the average tipping point, echoed by a personal hero of mine in the world of computing, Peter Norvig, currently Director of Research at Google and one of the truly great minds of computer science and artificial intelligence.

But one can easily do most useful things with far less time, and the hobbyist programmer can easily be writing simple programs in a short time, and then enjoy the unfolding learning process as they progress in their knowledge.

That said, allow me to list some resources for the budding programmer. These are meant to be accessible to those with zero background in the field. I've assumed the reader is on the ubiquitous Windows operating system on a PC, since that covers about 93% of the market at the time of writing! Nonetheless, interested readers can avail themselves of the recommended Scheme and Ruby language choices in other environments such as Linux.

Step right up! Pick a language, any language!

The first decision you'll need to make is which language to start with. I've picked three that I've seen success with by novice programmers. These are Visual Basic and C# ('See Sharp') from Microsoft, and Ruby.

All three of these languages offer the opportunity to learn cutting-edge programming techniques such as Object Orientation and Functional Programming. Purists may object that none of these is 'pure' in either sense, and that is of course correct. Nonetheless, as a framework for learning the concepts involved, all three choices are excellent.

All of these languages are available as free of charge downloads.

I've had great success recommending the following books for autodidacts for each of these languages:

In addition, there are a myriad of nice web based tutorials. A few I can recommend include:
Once your interest is whetted or perhaps while starting down the road to programming bliss, you'll want to take a read of Beautiful Code, where experts in the field explain elegant solutions to difficult programming problems. You'll probably need some programming time to fully grok the whole book, but it is an absolutely superb read.

Another most enjoyable book that will give one insight into the 'cool' of programming is Hackers & painters: big ideas from the computer age, by one of the most brilliant thinkers in programming (in my opinion), Paul Graham. Paul delves into the world of Lisp, arguably the most 'beautiful' language extant.

The book is a wonderful read even for a non-programmer: most of any discussion relating to programming is done using well explained examples. The author writes with a sharp wit, and will certainly get your juices flowing over esoteric programming problems.

One might wonder why I haven't recommended Lisp for the beginner, being as I consider it so 'beautiful'.

Two luminaries of the world of Computer Science, the aforementioned Paul Graham and the brilliant Gregory Chaitin seem to agree with me on the beauty of this language, the latter saying "...the original LISP, the conceptual heart of LISP, a core which is a jewel of considerable mathematical beauty, austere intellectual beauty."

Another Lisp lore favorite of mine is Greenspun's Tenth Rule of Programming: "Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp."

It's a fair question though. I actually have used Lisp to teach programming one-on-one, I think it makes one a much better thinker in the realm of programming, and even if Lisp is never used by the learner once on their way, it will have profoundly changed the way they think about programming.

But the edifice of Common Lisp is deep. And wide. And tall.

I think that learning Common Lisp on one's own, without any prior background, is like a fast-food diner deciding to learn how to cook. But learning to cook in this case includes learning how to manufacture a rifle, learning how to stalk your prey and properly dispense with it, then figuring out how to butcher the beast, next learning how to smelt iron to make the cooking utensils, followed by a lesson in the production of an oven, and finally instruction in proper Chef de Cuisine antics. You get the idea.

But if you're bent on really expanding you mind in your learning adventure, try something like PLT Scheme, a simplified dialect of Lisp. There are excellent learning resources at the PLT Scheme Learning page, I highly recommend the book How to Design Programs should you take this route, it is centered around PLT Scheme. An amusing overview and good tutorial is provided at Teach Yourself Scheme in Fixnum Days.

You might just find yourself repeating an observation of a student of mine at the end of a course in Scheme:: "Why on earth would I ever want or need to use any other language?"

You might also want to take a peek at my blog entry What programming languages should you learn?, where I describe what I think would be an ideal course of languages for someone seriously interested in programming.

Any of these learning routes should prove rewarding, and start you on the trail toward programming wisdom.

(begin
   (display "Hello, Budding Programmer!")
   (newline))

1 comment:

  1. nice blog.. have a view of my blog when free.. http://www.lonelyreload.blogspot.com .. do leave me some comment / guide if can.. if interested can follow my blog...

    ReplyDelete