Previously I had written about some benefits of the Java programming language. However some people just love writing code in Java. I have worked with many of these people. They will invent up projects just to write some Java. They work extra hours as long as the app is written in Java. Craziness I tell you.

Well I read up on some reasons why people love Java. One is that there is industry standard certifications you can learn. You can tell whether somebody has a least a little Java knowledge by the certification they possess.

Java is also a popular language. You can always find a Java developer for your project. And you can find some supporters for Java in any group of developers out there. Although I have not personally experienced this, I hear Java gives good conferences.

The Java programming language is easy to learn, especially if you know an object oriented language like C++. It is a general purpose language which can fit many needs. And there is one final reason to love Java that can be summed up in one word - Eclipse. Now I won't say that I love Java just yet. But I am slowly warming up to it. I need to write some enterprise application before the final verdict is in for me.

Benefits of Java

Recently I blogged about some people hate Java. However there is another side to the story. For every person who dislikes Java, there are probably 5 who love it. I just read a discussion on what people like most about Java. I found the results to be most interesting.

A key factor in people liking Java is the run anywhere capability. To my surprise, some people also said they liked Java because it is fast. I am not sure if that referred to a fast run-time experience. Or maybe it had to do with rapid application development.

Deployment is easy with Java says some folks. I found that not to be true. However my limited experience with Java may have skewed my feelings. People also love that the libraries are well documented.

Here is something I can appreciate. Java programming makes good money. You can't argue with that. Let's hope this environment is also sustainable. Many programmers know Java. You can write Java code and expect people to be able to maintain the code.

Well there is much more love out there. I will pick up with this list in my next post.

Java History

I started learning how to code in Java this year. It is like I arrived very late to the party. I just hope the party is not over. Now it is not like I never heard about Java over the years. I just did not get into it until now.

I read a humorous post that reflected back on Java from the beginnings. There is a lot to the history. However I found many of the milestones were events that I heard about.

Java actually started out as the Oak programming language. The name was switched to Java. The Java 1 developer's conference had a mighty turn out. Version 1.1 of the JDK had JDBC for database connectivity.

Java 2.0 came out. Then there was Enterprise Java beans. I recall the C++ programmers on my project getting excited about EJBs when they first came out. Then the excitement died down. To tell the truth, I don't really know much about EJBs. I assume they are a way to store data you get from the DB.

Web services got hot in the Java world. I also recall the craze where every team on my project wanted to publish some web services. That was short lived though. I saw a metric that 75% of developers used Java back in 2003. I wonder if the number still hold true.

Another metric I spied was that 4.5M developers use Java today. That's a heck of a lot of people. What is the future of Java? I read an article every now and then about problems with Java 7. Time to get familiar with the new Java landscape. Perhaps this party has really only just begun.

Don't Be Hatin

I read a whole discussion on why people hate the Java programming language. This was strange. Normally I hear people saying they hate things like C++. Most of the hard core programmers I know actually like Java. So I thought I would expose some of the hate themes.

A common complaint about Java is that it is verbose. I can understand this perspective as the new hot functional languages seem to get a lot done in a one liner. There is also the age old complaint about poor Java based performance.

One particular complaint is one that I share. Java is all about many frameworks. I don't like it because you need to learn all the frameworks before you can call yourself a real Java programmer. The language is also associated with rampant design pattern abuse. Nuff said on that.

Here is something I found odd, and that others hate about Java. You are limited to one class per file. WTF? Shouldn't the programmer be able to make that decision? Another drawback is that you don't produce executables with Java. That is both a love and a hate I would guess. The consensus is that Java is poised to keep the enterprise market locked up. If you work for a big company, or more importantly you work on a big project, chances are you will code in Java.

Java Trivia

I saw an old timer ask what the first four bytes of a Java class file are. Who knows? Who cares? It turns our the answer is 0xCAFEBABE. I tell you what. That does not seem to be a very important fact, unless you are trying to clone javac.

Well this random piece of trivia does not seem relevant to the world of Java programming. However it is a neat way to identify Java class files (aside from the .class extension). Perhaps this is more of use to file scanners and such.

Perhaps this is an invitation to break out a hex file view and see what is really in those .class files.

Scanner Troubles

I got ahold of this text file that was the content of the ZF05 zine. My goal was to write a program to extract the good parts of the zine for me to read quickly. Of course I was writing my program in Java.

My process was to do some Test Driven Development. So before I wrote the complex algorithms to do smart filters, I decided to write some simple I/O operations first. To do this I employed the Scanner class in Java. That should be easy. You pass the Scanner constructor a File object. Then you keep calling nextLine() as long as there is a hasLine().

My first TDD exercise was to write a copy program. It should just take a file and duplicate its contents to a second file. That sounds easy. My first attempt compiled quickly. But when it ran, it only copied part of the file. I thought perhaps it was some type of buffer overflow. However no exceptions were through. The program ended gracefully. I put my debugger hat on. Then I determined how far the copy was getting in the source file. That when I discovered some strange characters in the source file. They seemed to be causing hasLine() to return FALSE prematurely. It is going to take some digging into the Scanner class to figure out why I was getting this false positive. For now I will just give you some lines around the place where hasLine() choked. See if you can see why it is failing:

-rw-r--r-- 1 thalakan thalakan 386 Jan 5 2006 zeller.cd
rwxr-xr-x 2 thalakan thalakan 512 Jun 22 2006 かたかã�ls
$ cat watcher.pl
#!/usr/bin/perl -w

Java Virtual Machine

I just read this blurb that the Java Virtual Machine will support languages with dynamic languages. Huh? Is Sun saying that Java will have dynamic typing. If so, why don't they come out and say so instead of talking about the JVM?

The truth behind this strange statement is that the JVM is not the same as Java. The JVM is a program which executes byte code. Java is a programming language. Now it just so happens that Java gets translated down into bytecode, and the JVM runs that code. However the key is that other languages can be translated into bytecode as well.

I understand that a flavor of Lisp has a compiler which translates the source into bytecode. It currently runs fine in the default JVM from Sun. Who knows? Maybe Sun Microsystems is looking to release some other important programming language. For now I am concentrating on Java.