[clug-progsig] Learning [C] Programming
chrisb at chrisbtoo.net
Thu Sep 30 20:16:36 PDT 2004
I had a thought in the car on the way home from tonight's meeting. I've
mentioned C in the subject, but it really works for just about any
language - even assembler if you must ;-)
Shawn's quite correct that you need a project to work on before you can
really start learning to program. Where I disagree with him, though, is
on the nature of the project. While it might be nice to have a grand
goal in mind like "I want to build my own timesheet system", or "I want
to write my own OS", the problem is you'll never get there, because you
don't know where to start. Trying to write an original program from
scratch for your first one is going to be even less use to you.
I was thinking what sorts of problems might be easy to solve for a
beginner, and it occurred to me that Linux (well, Unix, I guess) gives
us the answer. It's full of little programs that do small, specific
jobs: programs like 'cat', 'head', 'tail', 'sort', 'uniq', 'touch', etc.
If you're a beginner wanting to learn how to write some code, you could
do worse than to study the man page and behaviour for some of those
programs and see if you can rewrite them from scratch yourself. It won't
win you any awards, but you might learn something useful.
More information about the clug-progsig