Teaching only Java is bad?

Today I saw this blogpost: http://blogs.msdn.com/tparks/archive/2005/12/30/508164.aspx, titled 'Java only is bad mmmkay?'. It's a blogpost inspired on some article by Joel: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html.

I wondered: "Would that Microsoft employee have written 'C# only is bad mmmkay', if C# was the major language of choice at universities? We'll never know but I have the feeling that we never would have seen the post. The reason is that the whole debate which languages are used at universities to teach students programming is one of those debates which shows who gets it and who doesn't. Before you point your finger at me and yell "Haha you now painted yourself into a corner, bozo!!!11", let me explain.

Repeat after me: "It doesn't matter which language is used to teach programming principles".
Ok, again and now a little louder.
Great, your neighbours are again very pleased you live next to them, but I hope you get the point. So if a university opts for Java, or whatever other language, it doesn't matter: it's not the language that's taught, but the principle of writing software: from abstract definition of algorithm to a physical representation of the algorithm in the form of working source code.

There's something else though, and it's plain, filthy marketing crap: the languages students work with at universities are often the languages they pick first after they graduate and get real jobs. So, every student who is exposed to Java is potentially a Java user for a long time. This is one of the reasons why universities are a battleground for software language developers, like Sun and Microsoft. It's sad normal developers participate in these marketing campains.

If people want to contribute to the science of software engineering, that's great. But they should start by leaving the marketing poop out of it. If the concepts of 'OO' have to be taught, you can perfectly use Java, as the tools are free, there is a lot of sourcecode available and above all: a lot of articles and books. Also, many books about Object Oriented software engineering are using Java to explain the concepts. What's wrong with that? The university I went to used Lisp to explain interpreters, used Prolog to explain writing AI, used Miranda to explain functional programming and used C to teach basic programming techniques (and a dozen other languages to teach other principles). Why does a student have to learn C++ as well, if Java serves the purpose of teaching OO (for example, you can also use it for teaching programming and OO, as the students by then already know Java so they don't spend time on learning the syntax, but can fully concentrate on the concepts taught).

To close, I'd like to comment on one quote I grabbed from Joel's article:

Instead what I'd like to claim is that Java is not, generally, a hard enough programming language that it can be used to discriminate between great programmers and mediocre programmers.
What a pile of BS. Programming has nothing to do with the language you use, Joel. Implementing an algorithm so it can be run on the other hand does, which is an activity performed after the programming phase is finished. The design of the algorithm, that's the real programming and in that phase you'll recognize who's a great programmer and who's a mediocre programmer. The phase after that, which is the one I'd like to call the 'code generator from the stone-age phase' (I just made that up, but it drives the point home ), is the phase where human beings try to be smart and type in text which they think represent the result of the conversion from the abstract algorithm definition to executable source code. That phase can also be done by a program, it's just that the current state of algorithm describing languages isn't mature enough to outclass plain sourcecode but we'll get there eventually.

And why does a computer language have to be 'hard'? What kind of logic is that? "It's not hard enough, I don't want to use it". As if writing software today is so easy that it's hard to make mistakes and include bugs, isn't it, Joel? You sell bugtracking software, so you should know . So, to extend that logic, pick one of the most arcane languages out there and see if someone can write a solid piece of software in it. If s/he fails, it must be a mediocre programmer!

Use this rule of thumb: you once in a while have these fun threads on programmer forums where everyone posts their most complex piece of code they've ever written. If you want to participate in that thread but can't find anything complex looking code, because all code you wrote is straight forward, easy to understand and clear to the point, you can gratulate yourself: you're a great programmer.

15 Comments

  • Wonderful words Frans. Are the programming principles that must be well understood and not the language itself. However, don't deprecate Java language for teaching: Java is a good language for learning OOP programming (for example Java is ideal to learn interfaces concepts).

  • Joel wasn't talking about teaching OO concepts. He was addressing two very specific concepts: pointers and recursion. The first would be utterly ignored in most OO-oriented classes. The second, given watered down, Towers Of Hanoi treatment at best. His point was that if you can truly grasp the lambda calculus that underlies all languages, you can learn and excel in any syntax. Java and C# aren't there yet. (Yes, I am aware of LINQ. I suspect there are similiar ideas afoot in Sun's labs as well. There better be.)



    Joel isn't looking for people trained to code in <cool language of the day>. He's looking for people who can use their brains to solve hard problems that have never been solved before.



    OO is not the end-all be-all of Computer Science. It's just a very useful engineering device.

  • What I got from reading Joel's post is that today's CS programs at universities are not teaching students "computer science" but rather "programming skills". And he happens to pick on Java but that could be C#/VB etc. I would say Python/Perl/Ruby, etc. but I only have a sketchy knowledge about them.



    Java/C# is a wonderful language from productivity stand point of view, I think. Anyone programming in C/C++ must be a masochist or is looking for that extra performance optimization. However, I think he does make a point in value of universities teaching in a low-level language such as C since C gets really close to how things really work under the hood. The problem with Java/C# is that it hides a lot of things under the layers of abstraction, more so than C, for example. I don't think CS programs should be "hiding" anything for the students but "expose" them to everything.



    I was just thinking and it seems right that computer science program educate students the "science" of it and (perhaps) not the "application" of it. After all, the goal of CS programs should be to produce computer scientists not programmers.

  • You completely missed Joel's point as it would (almost) equally apply to C# as it did to Java. The only difference is that C# does have the unsafe mode. Regardless, his point was about thinking at multiple abstraction levels at the same time, which is a requirement when using certain languages (notably C and Lisp) and isnt with Java/C#. His purpose is to weed out people who really stand a chance to be great developers when hiring them.

  • You can argue all you want, but the article by itself is full of quotes like the one I posted.



    If the point is that teaching C instead of Java will teach the student more about computer science, it's also stupid. The point is that NO language teaches anything besides the language concepts itself. The language(s) used are tools to teach concepts. Just a tool to teach what has to be taught. If the student doesn't get that, that's a pity and the student is likely not talented enough to become a great software engineer. However, it doesn't require C or lowlevel mechanics to become a great software engineer.



    C also abstracts away a lot of the machine. How many C developers have used register scheduling? Has any of you ever written tight loops in assembler so the complete code stayed in the x86 cpu's cache so it was much faster?



    "Regardless, his point was about thinking at multiple abstraction levels at the same time, which is a requirement when using certain languages (notably C and Lisp) and isnt with Java/C#."

    If you think you don't need multiple abstraction levels in a managed language but you DO in lisp, you're mistaken. Also, you can perfectly write C code without even knowing what a CPU register is or what a bus is. Yes, you do need to know what a memory address is but that's more of a hassle and a drawback than a plus. Because if you can use smartpointers in C++, would you rather NOT use them? I doubt it.



    "Joel wasn't talking about teaching OO concepts. He was addressing two very specific concepts: pointers and recursion. The first would be utterly ignored in most OO-oriented classes."

    And rightfully so. Pointers are only great in pointerarithmetic voodoo, which isn't really useful as you can also use references to objects, which are often preferable.



    "The second, given watered down, Towers Of Hanoi treatment at best. His point was that if you can truly grasp the lambda calculus that underlies all languages, you can learn and excel in any syntax. Java and C# aren't there yet. (Yes, I am aware of LINQ. I suspect there are similiar ideas afoot in Sun's labs as well. There better be.) "

    What is your point? That by using Java instead of C people won't grasp lambda calculus? If you want to teach lambda calculus, you should teach that, not C nor Java. Though you can perfectly use Java and AntLR to ILLUSTRATE what it takes to write a compiler, to explain how compilers work etc. as an end-station after you've explained what statemachines are, EBNF etc. etc.



    People seem to focus too much on which languages are used during a CS course. Instead, people shoudl focus on what the concepts are that are taught. The tools used are irrelevant. I mean: What's next? "Oh those universities are crap!! They use windows boxes instead of Unix machines!".

  • To be more specific:

    The computer is there to help you, not to work against you. If you can write a given piece of functionality in language X in 10 minutes and in language Y in 2 hours, I think X is more productive and lets you focus on the real problem.



    It's not 1987, it's 2005. This means that if I want to work with an object of type Customer, I don't want to deal with memory crap. I've written GUI's in 68000 assembler without any OS layer, I know what it takes, but it's just not productive, it's unnecessary as well, and therefore thus not needed for software engineering.



    To illustrate what IS important, a simple question.

    You are given an object graph (hierarchical, some objects contain references to other objects and/or collections of other objects). Objects contained in collections in objects have a m:1 relation with the collection containing object, and the collection containing object thus has an 1:n relation with the contained object.



    You have to write a piece of code which first inserts all new objects into a database and then updates all changed objects into a database. This has to be done in the right order, so PK-FK constraints are obeyed.



    Go.



    *clock starts to tick*.



    Obviously, you need to apply a directed graph sorting algorithm. So you first design that algorithm (read: grab the defined algorithm spec and work it so it applies to your situation), then design it till it is perfect and ...



    THEN you will open your IDE and write code, and type in what you already designed.



    Please, tell me, why is the language the stuff is implemented in of ANY importance in this scenario? Isn't it so that if you miss the importancy of an algorithm in the first place, you will never be able to solve this without errors?

  • "If the point is that teaching C instead of Java will teach the student more about computer science, it's also stupid."



    Frans, as a graduate of a top CS program, I can tell you, the language, whatever it is, is not taught as part of the course, it is used. Students are expected to pick up the language on their own.



    Again, you are completely missing the point. This isnt about which language is best, or what language can do what (which is what you are reducing the argument to). Joel is saying that by having ALL courses in Java, a school is dumbing down the quality of CS education. He is not mandating C or Lisp or whathaveyou. His point was that Java in and of itself is not sufficient to fully introduce the gamut of CS concepts. Additionally, using a single language for all courses does not introduce CS students to enough variety and challenge to introduce the science rather than application.

  • Personally, I enjoyed that article Joel wrote mostly for the links. I didn't get a CS degree. I naively opted for CIS, so I didn't even have the luxury of a JavaSchool - I went to a CobolSchool and it sucked. Yet, I did learn C and C++ and I understood pointers at an academic level. However, it didn't matter that much because none of what I learned in school made as much of an impact compared to what I learned on the job at my intership and every day since I've graduated. My intership job required me to learn to use AutoLisp for AutoCAD, PowerBuilder, Microsoft VC++ (sorry, this was much more involved than anything I learned in school because of MFC), and FoxPro. I didn't know a thing about any of that stuff when they hired me, but I learned it. I guess I'm thankful that the software company that hired me for my internship didn't require me to be some kind of mensa-uber-geek. So, Joel makes me feel inspired (err stupid), which is OK because to twist a line from Sixth Sense "stupid people don't know that they are stupid" and smart people are afraid of their own ignorance. :-) Now I'm interested in *really* learning Lisp. I respect Joel a lot, and I'm not arguing his point. He has certain expectations from candidates, and that's fine. Sadly, I would not have qualified for one of his internship positions. Heck, I might not even qualify today and I have 10+ years of experience as a developer, haha. This brings up another interesting point: there is a ton of demand for developers with varying required skillsets. In general, good candidate is someone who can not only solve problems, but can learn from mistakes and takes the initiative to make themselves better by continually researching and educating themselves. In this field, not everyone can know everything. I've met some very smart people that were instructors at DevelopMentor: one could tell you everything you wanted to know about the CLR but knew almost nothing about databases or ASP.NET. That's OK. Personally, I think software is a craft that should use the concept of apprenticeship anyway. If a smart person didn't learn in-depth about recursion or pointers in school, the question is are they smart enough to learn those concepts to remedy that. I'm confident I could easily go back and get a CS degree and yet I'm not going to because I have a family now, I make plenty of money, and I'm pretty darn good at what I do. However, that doesn't mean that I'm not interested in learning Scheme or continuing to learn other things related to computer science in general. That's the key to being good and making yourself more valuable IMO.

  • "Teaching interpreters in Lisp is great, but I do remember that the language Lisp by itself can be a challenge when you are first confronted with it, which takes away attention to the real issue: interpreters."



    I think this is the crux of our disagreement. What makes Lisp and its ilk different from Java and conceptually challenging, is exactly what Joel is arguing makes its introduction worthwhile.

  • "I think this is the crux of our disagreement. What makes Lisp and its ilk different from Java and conceptually challenging, is exactly what Joel is arguing makes its introduction worthwhile"

    I can agree with that, but not in the light of teaching concepts for which lisp is used as a TOOL to teach them. The challenge to overcome the obstacle to learn Lisp, is one and will probably will make you learn a few things, but it also has the risk of blurring the real concept what is taught. At least that was my experience abit with that particular subject (and I know that others in my year had more problems with Lisp than with the actual subject of interpreters).

  • My personal problem with Joel's original article.



    Is that he tries to make a point, but he just goes for the wrong reason.



    His point:

    CS education stinks because it's dumbed down too much, it doesn't mean enough anymore to tell which are the good programmers.



    His reason:

    They use Java now :P



    Point: Could be.

    Reason: Definately disagreeing :P



    Are there enough things left in managed languages to weed out the non brainiacs... in my opinion yes.



    And fact of the matter is it's probably better to let students use a language that they will actually use in their day jobs.





  • Where I am from, we had courses in functional programming (Haskell) and all kinds of courses regarding datastructures in both Java and C++, but I don't remember them as being the courses me and my fellow students failed. No, in the first year of my curriculum it was a combination of three courses that can be summarized as 'computing basics' and dealt with motorola 68000 assembly, intel x86 assembly (instruction sets up to 386), slapped me in the face with registers, segments, (indirect) addressing, interrupt tables, and instructions that, say, move a byte or word from DS:[si] to AL or AX, and increments (or decrements) SI depending on the setting of DF, the direction flag, by 1 for bytes and by 2 for words, etc.



    Well, that is what I call weeding out the kids who are never going to be great programmers!

  • My 2 cents. I question why a programmer needs to be a computer science major in the first place.

  • When reading Frans Bouma's posts here and in some formusm, I always ask myself "how can it happen that this guy can get wrong what other people put so simple and clear". "He missed the point" is the most adhesive - especially with regards to Joel's article about intelectual treshold fro programmers. People customised with Java/C# only simple cannot be familiar with some concepts, simply because Java/C# these concepts do not exist ! The same like people skilled to drive a car cannot fully evaluate troubles arising when piloting an aircraft! But its is likely that a pilot can underestand what means 'driving' a car. Develop the driver=Java_programmer and pilot=Lisp_programmer analogy by yourself.

  • Pazu: sorry, but I also miss the point in your posting.

Comments have been disabled for this content.