The Search for the Ultimate Programming Language-I’ll have a cup of Java

I have been using java for the past…errr…6 years or so. It was cool back then and everybody wanted people who knew how to talk java, sleep java, and yes, even drink java while coding in java. 🙂

The problem is that the whole “write once, run everywhere” marketing campaign that Sun was force feeding the suits does not really work in practice. And the programmers knew that…but hey…who am i to argue with the pointy-haired-boss. So the whole dream of one language and one framework that you can write your tool in and get it to run on any device that supports the JVM was just that….a dream. The image of your refrigerator knowing when you’re low on milk and talking with your phone(bluetooth anyone?) to call the grocery shop never actually worked. Except for BillG’s house ofcourse, but then again…if i had that much money, i probably would spend my time coding my own dream language instead of looking for one.(i know…i’m a nerd)

A couple of years ago, i had the unfortunate chance to deal with J2EE in a big project. And let me tell you…i’d rather get my skin peeled off with a small tweezer than have to go through that again.

So skip to the current frame and you’ll see the following. Today, we have three flavors of java. We have J2EE for enterprise applications(nobody actually knows what that means), J2SE for the regular people, and J2ME for mobile devices. The smart people in the audience(or the really old) will also note that the promise of applets solving the problems of the internet at the time(that of interactivity and limitations of vanilla HTML) is no longer valid. Applets turned out too heavy for use at that time. No matter what you think the reasons for that is, the end result is the same. Nobody uses applets anymore.

The incredibly smart among you will also note that the graphical components in java have also gone under a lot of change. First we had AWT which was too limited to use and then we got Swing built on top of AWT. Swing was too heavy and had its own problems, which version 6 fixed a lot of. But it was too late and SWT was already quite popular.

I can go on and on, but without getting into a lot of technical details, let me tell you why i can’t use java.

  1. Java is still too heavy. It is very difficult to get a decent hosting company to run your application. The most they give you(if you don’t want to shell out for a dedicated server) is a tomcat instance that will be maxed out at 256MB. There are a few things that you can do to keep your memory usage under control and keep the performance but really the problem is still that java is too damn heavy. In fact, i understand why there aren’t a lot of hosting companies out there for it, its too difficult to offer under a competitive price.(Note: There was a project at Sun a few years ago that aimed at slimming down the JVM. The project’s long term goal was to create a diet version of the JVM that will load whatever it needed when it needed it. I lost track of that project, but the JVM for java 6 is definitely much better in terms of performance). .Net based language also face that problem with their runtime. But it does help when the OS maker and the framework maker are the same entity.
  2. The documentation is terrible. Really….It doesn’t matter if you have the best framework in the world when nobody can use it because your documentation sucks. After suffering from working on terrible projects with no documentation, i now have a severe allergic reaction regarding documentation and can sniff the good ones from the bad ones right away. The documentation often has too few details or is outright wrong. It really pisses me off when the documentation for the getAttributes() method only says that this function returns the attributes. Noooo…really….you don’t say….could have fooled me. Besides, there is one flavor of this getAttributes() that doesn’t actually return the attributes, but returns a reference to itself instead. How do i know that? Yup, i’ve read the source code. When you have to read the source code to know how something works instead of consulting the documentation then you’ve obviously done something wrong.
  3. J2EE is overly complex. Although i like the different components and the structure it imposes on you(some people consider this as a negative point though), some issues have been pushed over the border. A few years ago, i had the unfortunate pleasure to work with JAAS(the security standard) and i gotta tell you….that shit is too hard. We ended up not using it and instead implementing our own security system(the usual database based) and i believe that this is the path that most people use. To be fair, that project was a disaster. We were very pressed for time and i used to work 100-120 hours/week and also did administrator duties. So maybe i didn’t give it a fair chance.
  4. Although i said that i liked J2EE’s structure, sometimes i think that it is too restrictive. I am not entirely sure about this though, i still have not found a language that has a nice compromise. The structure of the language itself imposes good programming practices(i carried most of those from an old C standard) but when it comes to the class libraries, i feel that it gets too restrictive and thus it would take a lot of code just to do a simple task. For example, try to write a simple database manipulation program(meaning something that issues a few different queries for data…both DDL and DML) and you’ll see what i mean. To counter that, you’ll have to use some framework which brings its own complexity. Like i said, i am not entirely sure if this is a bad thing or not, i still rather enjoy oldschool C and a shell so i might be a bit prejudiced there….although it does make the initial phase of a project take a longer time and much more planning…is this a good thing or a bad thing?…You decide.

Initially, i thought that i would have more to say about Java. But i was surprised as i was writing that many of the problems that i see in it are not that bad actually. Ok, so it isn’t the best language, but it isn’t bad. And i guess this must be a good thing.

9 replies on “The Search for the Ultimate Programming Language-I’ll have a cup of Java”

  1. well ,
    quite interesting … can you give some discribtion about that project you did in java … or what other bad things does java has rather than that it is heavy .. , you seem to be quite expert in programming … may i ask in what aspect of computer science you found your self ?? and last question is ,do you like windows vista ??

  2. samie,
    Sure. The project was to implement sort-of an inventory control application that is actually the front-end for the automated product which deals with high-priced medical components(such as artificial heart pump or so on ). These components have some different methods for handling their logistics, so keeping track of the items and where they are becomes a real problem. So the product(which used RFID tags to keep track of the individual components) took of that and communicated with the web application. The web application is the side that the users interact with so it had the basic CRUD functions as well as extensive reporting. It was all J2EE running on Oracle application server. The client was a company called wavemark.

    Other problems related to J2EE and in specific EJBs which were hell to write and to manage. The industry now knows not to use them and so frameworks such as hibernate flourished. In fact, EJB3 learned a lot of lessons from such frameworks so for example we used to use xdoclet and now java has annotations.(just to show you how immature that was).

    Other problems came from the application server itself. So i can’t blame java. But the standards were not that mature(ver 2.1) and so application servers typically implemented their own extensions which hardly worked. The Oracle Application Server had one nasty memory leak during deployment that gave me a big headache.

    There are several things to note here. Feel free to ask me specific questions if you want to know more.

    In computer science, i enjoy tinkering with AI and game development. But as a programmer, i do whatever it takes for the project so succeed.

    I use Linux as my main OS so i can’t answer directly regarding Vista. But from the technical side, i know about some of the things that changed in it(the kernel part) and so it is much better than the previous versions.


  3. Hello ,
    Alaa , i am quite happy to have the oportunity to exchange some ideas and sentences with you ..!
    Since you mentioned industry ,can you please tell us a bit about computer science and computer engineering industry in beautiful Lebanon developed it is ,what huge global companies and monopolies have branches in lebanon …!

    Windows is microsoft and microsoft is not open source … how could you know about vistas kernel ??

    Thanks again for responding and i ask for your excuse if i ask too
    much …

    p.s i am NOT talking politics at all in this post ..!

  4. samie,
    To talk about the computer sector in Lebanon needs a separate post since it is a large topic, but to answer your question briefly, i can say the following. The sector is quite mature actually, and most companies have representative offices in Lebanon. The current problem in the IT sector relates to the economic conditions and the political turmoil that is going on right now….in conditions such as this, companies tend not to spend money and so the whole market is influenced by this. But we are all hoping that this will pass soon.

    I knew about some of the changes in Vista’s kernel after watching an interview with some of kernel architects where they discussed the different changes and how it will affect the system as a whole.

  5. Alaa ,thank you again for responding ,i hope that i will find your future posts interesting for me so that i’ll add my own comments again …!

    Thanks ,

Comments are closed.