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.'"

14 of 626 comments (clear)

  1. Get that college credit by snappyjack · · Score: 3, Interesting

    It doesn't help that the only Advanced Placement computer science courses in high school are based on Java. If it's really a problem, it should be addressed here first. Never really did see why they moved away fro C++.

  2. 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.

  3. Re:I started with C/C++ by mcrbids · · Score: 3, Interesting

    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.

    Reminds me of the debate I often see in aviation: "tricycle gear" vs "tail draggers". Tricycle gear planes have a steering nosewheel, and two main wheels under the wings. Tail-draggers, the "old" way, have two main wheels in the front and 1 small wheel (the "tail dragger") on the tail.

    It's considerably easier to land/takeoff in a tricycle-gear. But there are plenty of pilots who are dead-set on flying tail draggers because it makes them "a better pilot". Which, then, sparks another debate about whether or not new pilots should be taught on tail-draggers or tricycle gear.

    In short, it all comes down to whatever the student wants. They can choose which way they prefer. Myself, I learned in a tricycle gear Cessna 172, and I don't regret my decision. Flying is fun!

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  4. Does the language really matter? by HauntedCrown · · Score: 3, Interesting

    I got into University during the change from C++ to Java. The reasons that the professors gave was that they were wasting so much time with concepts that weren't critical to the class. They claimed with Java, they were able to focus on algorithms and data structures.

    In a way, they were correct. Java was used, but we didn't learn Java. It could have been any language. We went over addressing memory quite extensively, and how objects are stored 'behind the scenes'. We could have really substituted any language and had the same results. Unfortunately, the results *were* the same: some students 'got it' while others just couldn't come to terms with any of it. I suppose now they are coming to the realization that there is no good way to make a difficult subject easier. Perhaps that is why they are coming up with an IT program...

    With all that said, my university had yet to make the transition from 'everyone should know C and pointers by now' in the upper division classes. Perhaps that has been remedied now, but made things pretty difficult for those who weren't willing to put in the time. But the university is supposed to make you work, so I guess in that sense everything worked out fine.

  5. 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?
  6. Generation gap by Mr2001 · · Score: 3, Interesting

    I saw that too, and like the young engineer in the story, I also have no idea what a core stack is - despite the fact that I've been programming for nearly two decades, in environments from x86 assembly to .NET, and I know my way around a debugger. I assume he meant a call stack, maybe one saved in a core dump, but I can't help envisioning a pile of antique magnetic memory units.

    This seems like an example of the "old people have funny names for things" principle, not "Java makes you a bad programmer". I bet the young engineer wouldn't know where to buy oleo or Prince Albert in a can either, but what the hell does that prove?

    --
    Visual IRC: Fast. Powerful. Free.
  7. Starting off easy by Version6 · · Score: 3, Interesting

    My son's high school programming class starts in Python and finishes the year in Java. In previous years, they have started in Scheme. His instructor says that since they switched, he sees much more experimentation and "programming for fun".

    I started (over 40 years ago) with an Algol variant and proceeded to Fortran. (C hadn't been invented yet.) As a professional programmer with a computer science style background (as opposed to the engineering style of today--an improvement I think), Scheme appealed to my aesthetic sensibility, but especially at the high school level, making it fun is much more important. Plenty of time to "graduate" to the drudge work of Java (yes, I've been paid to use it) and the painful bugs of C (used it since 1976, sworn bitterly at it, defended it valiantly against all detractors and it's still the one I'm most proficient in).

    Basically, when I started programming, a high percentage of computer users were programmers. These days, that percentage is vanishingly small. High school and introductory college courses should reflect that and focus on basic computer concepts well-learned by being fun enough to just fiddle around with.

  8. 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).

  9. Re:@_@ by s4m7 · · Score: 3, Interesting

    Ah a fellow Article-reader. we must both be new here.

    The thing that drives me nuts about this article is that I have been making this very argument for more than 10 years now, since my family tried to push me into CS school. The simple fact is that I was already writing in assembly in early high-school, and C shortly after that. As a manager and later, as a small-business owner, I've interviewed dozens of people with CS degrees who claimed they were programmers, only to find out quickly in an interview that they haven't the foggiest clue what a compiler does, or any relevant understanding of how a data structure manages to exist. Pointers? what are those? Why did you laugh when I said GOTO? Garbage collection? That's on Thursday.

    I don't know that there will be no call for the type of programming CS programs teach today, in the future... in fact the way I see it, 70% of the apps that business runs on can be done in the "plumber at the store" style. Many of these require intimate understanding of the problem domain, which is one thing that CS used to be fairly lacking in prior to the "Java Shift". But when it comes to serious applications for big iron, Java just ain't it. 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 hope you don't take offense at this, I'm simply pointing out where the language's strengths really apply.

    --
    This comment is fully compliant with RFC 527.
  10. 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?
  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.

  12. Re:@_@ by sydneyfong · · Score: 3, Interesting

    The advantage to java is that it's safer to make errors there. Screw up with a reference, and you get a nice stacktrace. In C/C++, your program just dies (you can get a debugger on there, sure, but 1st year students are rarely taught debugging skills). "Safer"? Unless the student is going to write any mission critical programs (during the course), there's no "unsafe" errors. Sure you'll get quite a few SEGV (I ran into these more often than not when learning C), but it provides a more rigid foundation than the "safer" Java which sometimes hides away problems that one might otherwise be able to spot with C/C++. Printing a stacktrace with a debugger isn't really that hard. And it's a bit shorter than your average Java stacktrace, which is a plus. (And if "debugging skills" are not taught in the first year... when should it be???)

    That said, Java's good for getting someone into the proper habits of programming. Let them cut their teeth there - make their typos, basic logic mistakes, etc in a safer sandbox. Teach them how to print out debug statements early to understand what's going on, and to identify what mistakes they often make. When they know how to properly type in a loop construct and declare/invoke a function, then let them play with pointers. I think Java actually makes it hard to do these things. Print out debug statements? When I first saw Java code I almost screamed at "System.out.println"... wtf? Besides, from what I know most Java programming courses provide a "friendly" GUI Framework, which has its own obscure classes and methods of doing I/O. Compare that with printf/cout, and you get what I mean.

    Besides, the problem with Java is that it has a very rigid (i.e. inflexible) programming paradigm. There are many programs which are not best modeled by OOP, and this includes the procedural iterative programs that a student will most probably begin with. I've always wondered how instructors were able to explain away "public static void main(String args[]) { ... }". Some magic incantation?

    I agree that C/C++ is too heavy on pointers and SEGV happy, but at least you can hide away those problems if you choose the right subset of C++ to teach.
    --
    Don't quote me on this.
  13. Re:@_@ by daem0n1x · · Score: 3, Interesting

    I had a great microprocessor teacher at college. He would use the Socratic method, not telling people how things are done but asking people and slowly building knowledge using the answers.

    His classes were great. He would start by drawing some components on the board and then asking people how to connect them for some purpose. Some students would suggest things, he would ask the others if they could find a flaw, and so on. Many times he would follow a wrong idea on purpose so that the students could find the flaw by themselves some steps ahead. Then he would erase everything back to the bad idea and start again from there.

    In the end of each class we would have a full circuit drawn and the greatest thing was, the teacher didn't explain it to us, we created the solution by ourselves.

    I loved his classes but almost every one of my colleagues hated the teacher's guts. They preferred to be spoon-fed with information, and that teacher committed the worst of sins: make them think.

  14. Re:@_@ by smilindog2000 · · Score: 3, Interesting

    Spoken like someone without much math experience. Until you get *past* diff-Eq, virtually all useful continuous math is wrote memorization (except perhaps proofs...that's mostly covered in geometry). Further, it's pretty much all memorization of algorithms. If you're not teaching algorithms, you're not teaching kids to understand math.

    Well, I see we'll just have to agree to disagree. Math was my favorite subject at Berkeley, and even though I got an EECS degree, I took a math course ever semester. I was part of the math club, and frankly just love it. I have a patent on super-fast simulation of diff-eqs using backwards trapezoid with direct computation of the future point. I was the first person to ever create a commercially usable version of asymptotic waveform analysis - AWE (which is not as good as the patent I linked to). I dabble in high-frequency transformer design because it uses cool 3-D optimization techniques. Anyway, trust me, I like math, though I'm just an engineer.

    If China and India and Singapore want to churn out clones who can mimic smart people well enough to repeat their work, let them. To continue leading, we need creativity, not the arts/literature kind, and it needs to be nourished in children. I strongly disagree that prior to diff-eqs, math should be mostly rote memorization. Math can be fun and creative starting in Kindergarten. My kids go to Montessori school, where they teach the why's before the how's. It's not for everyone, but it certainly is for me in my family. Unfortunately, with "No child left behind", our country is headed in the exact wrong direction, focusing on the how's rather than the why's.
    --
    Beer is proof that God loves us, and wants us to be happy.