Slashdot Mirror


Followup On Java As "Damaging" To Students

hedley writes "A prior article on the damage Java does to CS education was discussed here recently. There was substantial feedback and the mailbox of one of the authors, Prof Dewar, also has been filled with mainly positive responses. In this followup to the article, Prof. Dewar clarifies his position on Java. In his view the core of the problem is universities 'dumbing down programs, hoping to make them more accessible and popular. Aspects of curriculum that are too demanding, or perceived as tedious, are downplayed in favor of simplified material that attracts a larger enrollment.'"

20 of 626 comments (clear)

  1. @_@ by Ojuice · · Score: 5, Funny

    I started with Java and I turned out just fine.

    1. Re:@_@ by ushering05401 · · Score: 5, Insightful

      While this point may be valid, it's not like CS degrees were assurances of any level of competence anytime in my recent memory (I've spent about 15 years in IT).

      About all I can suggest is that students who are inclined to supplement their educations through their own creative pursuits will continue to surpass those who treat CS simply as a profitable skill set. If anything, simplifying CS courses will assist potential employers in identifying those who aspire to excellence in the field and those who are merely pursuing a career.

    2. Re:@_@ by M.+Baranczak · · Score: 5, Informative

      Exactly. If I recall, he was mainly talking about the fact that low-level system concepts aren't being taught. Java was only incidental to the argument, but the /. summary made it seem like another stupid language flamewar. Java is a high-level language: of course you won't be using it to write kernel code.

    3. Re:@_@ by AKAImBatman · · Score: 5, Insightful

      It would be amazing if people actually read the article every once in a while. :-/

      I make a living as a Java programmer. I enjoy the work I do and feel that no other language/platform can even touch Java's capabilities in team and enterprise development. Even for single-programmer development, there are a lot of situations where Java is the solution to end all solutions.

      That being said, I agree with the article.

      As the author tried to explain, programmers need a solid foundation in data structures and algorithms before they should even begin looking at Java. The specific problem he calls out (which I actually feel only scratches the surface) is that Java offers such a featureful API that the programmer isn't forced to learn the basics. He is able to simply use a Hashtable, a Sort, a LinkedList, or whatever he needs without understanding why it works. Which is a very dangerous thing for someone training to be a Computer Scientist.

      A much better approach is to force the student to work through lower-level programming before ever reaching a modern layer that abstracts everything away. Otherwise the student is liable to shoot himself in the foot at a much later date. (Primarily due to a lack of knowledge.) This is very comparable to many sports where expensive, advanced equipment can be an asset to a well-trained athlete. But in the hands of an amateur, the attributes that make the equipment powerful becomes liabilities - and even barriers! - to the athlete's success.

    4. Re:@_@ by AKAImBatman · · Score: 5, Insightful

      But when it comes to serious applications for big iron, Java just ain't it.

      You'll have to forgive me, but I must raise an eyebrow at this. While the (generically speaking) Java Platform has many potential homes, it has found no better home for its technology than on big iron. Its straightforward design allows for the Virtual Machine to automatically adapt to memory, processors, and optimize away sections of code at runtime in ways that a static compiler will never be able to match. In addition, Java's natural fault tolerance allows for complex multiuser applications that provide logical firewalls between each user. Except in cases of poorly designed code (extremely poorly!), no single user can take down the entire application.

      If anything, Java is the ideal solution for Big Iron usage. Which is why I must ask you to clarify. There are certainly super-computing applications where Java is a poor fit. This is due the non-standard low-level design of the hardware that requires a completely different toolkit to take advantage of. (Like it or not Cell is a prime example of this environment.) Other than that exception, though, I have a hard time imagining where Java would be ill suited for Big Iron work.

      I guess what I'm suggesting is that Java is a great language for non-programmers to learn to get a task done quickly and painlessly.

      I vehemently disagree with this statement. I deal with the incredible task of training amateurs on a regular basis. (Some are even degreed-idiots.) VB is friendly to these amateurs. PHP is friendly to these amateurs. .NET is friendly to these amateurs. Java is anything but friendly to someone who can't figure out how to setup their classpath. Even worse, the APIs are ripe for extremity destruction. Nothing says "I don't know what I'm doing" like a coder not using a data structure when it's available, using the wrong data structure (Ouch! My memory! Ouch! My CPU time! Ouch! My I/O!), or simply developing a massive megastructure of code to replicate (badly) something that should take 10 lines of code for anyone who bothered to read the JavaDocs!

      As I said, Java is a wonderful tool in the hands of an experienced programmer who knows what it is capable of. In the hands of an amateur or (sometimes worse!) an old hand who's not used to the tools that Java offers, using Java in your project is like asking for your company to be nuked from orbit.

      I hope you don't take offense at this, I'm simply pointing out where the language's strengths really apply.

      I'm not offended. I'm merely perplexed. You sound like the type of fellow who should have a solid understanding of the platform. So perhaps I am merely misunderstanding your statements?
    5. Re:@_@ by AKAImBatman · · Score: 4, Insightful

      a CS prof can require assignments to NOT USE Hashtable, Maps etc.

      An excellent point, which does indeed refute the authors' argument. To furhter back your comment, I've done advanced algorithms in Java before; sometimes as just a learning experience. There are no barriers to going low-level if you want to. However, I did mention that I felt that their argument only scratched the surface. ;-)

      My own argument tends to go farther down the line to the point of obtaining an understanding of how to code in the first place. What I have found is that a new programmer rarely knows how to put one line of code in front of another. (Yes, the mere logic of ordering statements often escapes them.) Introducing a new programmer to an object oriented environment at an early stage forces them to think in terms of "magic".

      "Yeah, don't worry about that 'public class HelloWorld' bit. We'll get to that later."

      "Trust me. You need to have that import in your code. Otherwise it won't work."

      "We'll get to that main() method later."

      "Why System.out.println? Don't worry, you'll understand that once you understand objects and fields and methods. For now we're just compiling a simple [ed: *cough*] Hello World program."

      If these barriers were truly debilitating to a student, then we wouldn't have a problem. They'd learn what they needed to know along the way. Unfortunately, these barriers are far more insidious than that. The student knows this magic works without understanding how it works. So he's able to coast through a variety of tasks without ever worrying about it. Then when he gets to the real world... oops. You mean that wasn't actually magic? I needed to know what that did? But all I ever learned was some control structures! My professor didn't even make me format my code properly!

      *sigh*

      That's the scene I see far too often. A good programmer can't do a good job unless he knows why he's doing it.

      "But AKAImBatman," you say. "Won't most kids going into school these days have prior exposure to programming?"

      You are correct! Which makes teaching them the basics that much more important. Once again, when they muddled through as teenagers, they focused on WHAT they could do and not WHY they could do it. Code snippets and tutorials and IDEs abounded! They didn't need to KNOW what they were doing. Just fiddle enough and it will work!

      If you take things down to a low level, the majority of the students will be forced to learn or find an easier major. If they already know what you're teaching, then great! They can help with the rest of the class. But if they don't, then they're learning something priceless. Either way, the knowledge is KEY to data structures. One cannot truly understand the intent of most algorithms and data structures until he's visited the metal of the machine and tried to work with the likes of strings, memory allocation, and low-level hardware control. That's when he truly "gets it" and 40+ years of computer science suddenly SNAP into place.

      "Ohhhh, I get it! I really do! Hey, I had problem X a month ago that I could have solved if I had just..."

      Best. Sound. Evar. ;-)

      (P.S. In case you're wondering? C++ should NEVER be taught in school. Worst drain bramage you can do to a poor kid. Especially as his first language!)
    6. Re:@_@ by AKAImBatman · · Score: 4, Interesting
      While I understand where you're coming from, I think you need to understand how Java got where it did. Coders of the 80's and 90's were faced with a variety of problems on a regular basis. Problems that were wasting their coding time to the point where they spent more time trying to track down the issues than they did writing the software to begin with. Even the most experience programmer was regularly bit by these issues!

      What were they?

      • Manual memory handling lead to leaks
      • Mismanaged pointers would dive into the wrong memory by accident
      • Compiled software was difficult to debug (particularly for low-level DOS software where the debugger rarely worked)
      • Chaging a base class (C++ specific) would require a recompile of all related classes. Which invariably meant a clean and compile. (This issue was actually the origin of Java. ;))
      • Software rarely compiled across multiple platforms, much less shared binaries across platforms. Write, rewrite, #IFDEF your code like a Christmas tree, compile/test regularly least you break some other platform, yo-ho-ho it's a programmer's life for me.
      • Pay $5,000 a pop for a TARGA decoder or write your own? (Again and again and again.) Yup, that was life as a C/C++ programmer.

      Java solved these problems by looking to the most advanced technology in the industry, and packaging it in a way that was so straightforward and simple that it was the DEFINITION of the KISS principle. What were these wonders?
      • Garbage Collecting
      • Complete lack of manual memory management
      • Stack-based design
      • Easily implemented, reversible bytecode
      • Objects/Classes (there's a difference which I won't expand on here) as first-class citizens in the language.
      • Separation of Classes into dynamic code files
      • Portable bytecode
      • Abstract libraries that implemented common data structures and functionality similar to that proposed in STL

      The productivity gains from these changes were astounding! But it didn't completely replace low-level coding in C/C++. Why? Because sometimes you needed to get down to the metal to make things work well.

      Today, the JVMs have been optimized like crazy. They can automatically make a program run faster as long as you know how to work with the GC and data structures that it provides. If you fight it, your performance drops like a rock. If you don't know how to use it, you might as well be fighting it.

      Yet how is a student supposed to know what the JVM is doing if he's never had to scrounge for bytes? If he's never had a practical need for a linked list? If he's never had to implement memory management? If he doesn't have the first clue how to balance a tree? If he can't understand how a garbage collector works? If he doesn't know what a circular reference is? If he can't explain what a pointer is and how a reference is related but different to a pointer? If he doesn't even know what "Turing Complete*" means?

      Java as a tool can be sharper than any other blade. But it is a double-edged blade. If you swing it wildly, it will cut you. If you wield it like a master, it will allow you to attack your problems with precision and vigor.

      As a side note, I wonder if it isn't time to start teaching students using virtual machines that replicate the limited environments of yesteryear? Not only would it force them into solving the low-level problems, but it would also provide them with the ability to visually inspect the state of the virtual processor, memory, and I/O. Much better than a simple stack-trace, wouldn't you say? ;-)

      *Imagine a computer scientist with no knowledge of what "Turing Complete" means being assigned to design the future of computers. Frightening concept? Very. Perhaps Quantum Computing would already be here if we had a greater number of qualified scientists?
    7. Re:@_@ by Etyenne · · Score: 4, Insightful

      I am one of those passionate about IT (incidentally, I am also self-taught). While I recognize that those for whom IT (not just programming) is a passion are, in general, much more competent than those for whom IT is just a source of income, the reality is just that there are simply not enough of us. As such, I recognize that I cannot expect most of my colleagues to get excited about their job as I do, and it is all good anyway. It's really just too bad for them, I hope they have fulfilling hobbies.

      After all, the situation is not really surprising. I know very few people (if any!) that are *passionate* about accounting. Yet, millions of accountants worldwide reliably make the numbers add up. These unpassionate accountants do good services on average and make our economic system run smoothly; without them, it would collapse. I am grateful someone else is willing to do it, because I could not stand having to do it myself. Why would IT be any different?

      I am sure someone will try to invalidate my point saying the IT-as-income people have negative productivity, and hence we would be better off without them. Well, considering how few of us there are, I doubt we could make up for the horde. And I am already overworked as it is ...

      --
      :wq
  2. I started with C/C++ by KermodeBear · · Score: 5, Insightful

    When I entered college I was started on C/C++. I learned a lot about memory management, pointers, low level system calls, using system libraries, etc. Two years into college they changed everything over to Java.

    God damn, what a difference.

    To this day I am happy that I was able to have those two years of C, letting me get close to the guts of the OS, forcing me to think about what I was doing every step of the way. There is no question in my mind that it made me a better programmer in general, regardless of the language.

    I feel sorry for the people that start - then never leave - a much higher level language such as Java.

    --
    Love sees no species.
    1. Re:I started with C/C++ by StarvingSE · · Score: 4, Insightful

      I don't think it matters what language a university teaches their 1st years. Any decent curriculum will include an operating systems class which should have the low level programming assignments. My uni taught us data structures and OOP concepts with java our first year, and then we reverted back to C/C++ for the system calls, threads, etc. And any CS program that does not teach algorithms, well I don't know how they get accreditation (referring back to TFA).

      --
      I got nothin'
  3. Turn turn turn... by TheLazySci-FiAuthor · · Score: 4, Insightful

    I think there is a difference between dumbing-down and simplification.

    Really, when has a tool ruined the skill set of an industry? The worst a tool does is eliminate certain roles or industries altogether - and those who filled those roles will always complain (and sometimes revolt).

    From the study of C and Java I can say that for 90% of the tasks I've taken on I've needed no more than Java (and Java would in fact be overkill).

    This reminds me of the controversy when Feynman diagrams were first shown. These diagrams were a much simpler way of expressing complex summations - but the old-school (some pretty impressive names) felt that these diagrams were a dumbing-down and that the historical mathematics were the proper way to express these systems.

    Always a new tech will simplify something and those who have had to trudge through the complexity will shoot-down its simplicity - this happened with the GUI, and I have a feeling about 84% of you are reading this statement on a GUI desktop.

    There will always be benefits to be had from the classic way of doing things, but new tools enable people to climb to new heights. The brain only has so many cycles, If they don't need to be wasted with pointers and bleedingly-effecient machine code then save those brain cycles for algorithms and interface design.

  4. C is overkill for most people by kemushi88 · · Score: 5, Insightful

    At the University of Washington, where I am a student, the introduction programming courses teach Java. These courses seem to serve two purposes. A number of majors outside of computer science require them for the general background knowledge of how computer languages work. They also are prerequisites to entering a CS major, so they serve to weed out people who really don't belong in a technical major. Although I don't care much for Java itself, there are a number of benefits to using it in these introductory classes. First of all, when you're working with a bunch of noobs, it is really nice to have the platform independence that Java offers. Secondly, all of the libraries, at least from my experience, are extremely well documented. But most of all, most of the people that take an introductory programming course won't ever reach the level of sophistication that C requires, so teaching C would be kind of overkill. And those of us who really will continue on to work requiring C, really shouldn't have a problem learning it.

  5. Truth by p0tat03 · · Score: 4, Interesting

    I'm in one of Canada's biggest CS schools, and though I'm in engineering, I really do feel sorry for them. Many of the toughest courses in that program are now optional, and one can cruise by and get a degree only knowing the most basic algorithms (quick sort?) and data structures. Naturally, the only people who take the original challenging courses are the alpha geeks who live for that kind of stuff anyway.

    Meanwhile people come out of the doors of this school knowing only Java and .NET, and then complain that the world of programming was not as interesting as promised. Hmm.

    On the other hand, I'm in an electrical engineering-like program, and we only deal with assembly, C, and maybe C++ on the odd occasion. I love it. IMHO any self respecting programmer needs to at least KNOW how to operate close to the metal, if only so it makes them a better coder at the higher levels.

  6. What a "BS" degree really is by bradgoodman · · Score: 4, Insightful

    The curriculum in a BS program, as I have always understood it - isn't designed to necessarily prepare you to enter the workforce with all the "hands-on" technical skills - no matter what discipline its in.

    If you're to learn "hands-on" skills to apply towards work, that's what an associates degree, or trade-school is about

    Look at it this way - if the world went post-apocalyptic tomorrow, and everyone "knew Java", we'd all be screwed, because no-one would understand all the theory and crap behind compiler design, OS design, carnal maps, finite automina and all the other "fundamentals" on which everything is built. Just like if everyone got their ACE automotive technicians certificates, we'd have no one who knew how to design the cars.

    Now I'm not saying that universities don't try to balance out the BS curriculum with real-world, practical stuff - of course they do - but that's the idea.

    In my view, school gives you the foundation, and it's up to you to apply it. Reality is, once you get out there, any specific tools, languages, etc. change so fast anyway - a BS degree teaches the foundation, and its up to you to build on it

    Disclaimer: I'm an EE drop out - basically completely self-taught - the same rules apply - know the foundation - and your own your own from there.

    1. Re:What a "BS" degree really is by GregAllen · · Score: 4, Funny

      I'm assuming you mean Karnaugh maps. Although I'll be the first to admit that carnal maps sound pretty intriguing to the lonely engineer type. :)

      --
      Please help find my missing daughter: FindSabrina.org
  7. nonsense by j0nb0y · · Score: 4, Interesting

    I was taught how to handle pointers in QBASIC when I was in junior high.

    The assignment was to implement a linked list. The instructor had us initialize an array which represented our memory block. The program then had to perform all the standard linked list operations, handling memory allocation and all that crap.

    The choice of language may seem odd, but consider that QBASIC is what we had available. All our DOS computers already had QBASIC on them, and we could use it without having to shell out the big bucks for a C/C++ compiler (none of us was aware of DJGPP at the time, though I later used DJGPP to teach myself C++).

    Now, if the problem is that students aren't being taught memory management, then that is obviously a problem, no matter what language is being used.

    --
    If you had super powers, would you use them for good, or for awesome?
  8. Programming is different by Weaselmancer · · Score: 4, Insightful

    This reminds me of the controversy when Feynman diagrams were first shown. These diagrams were a much simpler way of expressing complex summations - but the old-school (some pretty impressive names) felt that these diagrams were a dumbing-down and that the historical mathematics were the proper way to express these systems.

    Feynman diagrams are just another way of looking at things. It's another viewpoint of the same thing.

    Java and C don't map so well. There are some things for which only C makes sense currently, such as driver development. Java is a virtual machine. Although it's possible to beat, mangle, and force java into submission and make it do those things, that's not what it's for. All those JNI libraries that Java needs to actually talk to your machine - they're written in C. AFAIK, nobody is writing an OS or even drivers in Java. I'd even bet that the first few implementations of Java were written in C/C++.

    When Java is the first thing you learn, you learn sloppy IMHO. You just assume there is a garbage collector. You can allocate whatever you want, whenever you want, and not have to think about scope. If you ever do have to do some system work later on in your career - all of these notions will be new. You'll have to think about pointers, and the size of an object in memory, and how long you should hold on to it before you free up that memory. You'll suffer serious setbacks when it's time to program down to the wire.

    Java is a beautiful language - my personal favorite - for application development, but application development isn't all there is.

    --
    Weaselmancer
    rediculous.
  9. Better to teach them English Lit.? by PeanutButterBreath · · Score: 4, Interesting

    I am one of those "fake" programmers building web and database apps with VB, ASP, JavaScript and the like. FWIW, have I never referred to myself as a "programmer" of any type, as I suck at math and have no formal training in CS. I just use tools that are easily accessible and best allow me to make myself a more valuable to my employers. Every once and a while I get the bug to read-up on something like C++ or even Assembly but it is soon obvious that these are not relevant to the problems I was trying to solve and I would rather do other things with my time.

    The author strikes me as a typical "You kids have it easy -- I used to walk to school in the snow uphill both ways" type who resents the fact that his formative experiences are no longer relevant. How does the field progress if everyone is forced to retrace the same steps from the same start point? That is not to say that his specific concerns are invalid. But it seems to me that the evolving state of software requires a broader range of programmers. If Java introduces people who will never become excellent programmers to programming concepts, why is that a bad thing? There are many roles to play, and hardcore math geeks can't fill them all. Rather than chase everyone else out of the field, perhaps the next step is for schools to adpot a more sophisitcated approach to organizing their CS programs.

    I see an advantage in distributing programming skills as widely as possible. Being able to create my own tools makes me much more useful to my employers, and the combination of business knowledge and programming knowledge make my overall skillset more difficult to outsource. Win-win. Even a programmer who "only" knows Java is infinitely more useful to society than a technophobe with a Liberal Arts degree (speaking as a non-technophobe with a Liberal Arts degree).

  10. the right tool for the right purpose... by DrEasy · · Score: 4, Insightful

    Both C and Java have their purposes. I'd use C to teach pointers, memory management, recursion and maybe even complex data structures and algorithms. I'd use Java to teach OO. I would also go back to C when teaching operating systems, and to Java when teaching design patterns and software development methodologies. But I believe that neither should be used as an intro to programming.

    The first course on programming is where you can turn off a lot of students if the language gets in the way (weird syntax, a compiler with cryptic error messages, a mammoth virtual machine, etc.). If all you want is teach variables, conditions, loops, and simple data structures in order to solve simple problems, why not use something like Python, Pascal or Scheme? Let's please leave concerns like the understanding of computer architecture and efficiency (C) and software engineering (Java) for later courses. The C-centric crowd needs to understand that Turing is not married to von Neuman: understanding of pointers is not necessary for computing and algorithm design (hello Lisp?). The Java-centric crowd needs to understand that, for some, programming is just a tool (for problem-solving) and not a discipline (software engineering).

    And this does NOT mean I'm promoting the dilution of the curriculum. In fact, because students would get up to speed faster, you could solve more complex problems earlier, and actually hit those issues of efficiency and code reuse that C and Java are respectively supposed to solve. They will then be ready to enjoy and understand those courses that follow.

    --
    "In our tactical decisions, we are operating contrary to our strategic interest."
  11. Java is suitable for teaching CS just as C/C++ is by master_p · · Score: 4, Interesting

    There is nothing that makes Java unsuitable for learning algorithms and data structures. The fact that Java comes with a set of prefabricated components does not mean that it can not be used for such a task. C++ and Java have exactly the same algorithmic issues, because Java, despite what others may have said, is essentially C++ with a garbage collector and all objects allocatable on the heap. Java also has pointers; it's not possible to say "I know Java but not pointers", because even the language itself admits it has pointers: it throws a null pointer exception when a pointer is null. There is also a little bit of memory management thrown in, in the sense that pointers must be nullified as soon as possible so as that the collector clears unused objects.

    Java has some advantages over C++ that are important for teaching programming: it has an established set of patterns that all libraries use, whereas in C++ there is no discipline, anyone can make anything in any way possible. For example, many Java libraries use the listener pattern.

    Java treats exceptions correctly (despite of being boring to having to program around them), where is in C++ exceptions are not used, although they are available a long time now.

    Another advantage of Java is its typing system, which covers a great spectrum of typing systems: it is strong, it is static, but it is also a little bit of dynamic when one uses interfaces. It's very important, and since OO is dominant these years and for the future, it's a very important aspect and Java is the best environment to teach and experiment on these issues.

    Java is also suitable for teaching concurrent programming, due to its support for threads. In fact, a Swing programmer must already know threads, because a Swing application is already threaded right from the start.

    So what is left? low-level system calls and system libraries are operating system-specific tasks, and have no place in the programming course, unless the course is about kernel programming. Manual memory management is a C/C++ specific task, so unless someone is required to program in those languages, it's not a requirement for today's majority of applications.

    So, in conclusion, I believe that there is nothing wrong with teaching Java. I think the core of the problem is that they don't teach the fundamentals of programming (algorithms and data structures), not the language itself.