next up
Next:Algorithms Up: Overview Previous:


Introduction

What is Wrong With Computer Science?

Computer Science is still just a child amongst older, more practiced, and more well understood disciplines. It is like alchemy, in that it exists in state between science and art, often viewed as magic by those on the outside. Even we who practice it don't completely understand its true nature, or where it fits in amongst other academic subjects. It is in desperate need of formalization.

The hacker mentality is still very much the dominant mind set. Not that this is all bad; hacker's methodologies are very good for getting things done quickly and efficiently, but are very poor for communication and logical analysis. Programmers that hack tend to think by intuition, having already internalized the basic logic of how to write code. In doing so, they tend to not realize how many steps they're skipping when trying to explain to non-hackers the sorts of mental processes that they work by.

Non-hackers that are trying to learn suffer when faced with this sort of obstacle. Those (including myself) who learned how to code by the "maverick" style, through one's own discovery with little to no guidance, tended to figure things out much differently. They'd pick up one or two tools, such as variables and conditional's, and would then combine them in every possible manner, figuring out the nuances and details of the semantics involved in such constructs. Eventually, they'd run into a point where they'd realize there was something missing, and would investigate other features that were available. The end result was similar to building a wood shop project with only nails and wood, bypassing entirely screws / power tools / and saws. It wasn't pretty, and it wasn't very architectural, but the fundamental principals of the subject were entirely and thoroughly internalized. Higher level concepts, like generalized algorithms and object hierarchies, hadn't even crossed the mind. But that's alright, as learning and exploring the basics first was more important.

We're still teaching like hackers, and this needs to change if we ever want to see some acceptable success rate for those being introduced to Computer Science. The basic reason is very simple. Hackers like being tricky (though they usually don't realize it). And those on the receiving end of trickery tend to get confused. Hackers enjoy teaching multiple ways to do the same thing, such as a "while..do" loop versus a "do..while" loop, or computing formulae by functional-style expressions versus imperative-style mutators, and then proceeding to show the slight nuances between the different approaches. This is a poor teaching method since the beginner does not share the same mastery of semantics that the hacker does, so the beginner winds up left behind. Hackers also like to spit out a whole page worth of code, and then analyze step by step what the parts do and what the interaction yields, also known as debugging. Again, this works fine once one already knows what the individual pieces do, but a beginner has much better luck working bottom-up, by composing small chunks together in a way that makes sense.

The difficulty that Computer Science faces is that it has no strong foundation of principles, which is why it often avoids the bottom-up approach. It has no prior model of parts upon which to build, whereas other disciplines do, for example, biology which builds upon basic chemistry, political science which builds upon social studies, and calculus which builds upon algebra (which in turn builds upon arithmetic). So instead, the Computer Science teacher throws everything at once into the open, and has to simultaneously explain data structures, syntax, the environment, variables, and algorithms all at once. This is a poor approach, as the student has no insight into why each individual subject is needed. And also, because as every good software engineer knows, introducing too many new changes at once leads to nothing but problems.

The alternative, as presented here, is to use assembly on a virtual machine, which is sufficiently abstract, to provide a solid foundation upon which programming and software engineering may be taught. First off, the fundamental concepts of instructions, state, discreteness, and atomicity are introduced, and then this vocabulary eases students into composition, then control, followed by data structures and eventually algorithms. This order is both logical and incremental, helping students learn based upon only lessons already internalized, while still understanding the purpose and need for each tool in their repertoire.

To assuage any fears of using assembly as an introductory language, the machine in question, Rex86, has been streamlined as much as possible, making it appropriate for use by any beginner. It exhibits the following useful simplifications:This simplified architecture cuts away all unnecessary details, allowing the course material to stick to the core essence of what programming is.

What is the Core Essence of Programming?

What isn't the Core Essence of Programming?


next up
Next:Algorithms Up: Overview Previous:

by dlong@progmatism.com. Plz don't copy kthx.