A while ago I read an article on how a certain professor believes teaching Java as a first programming language is 'damaging' to CS students.
Well, I totally agree.
But I also don't think learning Pascal (as in my university..) is the best solution ever. The students get used to code their projects in a language totally obsolete (ok, there's delphi.. :P), and are supposed to "learn how to program in any language". It's true that with a language like Pascal you are able to focus mainly on the algorithm itself. However, the freedom you have in C to do nasty things (pointer arithmetic, anyone?) is definitely not present in Pascal. Though I was a "good" Pascal programmer (haha what a joke...), I remember I had big problems with C. And after spending several years mostly coding in Java, I still do.
So I decided to "brush up" on my C skills. I will start by posting one of the most useful pieces of code ever, which can be easily adapted to any programming language (talk about language independence huh, Dr. Edmond Schonberg?)
And here you go: a simple way to check command line arguments, in C.
(Ha, I bet you were expecting some awesome data structure or a really cool algorithm! Well, I doubt you can find a solution like the one above that doesn't involve a bunch of stupid "else if" statements :D)
Monday, February 25, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment