Tuesday 15 July 2008

Java as a practical development framework

A great source of informal discussion of ideas and news in the IT world is the podcast at blog.stackoverflow.com of the forthcoming community programming answers’ site stackoverflow. The podcast is held by Joel Spolsky and Jeff Atwood, the first is too well known to need introduction, and Atwood is a open minded programmer who holds an interesting wide scoped IT blog, and is actually leading the new site development. I look forward to using Stackoverflow site when it goes live.

They have many strong opinions, and you may agree on something and disagree on something else, but to me at least they are fun to listen, as they are both undeniably smart, and are the kind of people that would be nice to have for dinner, which is not always true for developers (but not the ones working in Open Lab :-) ).

There is one of their opinions, sneaking in now and then, which I find particularly misleading, as I find it both outdated and wrong, and forcing it a bit, but not too much, it sums out as: good and practical oriented programmers (the good ones are those that studied C at the university (???)), are those that now are Windows programmers; the guys who studied Java and kept on with that, are either university freaks that pass their time speculating about trivialities, or lovers of complexity for the sake of it, who do trivial two table persistence by using horribly complex and slow combination of Enterprise Java Beans with on top some pattern implementations in bad code.

Well, first of all, nobody has been using Enterprise Java Beans (EJB) in the classical sense in Java for years and years (we’re all using Hibernate, which lead to a revision of the concept of EJB, but nobody really cares about EJB anymore). The fact that you didn’t study pointers and memory allocation through C does not mean that don’t have a deep conceptual approach to programming; if you want to see something deep on the connection between the JVM and its implementation, subscribe the great Javaspecialist mailing list.

To me there is a strong connection between productivity, quality of code and the features of your IDE. Jetbrain’s Intellij IDE for Java has made writing Java and web (html, Jsp, JavaScript) code and improving quality through refactoring very easy, and some of these features have been ported to the NET universe (Resharper). Same with Hibernate -> NHibernate, Lucene -> Lucene.NET; notice that the flow of innovation is from Java to the others, not the other way round. The Java server and web development environment is great right from a pragmatic perspective. There are many other good practical reasons to pick Java as your choice; e.g. the incredibly wide spectrum of tools and API available, that no one currently can compete with; add to that the widest possible o.s. and database compatibility, and the possibility of deployment at really low costs (Linux+Tomcat+MySQL). Java is not just the contemporary Cobol: it is also the contemporary Cobol, so that it is welcome also in enterprises. That is what is great about being a Java developer: you can use the same technology to answer the needs of corporations or just three guys' company. There are concrete, practical reason to pick it as your server side development platform. So if you are building a server side application where you need the possibility of wide IT integration, like our Teamwork, Java is a relevant factor and a good choice. It is not a question of loving Java or NET or PHP: there are concrete reasons to prefer Java, both as a developer and as a customer.

The (remaining) windows programmers never understood how such an unlikely competitor as Java and Sun (yes, I know that IBM, Oracle helped..) came to win the programming language battle, but that is not a good reason to ignore this. Or how such an uncomfortable server o.s. like Linux became dominant on the server side, but that too can’t be ignored. So writing apps that don’t run in such environments, or that don’t have a really virtual virtual machine, is a not very pragmatic choice in general; with NET you are making a niche choice, which may be fine in some circumstances, but you surely can’t claim to be a paradigm of pragmatism. For an interesting (and informed) praising and critical perspective on Java, see Bruce Tate’s Beyond Java.

And a final note about studying C: that is actually one of the big problems that we have in Open Lab in job interviews: that people come out from Italian engineering university having studied just C as a programming language, and so are by now at galactic distance from the reality of programming today, and have to be tought practically everything from scratch. So actually still teaching C is very bad sign, a symptom of the obsolescence of our universities... .

Pietro Polsinelli

1 comment:

sc said...

My dear Pietro, after several years I read something from you. In advance I really appreciated the strongness of your opinions and the big Q.L. (do you remember ?) of your company! I feel that you are quite right in general, but the IT world it's really too complex to simply adopt Java's world and forget all the rest. I agree that our university are really too far away from the real needs of our business: stop learning C and go ahead with JAVA, NET, PHP(5)! All the best. Andrea