What is the Big Deal With Java?

What is the big deal with Java?
I teach at a public school of excellence that can best be described as a magnet school for the state. We are currently in our recruiting season where we have information sessions and students visiting for the day. I feel like I am constantly on defense when I tell prospective students (and their parents) that the language we use in our course is Racket, formerly Scheme. I tell them the reasons why we use Racket: that it is an incredibly effective introductory language with simple syntax. I also explain that in their second year with us, when they are seniors taking courses at Worcester Polytechnic Institute, they will use Racket in their introductory freshman CS course. I explain that language is irrelevant, that what they are learning is how to problem solve using a particular tool. I tell them that they are 11th graders in high school and that they will have many years to learn many languages, but the concepts are what are important.
Often, I experience the prospective student who has taught himself Java and has programmed numerous advanced programs. He looks at me dumbstruck, like I just dashed all his dreams by telling him he’ll be learning an obscure language that is not used by Apple and Microsoft and Electronic Arts so why would it ever be useful.
The students who seem to get the most out of the course are the ones who don’t have any pre-conceived notions of programming, who have heard of Java and C++ but don’t really have a clue what those terms mean. I think many of the experienced programmers just feel as if they are biding their time to get through my course in order to move on to the more mainstream languages they’ll learn at WPI and in college. They don’t see it as an opportunity to learn something new, but a penance they have to bear to move on. I do get the occasional uh-huh moment with some students when they finally see some of the benefits of a functional language like Racket. But those are few.
What has been your experience with choosing a language to teach?
I know introductory language choices are up for discussion on many CS education listservs.
Do you have any thoughts on talking points that I can use with my students?
Karen Lang
CSTA Board of Directors

6 thoughts on “What is the Big Deal With Java?

  1. Hi, I’m currently deciding what course to take and so far I chose IT courses so that I could learn JAVA. I guess, like you said, it’s not only relying in one type of programming language, as long as you have the analytical skills to program – then you can learn any type of language. I appreciate the blog post, this has broadened my horizon a bit.

  2. I used to have the same problem, particularly when I was first teaching Perl. I could make a case that Java is inadvisable for most middle school students, but they wanted to know why not Python or Ruby.
    Like you I pointed out that I wasn’t preparing students for the workplace but for high school, so them learning to think well is much more important than them knowing one particular tool.
    Sadly I’ve seen this for years, from way back when I was at Indiana University and they used scheme for the intro courses, much to the unhappiness of the students who seemed to want workplace skills not thinking skills. And honestly, I’ve seen workplaces who hire from particular universities and not others because of the language that university uses – they don’t want to have to give new employees the time to learn a new language, I guess.
    The only approach I’ve seen meet with happiness is a hybrid, such as using Racket as an introduction before Java. Racket is very successful and a real esteem-booster for students who’ve never programmed before because the experienced students with a big attitude have to learn it right alongside them and they discover they’re not so bad at this programming thing. But then switching to Java seems to make everyone happy, since they feel it’s “useful.”

  3. I think each teacher has a personal or institutional strategy to teach programming, also depends what kind of jobs are at local context. I like teach with Java because there are a lot of didactic work around to understand some useful concepts. For example, I would like teaching GUI with SWING cause a lot of concepts and beautiful architecture they learn, and in fact I know maybe Java is not so good for GUI’s.

  4. People will defend their favorite language with religious fury. That goes with the territory. But here are two realities that will make even the most staunch advocate think twice about defending Java.
    1. We need to learn functional programming, and learning functional programming first is a lot easier than coming to it from an imperative language such as Java. Concurrent programming is an important skill to learn, as we want our programs to be able to run in parallel on multiple processors. Java can run concurrently, as Brian Goetz’s excellent book “Java Concurrency in Practice” demonstrates. But writing and maintaining concurrent programs in Java is about as fun as a root canal. Why make your life so difficult for yourself? Functional programming offers immutable variables and functions without side effects, greatly reducing the complexity of your program.
    A powerful example is given by the engineers at Twitter, as demonstrated in the article “Twitter on Scala” (http://www.artima.com/scalazine/articles/twitter_on_scala.html). Twitter moved from Ruby to Scala with the intent to make Twitter scale better. But the Twitter engineers admit they had troubles adapting to the functional aspects of Scala. An engineer who knows and understands functional programming as well as object-oriented/imperative programing is highly valuable. And it is easier to learn functional first.
    2. Java is a bloated, outdated language. Java syntax is designed to be an easy conversion for C++ and Objective C programmers. Java maintains all the verbosity and inefficiencies of those languages. Further, as new features were added to Java, syntax had to be retrofitted – becoming even more cumbersome. A prime example is generics.
    If not from a pedagogical perspective, then at least as a favor to students – use the time in school to learn something useful. The verbosity in Java doesn’t provide any value. Learn the more powerful tools first, then come back and code in the weaker language if the situation (such as a job) requires.
    Teach functional programming first – and Racket is an excellent choice. Then move to a more powerful object-oriented language with functional aspects. Scala is a good choice. But if it has to be Java, first go to Groovy, then back off to Java. I guarantee that the Java enthusiast will wince at going back to Java after having programmed in Groovy.

  5. I teach high school CS in a small charter school grade 7-12 (400 students total). All of my 7th graders learn at least a little HTML- enough to put a picture on a page and format a little text. I offer a more advanced web development elective for all grades 7-12 that covers HTML and JavaScript; we hand code everything up to a calculator in notepad. Yes, they need help, but they all know by the end of the semester what it is like to write syntactically correct code and what computer science is like. If the students are still intrigued and I think they have potential, we learn traditional Java after that. I find this to be a fairly friendly way to learn to code. I also teach a multimedia course in which I have the students work through a couple of GameMaker tutorials. That experience is a pretty quick cure for the vast majority of the game-designer wanna-be’s.

Leave a Reply