Sunday, September 14, 2008

How to Program

I was at an T224 Tutorial yesterday when one of my fellow students explained that he had already completed M150 ("Data, Information, and Computers" - or something akin to that) but he said that he found the programming aspects very difficult and realised that he wasn't a programmer. He asked what advice any of us would give him to help him get to grips with programming.

Various bits of advice were contributed. One student, who had been annoyingly vocal during the tutorial and had advice for everyone on every topic, said simply that he should learn Java - but that there was no point in learning how to program because all the programming jobs were going overseas. So, two bit of bad advice in one breath I thought. Another student recommended learning learning Visual Basic "because it what most databases use" (Good grief - where did he get that idea from?).

When I was able to get a word in I explained that, in my opinion, there were two aspects to this. One was 'How do I learn to program in language xyz" and the other is "how do I learn to think like a programmer" (at which point the eyes of the chap who posed the question lit up). I said that I thought the best way to learn how to think like a programmer was to: A) Don't read books on a specific language, but find some generic books on programming - books that talk about ideas, or the general approach that programmers take. B) Read code written by experienced programmers, talk to them about it, get them to explain why they do something in a particular way. When you 'think' programming' then solutions evolve which are not language specific but can be implemented in a number of languages. Once you are comfortable with the ideas of Arrays, or Hashes, or different types of iteration, of functions, and so on then learning a specific language seems to make much more sence.

In the end the questioner said that he wished he hadn't asked the question! - Oh! I didn't mean to put him off - I'm dead keen on people learning to program and I wish that I knew more people who did.

2 comments:

B1TNY said...

Excellent posting and good advice, especially the one about 'thinking like a programmer'.

In M150 you are asked to program in Java Script, many students found this hard and some even missed out this section altogether. The tutor advised that you could miss this out of your TMA and still pass the course. - just the excuse everyone wanted. I did complete mine and found it interesting but not sure if I would want to learn to a greater depth.

There is always one who likes the sound of his/her own voice!

Simon said...

Tony

I agree with your points about JavaScript. I think the biggest issue in M150 is that you are expected to write and debug code in an extremely unfriendly environment (netscape or IE). I think when you start out programming with JavaScript, there is nothing more begrudging than the error Icon at the bottom of IE. It is about as informative as an IKEA flat pack guide, and if you get stumped on what may be a simple error it can be enough to put you off for life!

Simon, I think your advice is great! What I have come to learn over time is it's not the language that is important, but the principles of programming. As for your fellow student, M255 would be a good course to study if they wanted a good background.

Blog Watch