Surprise, Surprise: Java Coders Don’t Know Jack About “Real” Programming
January 14, 2008 Timothy Prickett Morgan
This one reminds me of the conversation I had with my father over standard versus automatic transmissions in cars when I was a lazy teenager and there was a cranky clutch that took way too much of a delicate touch to work correctly. Two professors of computer science at New York University who are also the top brass at a company specializing in the Ada programming language, have written a paper that explains why Java is a terrible first language for newbie coders to learn. In a paper entitled Computer Science Education: Where Are the Software Engineers of Tomorrow?, Robert Dewar, president of AdaCore and an emeritus professor at NYU who has been involved in creating the Ada programming language since 1980 and who created the open source GNU Ada Translator, and Edmond Schonberg, also an emeritus professor at NYU and vice president at AdaCore, explain why they are dismayed by the lack of programming and underlying mathematical skills in computer science programs today. (The paper was published in CrossTalk, the Journal of Defense Software Engineering, and you can read it here.) One of the more interesting parts of the paper is where the electrical engineering students who were taught C++ first turned out to be better programmers than the computer science students who learned Java first; this was reported anecdotally from a professor at Texas A&M University, which switched the computer science program so it starts with C++ first rather than Java. “Let us propose the following principle: The irresistible beauty of programming consists in the reduction of complex formal processes to a very small set of primitive operations,” the paper by Dewar and Schonberg says in explaining the pitfall of the Java-first approach to teaching programming. “Java, instead of exposing this beauty, encourages the programmer to approach problem-solving like a plumber in a hardware store: by rummaging through a multitude of drawers (i.e. packages) we will end up finding some gadget (i.e. class) that does roughly what we want. How it does it is not interesting! The result is a student who knows how to put a simple program together, but does not know how to program.” Dewar and Schonberg say that at NYU, as at other schools, Java is the most widely used programming language for beginners in computer science classes, specifically because of its popularity in the commercial world and because of its relative ease of programming. But, say the professors, students at NYU had no idea what to do if they didn’t have a graphical user interface and, more importantly, had no idea what the relationship is between the source code they are creating and its hardware it ultimately runs on. If you don’t know these things, you are not studying computer science, and you cannot make things run better. What the two go on to say is that it is really important for newbie programmers to evolve from lower-level languages, which are closer to the iron and therefore do a good job of explaining to students the features of processors and their memory subsystems and how to take advantage of them. So you start with C, where you can see the relationships between the code you write and the hardware, and equally importantly, do tweaks to boost performance. Then you move up through C++, which adds object oriented programming techniques, and Lisp, which is arguably the coolest language ever invented and which is the second-oldest high-level programming language, created in 1958–a year before COBOL and four years after Fortran. (Many of the concepts of modern programming were pioneered in Lisp–list processing, recursion, incremental recompilation, and the well known if-then-else construction that seems so obvious now.) “Seeing a complete Lisp interpreter written in Lisp is an intellectual revelation that all computer scientists should experience,” Dewar and Schonberg say in the paper. (Guess you have to do it to see what they mean.) The two also say that Java is an important language, too, even on its technical merits, and of course, they finally add that Ada, a programming language that is used in embedded and real-time applications–where the professors have their expertise and have made their livings for decades–is equally important. “Ada is the language of software engineering par excellence,” the professors write in the article. “Even when it is not the language of instruction in programming courses, it is the language chosen to teach courses in software engineering. This is because the notions of strong typing, encapsulation, information hiding, concurrency, generic programming, inheritance, and so on, are embodied in specific features of the language. From our experience and that of our customers, we can say that a real programmer writes Ada in any language.”
|