Tuesday, August 29, 2006

Top down approach to programming

Here we sit in a world of object oriented everything and procedural programmers are considered elitist or engineers, and here is my opinion on what is needed for an efficient programmer today:

Beginnings:
Everyone needs to start somewhere, but where? Well this is, has, and always will be a matter of opinion but from what I have read and experienced through interactions with a lot of other programmers I believe Java is the appropriate place to begin. Why? That's a good question and I believe it is because the basic syntax for assigning values to variables of primitive or "built in" data types is easily translated to other languages with very little effort along with translation of basic operations: if statements, switch statements, for loops, while loops, etc. Also if this language is taught properly the essence and power of object orientation will be in tact for the pupil to go on to learning polymorphism, inheritance, design patterns and/or good programming techniques.

Higher Education:
The second language I think someone should learn will be C++ because we are able to handle actual pointers, deeper concepts of reference vs. value passing, true system ram can be manipulated while still being able to create objects, perform simplified basic I/o and translation from imported libraries to included headers (also known as libraries) is not difficult when moving from Java.
Then on to the mother of languages known by elitist as the god send: C. I think C is essential for programmers to learn in order to understand what is actually happening behind a method call in Java like the popular whatever.toString(); Along with many other applications of how important and efficient pre-processor declarations can be, etc.
Finally, assembly language. Yes it makes you want to run and hide, it might even make you cry but it is required in my world. If you aren't at least taught the theory of gate logic and have a firm understanding of how much work is actually done in a stack with registers and memory addresses then you fail at life. Without the appreciation for what the compiler does for you so your programming language of choice is not so intolerable to code in that you rip your hair out more often then you already to, then your path in the computer science world has been lead astray and once again, you fail at life.

Real World Applications:
Now that the data structures have been thought, the pointers are understood, type casting is second nature, reference and values are no longer something that have to be thought about because you can differentiate the two as though it were child's play, recursion makes more sense than the English language, and you can tell me how your processor is actually representing floating point numbers.... You are now ready to practice what I like to call "real world programming languages" like Python, Perl, Php, Ruby, C#, VB.net, etc. Yes, we have graduated from the "Top Down Approach" and can now appreciate all the hard work our predecessors put into these robust languages. Why? Well because you understand what is actually happening when you pass python the parameter myString = "hello"; and can further appreciate the power in doing so. Now just because I have deemed these as "real world" doesn't mean that the others aren't used in the real world it just means I don't believe they should be used as teaching tools but more as industry level languages that should only be used where applicable.

Is it perfect?
No. Nothing is perfect and this is simply a blog and thus an opinion, my opinion on how I think computer science, in respect to programming languages, should be taught.


... that's today's two cents, take them for what they are worth.