User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Software Development category of DaniWeb, a massive community of 374,048 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,930 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Software Development advertiser:
Oct 30th, 2004, 7:18 pm
I'm a card carrying Java hater. Many times I have been approached by advocates of the devil's latest spawn (that would be Java if you weren't paying attention) demanding to know why I loath the language that they hold so dear. As many times as I have been approached, I've put the fool in his place by quoting from a long and detailed list of flaws in the design and implementation of Java.

High on my list of grievances is that Java forces an Object Oriented approach to programming. Object Oriented Programming is by far the most overblown fad that programming has experienced. I like the idea in general, but people have taken what would be simple common sense too far. The result is Object Oriented Programming, with overcomplicated inheritance hierarchies saturated with needless polymorphic behavior. There is indeed too much of a good thing, and at that point it becomes a bad thing. I'm not timid in stating my opinion that Object Oriented Programming is almost never suited for the projects in which it is abused.

Lest I go off onto a tangient about Object Oriented Programming, I'll get back on topic. I have never liked Java. My first thought when I was introduced to Java was, "Eew, gross!". However, because it was a popular language, I still learned it. I hated every minute that I was forced to use Java, but I bit my tongue and pressed on.

Recently, I heard about the latest and greatest release of Java, version 5.0. I was shocked to discover that many reasonable improvements had been made to the language. I proceeded to critique the new features on www.cprogramming.com, but I did not download the new release and continued to use version 1.4.2 at my workplace.

Some time later--today--I found myself bored and downloaded Java 5.0 with the NetBeans 4 IDE. The IDE is borderline tolerable, but what was most startling was that I had fun playing with Java! Most notable of the new features are the Scanner class, Generics, and Auto-boxing and unboxing or buit-in types. Today I played with the Scanner class.

It was a blast. The interface is as simple as I could have hoped for, yet still supports great power. The simplicity comes from the ease of constructing a scanner on a stream:

Scanner in = new Scanner ( System.in );

None of the InputStreamReader, BufferedReader crap that we were forced to accept before, and one can easily read formatted input through the next*() functions. While it is still a good idea to read a line and parse it in most circumstances, the ability to simply read an integer in a standard way without bending over backward is a relief.

If this alone were the extent of the Scanner class--even though it is a drastic improvement--I wouldn't bother blogging on it. The feature that I spent most of my time playing with was regex patterns in the Scanner class. Regular expressions were the only reason I learned Perl--though I was quickly hooked on other features--and now that they can be easily used in Java, I may need to re-evaluate my Java hater status.

Don't get me wrong; I still feel that the design of Java is fundamentally flawed, but it seems that after only a decade the developers have realized how crappy Java was. Sadly, now I have fewer arguments against the language; though I take solace in still being able to bitch about features that can't possibly be fixed.

At least now I can approach a project in Java without being driven to drinking. The language is still bad, but not as awful as it once was, and for that I am grateful.
This blog entry was written by Narue. It has received 1,143 views, 0 comments, and 0 linkbacks. 1 voter has rated this entry 4 out of 5 stars.
AddThis Social Bookmark Button

Post Comment

Only community members can start a blog or comment on blog entries. You must register or log in to contribute.

DaniWeb Software Development Marketplace

Related Blog Entries
Related Forum Threads
All times are GMT -4. The time now is 12:22 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC