Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Education Programming IT Technology

Followup On Java As "Damaging" To Students 626

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.'"
This discussion has been archived. No new comments can be posted.

Followup On Java As "Damaging" To Students

Comments Filter:
  • "Core stack"? (Score:2, Interesting)

    by mrami ( 664567 ) on Monday January 21, 2008 @11:03PM (#22133470) Homepage

    The older worker suggested that the young engineer check the core stack to see about a problem, but unfortunately, "he'd never heard of a core stack."

    Core stack? What the heck's a core stack? Does that mean get a backtrace out of a core dump?

  • by snappyjack ( 1147601 ) on Monday January 21, 2008 @11:03PM (#22133480)
    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++.
  • Could be worse (Score:1, Interesting)

    by Anonymous Coward on Monday January 21, 2008 @11:03PM (#22133484)
    Imagine teaching MapReduce in Java.
  • Truth (Score:5, Interesting)

    by p0tat03 ( 985078 ) on Monday January 21, 2008 @11:10PM (#22133516)

    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.

  • by mcrbids ( 148650 ) on Monday January 21, 2008 @11:19PM (#22133578) Journal
    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!
  • by HauntedCrown ( 692361 ) on Monday January 21, 2008 @11:20PM (#22133580)
    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.
  • by giminy ( 94188 ) on Monday January 21, 2008 @11:23PM (#22133618) Homepage Journal
    You know, I started thinking the same thing a few months ago. I learned to program with Pascal, then BASIC (basic sucked, but it's what they taught in high school), then C, Scheme, C++, and finally Java/C# (these two only in the last year or two). I've been primarily a unix guy in the past, but I actually had a job interview at Microsoft, maybe a year ago. I asked my interviewers technical questions, too. One question that I like asking is, what does an object method look like in memory versus a static method? Most of my interviewers at MS could not answer the question, which I found telling. They're certainly wizards with algorithms and code optimization, but hadn't gone into much depth in how what they're doing actually works in memory. I find a lot of OO programmers don't know what a function pointer is, even though they use them with every new line of code.

    I definitely think that learning low-level languages first is the way to go. I do learn a lot of new stuff every day from my younger coworkers who have been using Java since day 1 (mostly programming paradigms and weird stuff in the libraries), but I find myself teaching them a lot as well -- and quite basic stuff too, like what thread an event fired by hardware will run in in their .net code ;-).
  • Its not 42? (Score:2, Interesting)

    by LaskoVortex ( 1153471 ) on Monday January 21, 2008 @11:24PM (#22133626)
    CS should be made as difficult as possible to keep the numbers of graduates low. This may not be what CS department officials want to hear, but it would be the right thing to do. Right now, the biomedical sciences suffer from a serious glut of highly trained PhDs that find they need to extend training by 4 to 8 years as "post-docs" without solid prospects for long term employment.

    While this may be great for the advancement of science, it makes for a pretty bad professional situation for scientists who still looking for work in 2-year appointments at the age of 35+. Moreover, average biomedical post-doc salaries are less than what a fresh BS in engineering would make. Biomedical sciences have suffered from an overabundance of training funds and from a drive for departments to have cheap labor in the form of hard working grad students chasing the carrot of a PhD. So they (1) outsource lecturing to part time lecturers, (2) train more biomedical scientists, (3) shrink the size of permanent faculty. Moreover pressures from tightening NIH funds exacerbate these problems.

    In short, training should not be easy or overly encouraged. Colleges should provide training based on market needs and discourage weaker students from saturating highly technical fields.

    If CS departments can weed out potential programmers by making their curricula tougher, they should really do it. This would ensure that CS people were actually talented and devoted to the trade and that compensation in the future would remain commensurate with training, unlike in the situation in the biomedical sciences.
  • nonsense (Score:5, Interesting)

    by j0nb0y ( 107699 ) <jonboy300@@@yahoo...com> on Monday January 21, 2008 @11:32PM (#22133674) Homepage
    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.
  • Re:Turn turn turn... (Score:3, Interesting)

    by Secret Rabbit ( 914973 ) on Monday January 21, 2008 @11:52PM (#22133796) Journal
    You're arguing that what goes on at College should be going on at Universities. This is very very wrong.

    Java is fine to learn at College because of the reasons you cited i.e. the purpose is to get people actually building things that is relevant to industry.

    Java is a horror at University because learning to code is NOT its primary (or secondary, or...) purpose there. The purpose of a University is to get people to be able to go onto a Masters and PhD and be able to do actual research. In this case, research in Computer Science. For this context, a programming language is just a tool to be used to really dig into an idea. And one cannot do that with Java when one is dealing with such low-level things as OS's.

    Your example of Feynman diagrams is also false and misleading. There it was about notation and practicality thereof. People will stick to what works for them and those "big names" that you mention already were "stuck in there ways" with the "old" notation. They PREFERRED to use the old one because they were used to it. Feynman diagrams stuck around because they conveyed the necessary information in an easier to understand way.

    Here we are talking about function. Basically, there are many many many things in the CS curriculum that require a low-level language to properly describe. This does NOT include Java. There is also a level of detail of thinking that one acquires when one programs in a lower-level language like C that one cannot get with something like Java.

    Basically, while Java makes business apps and such easier to write, it is counter productive with regards to the goals of a University CS program. But, if I'm wrong, just go ahead and show us an OS that was written in pure Java.
  • Generation gap (Score:4, Interesting)

    by Mr2001 ( 90979 ) on Monday January 21, 2008 @11:59PM (#22133862) Homepage Journal
    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?
  • Starting off easy (Score:3, Interesting)

    by Version6 ( 44041 ) on Tuesday January 22, 2008 @12:25AM (#22134038)
    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.
  • by PeanutButterBreath ( 1224570 ) on Tuesday January 22, 2008 @12:53AM (#22134238)
    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).
  • by TheCount22 ( 952106 ) on Tuesday January 22, 2008 @12:59AM (#22134276)
    Students in CS related fields need to learn low level languages! Primarily because it teaches you about the operating system the CPU, the memory etc.

    In the workplace it often makes sense to use languages like Java since it does in fact speed up the development process where program speed is not a major factor. But it is much harder for someone to go from Java to C/C++ then to go from C/C++ to Java and for that reason I think I would be a big mistake to only teach Java.

    I am also disappointed by the fact a lot of researchers in various fields limit themselves to interpreted or high level languages for writing distributed programs. They buy for example a $10 000 000 cluster running "insert interpreted/high level language name here"!!! They know nothing of C or C++ and will argue to the death that "insert interpreted/high level language name here" is faster or just as fast as C/C++. You know you have problem when your researchers dont bother researching best solutions to their problems! Btw what happened to making custom vector units for specialized algorithms using FPGA's 10x-1000x speed improvements anyone?

    At the end of the day the more you know the better your solution to a problem will be. Ideally someone in a CS or CE related field should be familiar with at least the following areas Processor Architecture, Compiler Design, Assembly, C and C++, Real-Time Programming, Operating System Development, Data Structures, Software Engineering, "insert popular high level language here".

    Seriously why should we limit ourselves to Java anyway? And could you really call yourself a Computer Engineer or Computer Scientist without knowing anything about lower level processes that are invisible in higher level languages?
  • Re:@_@ (Score:3, Interesting)

    by s4m7 ( 519684 ) on Tuesday January 22, 2008 @01:20AM (#22134390) Homepage

    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.

  • by John C Peterson ( 1204520 ) <jpeterson@western.edu> on Tuesday January 22, 2008 @02:11AM (#22134684) Homepage
    As an educator, I see the other side of this a lot. For everyone who complains about the lack of formal math in the curriculum, I see students who would never survive 2 years of calculus and yet get good jobs in the IT community. There are many students who can't handle intense data structures or low level programming but do fine as network administrators. Over the years, I've seen computer science broaden incredibly. When I was in school, it was obvious what you had to study: low level programming (assembler and Pascal), algorithms (Knuth!), graphics, theory, numerical methods, computer architecture (Bell and Newall), operating systems, some high level programming language like Lisp, and that was it for just about everyone. We always look back to the "good old days" when things were so clearly defined. I'd like to teach a more rigorous program - some catagory theory (just kidding!), some formal methods, Haskell, low level C programming, serious software engineering, whatever. But I'd lose most of my students for no good reason. If I wanted to complain about something, I'd complain about lack of communication skills among CS graduates. That's something that we can address in higher ed that really impacts everyone with a CS degree, not just some narrow part of the field. Employers should quit whining and do a better job of looking at the experience and capabilities of their applicants. You can't assume a CS degree means programming. Don't expect us to put all the things you need in the core curriculum - look hard at the advanced courses that an applicant has taken. It's not dumbing down - it's a natural expansion of the field that keeps reducing the common core in CS.
  • by WatersOfOblivion ( 1215490 ) on Tuesday January 22, 2008 @02:33AM (#22134826)

    The CS program at my University is a joke and apparently it is as I have always feared: my University is on par with CS programs at other Universities. Partially you can blame the Universities, but mostly you have to blame the students. Let me tell you why:

    I've been programming since I was 8 when my father (who has worked for IBM since before I was born) taught me C (I am now 25). My Junior year in high school (10 years ago), I stopped using Windows and started using Linux, and have never turned back because I immediately fell in love with Bash.

    When I went to school, I started as a Music Major and actually stayed one for quite a while, but I was never very good at it since, instead of practicing my sax for three hours a day like I was supposed to be doing, I was coding about six hours a day. In my first three years of college, I taught myself Java, Lisp, Ruby, and OCaml, and not just the languages but the libraries as well. I read everything I could find about algorithms, data structures, software engineering (URL, Design Patterns, etc.), compilers, theory (FSAs/PDAs/TMs), and even some true graphics programming (ray tracing). All of this I learned from the internet, completely isolated from any direct contact with other computer science professors or students. I did it because I wanted to learn it because it was interesting, and not because anyone told me I had to.

    When I realized I was going to starve as a musician I decided to get a minor in CS, since it was something I had always just done for fun, and it would look good on my resume. My first month into the minor, I was already tutoring seniors in their classes, and simultaneously laughing at how easy their assignments were and being horrified that they couldn't do them. I had done more complex projects for fun and threw away the code because I didn't think anyone would want such trivial junk. I quickly found out that I had essentially put myself through a CS degree on my own and completely by accident!

    The next semester, I changed majors, was in senior level classes and was actively involved in a research project with one of the professors. Whenever I got an assignment due in two weeks, I would complete it in class, and then spend the next two weeks implementing it in other languages and extending it to something that isn't incredibly trivial. For example, we had two weeks to implement a Turing machine, and because the majority of the class couldn't do it, it got extended to almost a month. I wear shirts from ThinkGeek and my peers don't get the jokes. When I pull up a terminal their eyes glaze over, as if I'm performing some mystical black magic.

    The point is that any and all the information for the CS degree is out there and publicly available, but the students are simply not willing to go out and find it. I think the only positive thing I have gleaned out of the CS degree is what they are stripping from the degree programs: being forced to take the advanced math classes. My math classes taught me how to think formally about something that has always been intuitive and have been the most enlightening classes I have ever taken in college!

    Whenever I get frustrated with my University or my peers, I just reread theses and remind myself that there are others out there:
    http://www.pbm.com/~lindahl/mel.html [pbm.com][The Story of Mel]
    http://www.pbm.com/~lindahl/real.programmers.html [pbm.com][Real Programmers Don't Use Pascal]

    Also, the point of the above article is by no means a new idea. Edsger Dijkstra said it over a decade ago in one of my favorite EWDs:
    http://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD1036.html [utexas.edu][On the Cruelty of Really Teaching Computer Science]

  • Re:Turn turn turn... (Score:3, Interesting)

    by jadavis ( 473492 ) on Tuesday January 22, 2008 @03:38AM (#22135196)
    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).

    The point of academia is that new problems are rare, and old problems are common but take on many forms. Java does automatic garbage collection for many objects correctly.

    But what about when your resource is something other than a few bytes of memory? What if your resource is shared among many processes, like a file, shared memory, some kind of protocol state, database connection, or session data? It's no longer good enough to just use a garbage collector, because that was only intended to collect certain types of garbage. You need to write your own, which is simple enough if you already know how existing systems work, but you are likely to make many mistakes if you go at it alone without understanding the trade-offs involved in the different garbage collection strategies.

    So just because someone writes a library, tool, or what-have-you doesn't mean that the entire class of problems disappears, it means that one manifestation of the problem has disappeared, but it will probably resurface in another form somewhere else. If you have the education to back it up, you will quickly recognize the problem and solve it. If not, you will surely make all the mistakes that people have already made in the past, and from which you never took the time to learn.
  • Re:@_@ (Score:5, Interesting)

    by AKAImBatman ( 238306 ) <akaimbatman@gmaYEATSil.com minus poet> on Tuesday January 22, 2008 @03:45AM (#22135222) Homepage Journal
    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?
  • by TheMCP ( 121589 ) on Tuesday January 22, 2008 @04:51AM (#22135546) Homepage

    Corps aren't worried about running quickly, or taking up small amounts of memory with elegant programs. They just want it released. Now. No time to dilly-dally on making "good" code, just gotta keep cranking it out. If it's slow, just up the requirements. I long for the days of assembly and low level programming...
    Okay. Let me give you an example from my career a few years ago.

    I was running an IT group in a small university. We needed a new help desk management application. It had to store various data and produce various printable reports, some just of regurgitated data and some of statistical analysis thereof. It had to have interfaces which could be used by the support technicians to log data, and by the customers to view the status of their requests and make comments. These interfaces had to be useable via the internet from several campuses, in a mixed platform environment. Commercial systems for the purpose ran at about $250,000 for the cheapest suitable application I found, and that one would require additional consulting costs for configuration (which would take a month or two between waiting for a consultant to be available and actually doing the installation and configuration) and didn't tie in with our existing relational database or single signon solutions.

    How long would this take you to program in assembly? (Hint: if your answer isn't measured in man-years, I'll laugh at you.)
    What would the cost be for all that programmer staff time? (Hint: too much.)
    How long would my team have had to go without the new application? (Hint: we would have needed it long before you'd finish.)

    It took my team of programmers one calendar month to write a java/jsp/jdbc/sql web application that met all requirements and played nicely with our existing systems and was ready for use the minute it was done. If I was doing it again today, I'd use a higher level language and probably have it working in two weeks or less. The staff time cost $10,000.

    So, the university saved $240,000+ because we had a high level language available to us. So why should I have wanted to do it in Assembly, or even C ?
  • by master_p ( 608214 ) on Tuesday January 22, 2008 @05:17AM (#22135684)
    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.
  • Re:@_@ (Score:3, Interesting)

    by Lally Singh ( 3427 ) on Tuesday January 22, 2008 @05:20AM (#22135708) Journal

    1st year students are rarely taught debugging skills

    WHY NOT?

    Only so many semester-hours in the first year, and plenty of them go to non-CS materials. And frankly, when the kids are still learning to set up a basic for loop, debugging won't help you much. Worse, it'll make kids learn to depend on a debugger for problems that they should learn to figure out themselves. I *shudder* at the thought of students single-stepping simple for loops and method invocations.

    Here's my personal history of learning to program.

    Yeah, congrats. Think of this: if you had your basic programming skills down pat before switching to lower-level techniques like pointers, linked-list implementations, etc. wouldn't it be an easier learning methodology than jumping in the deep side of the pool early?

    Yeah, some self-motivated, self-teaching programmers will go through all of it happily (you and I both did), but this is mainstream education. If we only catered to the innate hackers, we'd have a small fraction of the already-insufficient graduating CS majors we do now. Like 1/10th, easily.

    The 2nd year involves building digital circuits and programming raw-metal asm on machines without an OS.

    By the 3rd year, those same students who were spoon-fed java are writing kernel code as part of their OS class. I'll happily submit that most self-taught programmers who jumped in the deep end of the pool can't speak to that kind of advancement 2 years after writing their first line of code. The training wheels come off, but they definitely help getting the students up & running.

    Furthermore, I know plenty of kids who taught themselves to program at an early age, only to get turned off by it /because/ they got bit too hard by the stuff Java can prevent. I submit that making it easier to learn to program is a better thing than making it harder. Just b/c you make it easier to start with doesn't mean the kids are suddenly weaker for the rest of their life. More often, you end up stunting their long-term growth.
  • Re:@_@ (Score:4, Interesting)

    by sydneyfong ( 410107 ) on Tuesday January 22, 2008 @05:54AM (#22135880) Homepage Journal

    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.
  • Re:@_@ (Score:4, Interesting)

    by daem0n1x ( 748565 ) on Tuesday January 22, 2008 @06:38AM (#22136102)

    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.

  • Re:@_@ (Score:1, Interesting)

    by Anonymous Coward on Tuesday January 22, 2008 @08:43AM (#22136618)
    The concern I have with Java is that it allows a unskilled coder to develop what appears to be a secure and robust program without really understanding what they are doing. Because of this the coder doesn't realize how many holes are in their program because Java helpfully tries to fill all these holes, sometimes improperly. C or C++ on the other hand makes it fairly obvious that your program is completely full of holes.

    As as fair programmer myself (more focused on requirements by my company) I prefer to have my programs flaws laid out for me to see instead of hidden by attempts by the language to fix them but then my code goes into embedded applications in aircraft avionics, others may not care.

    (I do have to say my impression of Java may be off as its been four years since I coded with it...)

    Just my $0.02
  • Re:@_@ (Score:4, Interesting)

    by smilindog2000 ( 907665 ) <bill@billrocks.org> on Tuesday January 22, 2008 @10:07AM (#22137182) Homepage

    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 [uspto.gov] 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.

The one day you'd sell your soul for something, souls are a glut.

Working...