Java Isn't The Problem

June 13, 2008


Quite a few people recently have been blaming Java for part of the downfall in current computer science (CS) graduates. While I don’t particularly like java, I’d like to go to its defence to say that teaching Java is not the real reason that a lot of CS graduates are no good these days. I know this is a touchy subject for some people so I apologise in advance if I’ve offended anyone.

It’s not about Language

To jump straight into it, the first language that students learn doesn’t have a lot to do with how good they will end up. Most of the “core languages” (Java, C#, C/C++, VB.NET etc) that you see being taught at universities allow the teaching of the core programming principles:

  • Low Level – sequence, conditions and loops
  • Mid level – functions, objects and recursion
  • Hi Level – Modular design, design patterns, API creation
  • High level optimizations – orders of complexity and algorithmic optimization

These principles cover a large amount of “learning to program” and you can teach all of them in any of the languages listed above. So what things are missing from some of these languages (particularly, Java)?

  • Pointers
  • Low level optimizations
  • How operations map down to machine code

The important point here is that these are a small subset of the skills required to program and they don’t require the first language that is taught to students to be C/C++ (or equivalent). Teaching these languages early on is definitely required; however they can easily fit outside the scope of the core introduction courses. The extra bonus from not teaching C/C++ as the first language is that it forces students to learn at least two languages during their first steps into programming and this is a good thing.

So what is the problem with CS graduates?

1. Lack of Passion

Basically it comes down to the fact that lecturers aren’t getting students passionate about programming. One of the key qualities I look for in a great programmer is their love for programming. I’ve found that the best way to get passionate about something is for someone to pass their passion on to you. The best way of doing this is through teaching. I had this very problem while at university and thankfully during my course I did some Microsoft training where our teacher’s passion was passed on to me.

It seems that lecturers are confusing fun with enjoyment/passion. Something doesn’t need to be fun for people to be passionate about it and trying to make courses “more fun” and less boring is not the right approach. The ability to create something has an almost primal feeling of enjoyment and power. Lecturers need to tap into this and get students excited and passionate about what they are creating even if it is hard work.

2. Lack of algorithms and Mathematics

One area that could easily be seen as boring is algorithms and mathematics. If not taught correctly this can certainly be true. However these are a core part of learning to program. The fact that they are language independent proves that Java is not to blame, and that they are more important than mere language choice. With a solid understanding of algorithms and mathematics, programmers can write good code in almost any language.

If algorithms and mathematics are being dropped because lecturers think they are too boring, they need to find someone that can make them exciting! To give an example, I was taught matrix math both at high school and at university. At high school I understood it straight away and had no issues with its use. At university we spent just as long learning it, however it was so convoluted that it almost confused me into forgetting what I had initially learnt. The way in which it was taught was both dry and boring, but also counter-intuitive to the average student that doesn’t have a PHD in mathematics. Any subject matter can be boring if taught badly, lecturers need to stop blaming the content and start looking at their teaching styles.

Conclusion

So the problem at the moment isn’t java but instead the courses and those creating them. I don’t think it matters what language you teach. Without creating passion, teaching core algorithms and mathematics students are never going to be good programmers.

Share:
  • Digg
  • Reddit
  • Facebook
  • del.icio.us
  • DZone
  • LinkedIn
  • email

Find Us On Facebook

  • http://www.drealmer.net/ Drealmer

    I totally agree with you, the language is not problem, but learning it in such a way that every step feels like an achievement is important. You should be able to start creating stuff early, that will leave you waiting for more and drive further learning. So I think simple languages are better to start with (sounds a like no-brainer), but we often try to teach “the right way” of doing things from the first time, and introduce complexity too early, even before students had a change to realize why a simpler approach has drawbacks. I guess this applies to about everything that can be taught.

    When I say simpler languages, I don’t mean the ones that hide complexity away, but the ones that are genuinely simple… and limited. I think that if I had to teach programming to someone in the language of my choice, I would go for Lua.

    And this reminds me of this great article : http://www.salon.com/tech/feature/2006/09/14/basic/

  • Greg

    I think you make a good point. I have certainly seen a pattern of Java history translate to poor programming skills. However, as you describe, it is likely not due to Java itself but the lack of exposure to good programming and problem solving practices. I think it is critical that programmers fully understand Low and High level programming and System Architecture, that is, how CPUs and compilers work. At the highest level, a programmer should still be able to imagine the lower level instructions and operations that will occur. I happened to learn Applesoft BASIC as my first language, self taught from books and magazines. I then spent years unlearning terrible spaghetti coding practices. My passion for computers and programming, combined with the under-performance of early hardware, let me to study anything and everything I could. I now wonder how new programmers, starting out with great IDEs, UI designers, high level languages and incredibly powerful CPUs/GPUs are effected in terms of passion, motivation and inquisitiveness, toward efficiency and betterment, when the challenge is not ever present.

  • Greg

    Once little clarification, which is critical to the way I presume Java or Java Programming must be taught… I notice Java programmers often have a process of programming that goes something like: 1) identify ALL logical Objects that might be possible in a problem 2) create a class for each one 3) implement etc. The issue here is that applying exhaustive OO concepts to any problem is not always the best solution. By best, I mean, value in terms of time and results. For example, on the CodeProject web site, you will find two algorithms for triangulating a polygon. One in Java, one in C. The Java one is made of many classes and functions, and sure, parts of the code could be re-used in future projects or extended. The C one is a single function that could be easily called from any C/C++ program. My point here is not that either is right/wrong or specifically better/worse in all contexts, but the way the programmers have gone about solving the problem. Perhaps somewhere in-between is the ‘right’ way to code, not over or under engineered, not so minimal or excessive that maintenance becomes painful. Problems require solutions, and solutions use tools, which include different languages and (argh! the old buzz word) paradigms.

  • http://www.drealmer.net/ Drealmer

    You have a point there, Greg. In the same line of toughts, I think design patterns are both the best and worse thing that ever happened to programming.

    “When the only tool you have is a hammer, everything looks like a nail”

    You only really learn when you fail, and keeping it simple makes noticing failure much easier. I keep on failing at a much higher rate than most people, I consider it to be my main strength.

  • http://dlinsin.blogspot.com david

    You are definitely right Greg, with both points! I regret not paying more attention to all the maths and algorithm classes I had and I wish I could turn back time. However, I don’t lack in passion and I think I can make everything up with being devoted to what I do – programming!

  • http://littletutorials.com Daniel

    Excellent points. The passion can come from the student but a teacher who is able to drive student’s passion is what most people need at that age. Unfortunately it seems such teachers are not so many in schools today. A passionate teacher can make any subject cool and can instill passion and respect for the subject in his students’ minds. A bored and not so interested teacher can actually kill the passion. It is indeed not Java the problem but the fact that teachers seem to find it very relaxing to teach everything using it while getting the alibi that the industry requires it.

  • J

    I’m a student myself. I think all the people/student blame tutors, but they forgot all the responsiblities of a student. What a student suppose to do? A tutor will give you directions but student need to find out where to go by themself.
    Back in time, do you remeber all your student mates were doing? I guess most of the students were spending time on drinking and playing. I think that’s the problem. Bacially they are not lack in passion, but lack of spending time on their course.

  • http://ajaxwidgets.com Thomas Hansen

    Great writeup :)
    Agree…!

  • http://www.stopcodingstartthinking.blogspot.com deltawing1

    Hey, great post! I think most of what you said is true.

    However, I just want to add a few things:

    While student passion is definately an ingredient, I think learning to be a really good programmer is more than that. Back in high school I was feverishly passionate about programming, but as I entered Uni and began doing incredibly poorly at programming subjects, I became quite depressed about it, and very frustrated, but I never lost that passion. Still, passion alone wasn’t enough for me to catch up with my peers — apparently I had fallen through the proverbial crack and had started to perform very poorly.

    Now in my 4th and final year of my CSSE course (Computer Science and Software Engineering), I’ve made a massive

  • http://www.doolwind.com Doolwind

    Drealmer-
    You post an interesting point about using a “simpler” language. Creativity is often spurred on by constraints and so having students push the boundaries of a simple language could be a great thing!

  • http://www.doolwind.com Doolwind

    Greg-
    I agree with all your points. I think the core problem here is that teaching a single style of development (eg OOP) is often a bad thing. Students should be taught the full suite of programming tools as well as in which situations each should be used.

    I gain great value from working with “old school” programmer such as yourself that didn’t have OOP crammed down their throats early on in the programming life. After completing university I could have been mistaken for thinking it was the only way to code.

  • http://www.doolwind.com Doolwind

    Daniel-

    You’re right that a poor teacher can ruin any subject. This is actually a dangerous combination with impressionable minds. I would love to start teaching kids to program as soon as possible as I believe that filling the world with great programmers will drive humanity forward.

  • http://www.doolwind.com Doolwind

    J-

    True, not all the blame is on the teachers, however I think they have more to blame than both Java and students lack of interest combined. If a student doesn’t want to learn then that isn’t the issue. Courses should weed these people out and stop them from graduating so they can move on to other, simpler careers.

  • http://www.doolwind.com Doolwind

    deltawing1-

    Perhaps self-created passion isn’t as important as teacher-guided passion? I always equated the two as being equal however you raise an interesting point that perhaps the self-created passion just isn’t enough. I know of a few programmers who taught themselves all they knew, passionately, and ended up with bad habits and not being great programmers.

    Certainly passion alone won’t help you to catch up, however combined with some good education I think the majority of ingredients are present to create a great programmer.

  • http://www.stopcodingstartthinking.blogspot.com deltawing1

    EDIT: Sorry! I accidently presssed Submit before finishing the post. Anyway I got a tad carried away with this post … sorry lol. As you can see I like writing!

    —————————————–

    Hey, great post! Although I need to disagree a bit :-)

    While student passion and math are somewhat important, for many people it takes more than that. Back in high school I was feverishly passionate about programming. As I entered University and began doing incredibly poorly at programming subjects, I became quite depressed about it, and hugely frustrated, but I never lost that passion and yet continued to do poorly.

    Passion alone wasn’t enough for me to catch up with my peers — apparently I had fallen through the proverbial crack and had started to perform extremely poorly, a huge contrast from my high school days.

    As my CSSE (Computer Science and Software Engineering) course progressed, I made a massive effort to turn things around. What I figured out was that my problem had absolutely nothing to do with my interest and passion, nor did it have anything to do with me being crap at maths. It had *everything* to do with my learning skills and time management.

    Now, learning is MY responsibility, but I think it’s necessary to place at least some blame on the University’s teaching methods. One of the problems is that teachers at University don’t teach you HOW to learn. They give you an assignment and you spend a huge amount of time doing it. You do it all wrong and you hand it. The teacher sometimes gives feedback of WHERE you went wrong. The feedback told me WHAT criteria I hadn’t fulfilled, but never told me WHY something was wrong and HOW I should have done it. So, the feedback was utterly useless.

    I had passion, and I had the best intentions and attitudes towards learning; but despite that, I simply didn’t know HOW to learn, and no teachers would give advice about it!

    For me, the issue has nothing to do with passion or maths. It has to do with learning skills. Unfortunately University teachers (in computer science courses anyway) tend to teach objectively and totally ignore the fact that different students have different learning styles.

    After discovering the root of the problem and addressing it, I began seeing increases in my performance. I’m going to graduate with a double degree soon! :)

    By the way, I found a very interesting ECOOP paper. If you didn’t read my comment, at least read this! It’s about objective vs. constructive teaching methods. You can download it in PDF or DOC format at the bottom of the page.
    http://www.strath.ac.uk/cis/cisnews/improvingthementalmodelsheldbynoviceprogrammers/

  • http://www.stopcodingstartthinking.blogspot.com deltawing1

    Doolwind-

    I just wanted to clarify something — in my post I talked only about what was important to *me*

    I’m sure that for many others a firm grounding in maths along with passion are far more important than the stuff I talked about :)

    Again, great article!

  • cowlibob

    People learn from more than their teacher. People learn from each other. The best experience I got from University was doing group projects and learning from other people. Each person has a different way of learning and I found this way more productive way to learn. The only way to learn if your up to speed with your peers is to develop with them. This usually stops bad habits because the programmer is usually mocked until they start adopting a better practice. This works the same at my job.

  • http://www.ericdelabar.com/ Eric DeLabar

    First let me say that I love Java, I’m a professional Java developer, so I live it every day. I also learned Java as my first language (well, if you don’t count self-taught qbasic and vb). However, I think Java does a little too much hand-holding to really learn how to program. They should teach as many programming languages in school as physically possible in the time frame. Definitely ASM, Lisp/Scheme are also great, some scripting languages to learn to deal with a lack of strictly defined rules, and a little low-level C to see what it’s like to have the programming power to seriously mess up a PC. Beyond that, we need a good 100-level course to weed out the people who don’t have the passion to be an asset to this industry.

  • koryuko

    I owe my current job (now) to my interest in learning java before. I must admit, i’m quite a late bloomer. The first programming language i learned in school was pascal, and that was the time i first realized what i wanted .But when i went to college, i lost all that interest. It isn’t because how the programming subjects were taught, or how the instructors look like (laughs), but because i didn’t spend most of my time hoaning my interest and so it died.At the later part of college, i joined one of the java conferences held by an IT institute near our school, I went and later on, i ended up taking their scholarship exam for a java crash course. It was a blast.
    I can not imagine myself now if i never gave java a chance. I’m not a java programmer whatsoever( because when i had my “job-hunting”, i looked for companies that will get me to jump-start my career, there was no “java hiring companies” that time.. at least in our city) , my “training-ground” company offered the ms-language that resembles
    java, it went out good, and now i’m learning more.
    I guess to those of you, students or not , who thinks that the “language” or “java” is the problem, think again, ask yourself, Is it? or Is it i?.. Remember, the computer doesn’t have brain, you do. :)

  • http://www.blog.knolif.com/ David

    I’ve been self teaching myself how to program in java and use OOP. And I agree that passion is needed to maintain sanity when faced with the the endless trials and errors in getting a single thing to work. In my opinion the fun factor should be a side effect rather than a goal of learning and the achievement of finally getting a facet of a game like a projectile to move can be very rewarding.

    I totally agree that the way you are learn something can ruin it, it is one reason I zoned out every time one of my teachers in high school started talking. I also agree that it is not java that is the problem, as I’m assured that if they taught with anything else the downfall would still have occurred.

    Every language has its own quirks and flavors, if Java does not appeal to their tastes and needs then they can just learn a different language as I am doing.