What’s Really Good?

You ever roll up to a brother on the street and they be all like, “what’s really good?” No? You haven’t? That’s because you locked up behind that 20″ LCD grokking Lisp or Rubying Rails or whatever it is my readers do in their spare time. Well on the streetz that’s like the official greeting of the hood. That and the little half head nod with the ice grill (remembering that grill referrs to grimace or a grimey look upon one’s face) that they do. Depending on the time of day or song on the radio you’re likely to get one greeting over the other.

Now I’m gonna tell you what’s really good, in case you haven’t figured it out. The JVM. (Leave to a fool like me to flip from hood to geek in a minute.) I just got finished reading Rory’s rantin’ about RealBasic and I felt I had a few words to say about the overused and abused binary running thousands of businesses world wide. Disclaimer: I am not ragging on Rory or trying to associate this posting with his in any way. I refuse to argue with him or anyone else on the topic, and I am not open to debating any issues. Rory has his view which I completely understand and in many ways is what is inspiring tonight’s topic. You will have your own perspective which you can feel free to comment on. With all that aside onto business.

A choice of language or development platform by many is mostly influenced by your employer and/or schooling. Hard core devs never let external forces pull them one way or another. For the longest time I was against Microsoft platforms but I could not articulate why. I took coding classes in tech school where they taught everything from RPG/400 and C to VB and Java. From the start I had a background in many different langueages and learned early about the strengths and weaknesses of each. Funny as it is I liked VB. (I think it was version 4 or 5 at the time.) I also liked Java. My first job was working for a lighting company in NJ and it involved mostly RPG/400 work. I got a break when I started a client server VB app using ADO and ODBC to pull inventory info from the green screen machine. That experience tainted my impression and is liekly one of the reasons I was never too much in favor of Microsoft. Long story extrapolated, I generated an installer for my VB app and for some idiot reason it depended on some DLL that was different on most of the machines leaving me with the “it works on these two boxes” excuse for an incomplete and totally useless pile of software. I left that company before they figured out what a loser I was, just in time to brag about the machines that I did get working. You know how you put that kinda stuff on your resume, “Cheif archetect involved in a major rewrite of a core inventory control system utilizing leading edge Microsoft client server technology exposing legacy backend systems to new age PCs.” Later on my experience would include a real rewrite of a Visual J++ pile of mess using ASP and VB6 COM+ components. Even though that project was a huge uccess landing a $10million+ deal for the company I worked for at the time I had a sour taste once again. This time it came from my trying to apply Java threading concepts to what was an arcane Apartment threading model in VB. I couldn’t quite understand how something as simple as new Thread(myRunnable).start() had to be so doggone complicated that it involved a white paper.

Later in my career I started picking up Java and getting really comfortable. I loved JSP and servlets. I loved the way you could just jar or war things up and they were ready for any JRE or EE container. There was something about the way Java did things that had a certain simplicity to it. I mean, don’t get me wrong, nowadays there is a LOT of bloat in the Java community. More than one way madness at every corner but at the heart of it all is the JRE/JVM, so simple. If you can understand classloaders and bytecode then there’s absolutely nothing you can’t do in Java. Also with the explosion of so many Java based projects when you run yourself into a corner the exit is a download away. Coupled with a tool like Maven, you don’t even have to leave your IDE to add somebody else’s brain child to your project. I have literally sat down and coded something from start to finish without opening my browser to visit Sourceforge or Codehaus and pulled down binaries, sources and Javadocs just by adding an XML tag to my project descriptor. If that’s not slick enough you add the worlds best IDE from the nice folks at IntelliJ. I have never seen anything in the Microsoft camp that could come close to Idea. Hell, even Eclipse beat Visual Studio as far as refactoring support and auto complete. (I’m comparing Eclipse against VS .Net 2003 Visual C++, hopefully tools like the C# and VB editor are more advanced.) I’m waiting for Microsoft to learn that “outside in” interface design that allows refactoring through ASTs is more than razzle dazzle, it’s a way of life… oxygen to those who write software for a living. What I’m talking about is that umph feeling you get with tools that understand the AST. It’s different than just writing logic. You get the feeling of direct interaction with your program. You’re no longer hunting down and pecking off change to a reference or interace method with find/replace. You are hands on massaging your logic into the proper shape without the possibility of typos. Anyone who’s seriously written any computer logic for a living will understand how an extra l in a reference or a missing s on a method name can cause loss of millions of dollars, hours, lunch dates, and bonuses. When you have a tool that virtually eliminates that possibility and also teaches you the right way to write code you just don’t wanna give that up.

Why is the JVM so nice?
Like I said earlier, there’s just too much going on in the Java community. Java does run everywhere (though the story is not as pretty in embedded/mobile) and forget what people say about slowness, and Swing ugliness, and debug everywhere. Yes Java runs slow if you write slow code. It doesn’t take that much effort to write efficient code and slowness/memory leaks exist in every language/technology. You can write terrible C#, awful Perl, or pathetic Python the story is no different. Yes Swing bare bones is complicated just like any bare bones UI framework. The problem has been addressed so many times over that if you’re using vanilla Swing you’re either asking for extra work or an sipping on idiot juice. I personally think Netbeans did a fantastic job with Mattisse and it’s soo easy my three year old can create a professional business app with it. There are plenty of other UI frameworks but that one stands out as the Best Java answer to VB’s drag/drop simplicity. The same goes for anything ugly or not quite right with Java. Get over the fact that it doesn’t support feature “X” from your favorite toolkit. Grab the project that does. And thats the thing with the JVM. There’s just so many JVM based solutions to any and every problem you’d be a bone head to get hung up on, “why is it so hard to develop a web app?”

What does the JVM have to offer?
For starters you have Jar portability. That means any complicated mishmash of ideas can be zipped up with a “.jar” extension and run of the JVM of your liking. (Yes, there are subtle runtime version incompatibilities but that problem, too has been addressed.) So if you need a socket server that responds to incoming soap requests and scans a local music directory, write your code, jar the binaries and double click the jar. Another nice thing is how the jar idea has been extended for web development. Back when the Microsofties at my other job were configuring ISAPI filters restarting IIS sometimes and sometimes copy/pasting ASP ugliness into a running instance and writing log stuff with Response.write I was laughing at how simple it was to throw some JSPs in a war file with a few servlets and set my system.outs to a log file for ad hoc debugging. Drag/drop badda-bing badda-boom I’m done. Simplicity of deployment. Simplicity of compilation as well. There’s not a lot of low level OS tweaking or MTS magikery to register COM+ nonsense. The Java community was so far ahead with web development, compilation/ deployment it wasn’t even funny.

What else can we do with the JVM? You don’t need to stick with Java syntax. If it offends you there’s a boatload of other languages that run flawlessly on the JVM. Got some Javascript you want to reuse? Rhino! Hired a bunch of Python hackers? JYthon! Ruby’s the flavor Dejure? JRuby! Want to do something Adobe/Flex like? Laszlo! How about Xul? There’s a dozen Xul engines broken into bytecode! Need a DBMS? The JVM ships with one! Build tools, web servers, SWF presentation engines, alternative languages, compilers, compiler compilers, audio editors, P2P clients, XML pull parsers, SAX engines, XSL transforms, Excel/PDF generators, basically any and everything you ever need has already been done and established on the JVM. The best part is most of these things can easily be plugged into your app with little effort. When you’re done you can drag your binaries from your windows box to your Macbook and then copy to your Linux machine and everything works the same. Unless you have some really special requirements requiring something really fancy like native calls (and most developers really don’t they just think they do) there should be no need to tweak and/or recompile.

I was going somewhere with this discussion but I forget now. Oh yeah, consistency and tools! With the JVM you get the benefit of some really great editors, and the consistency of tools across platforms. I’ve been able to use the very same binaries fueling a mobile phone in a web server. I’ve been successful using the same build/deploy tools between my desktop and my CI server. The same philosophies in all scenarios. (Admittedly the mobile platform is very underdone and THE biggest challenge.) There’s just too much a JVM can do and I’ll be glad when I see JVMs supplant KVMs on mobile devices. A JVM on the iPhone… and a decent one baked in not just some shabby tacked on after thought would make a tremendous impact.

I get this ambition as a result of my background. I’m not against Microsoft tools or any other dev tool set. I’m sure they’re all on par with what’s in the Java community by now. However… unless I have the inability to deploy to specific hardware, which is rare in my case, I see no need to venture outside of what works for me. The tools are great, not perfect, but great. The technology is so well established it influences others as well as being influenced by others. I dunno, like I said… I’m not trying to debate my religious choice of technology. I think I just wanted to make the point that the JVM has John Blaze stuff… some of y’all just ain’t recognizing!

Brought to you by:
Rory: Because the world needs another big nosed something or other that brings it to you raw, shouting about writing the ultimate Facebook app that already was but will never be, and showing you how great the Mac is, where Microsoft gets things right and where they miss the boat.
Merlyn: Always reminding me of the things that matter most.
Astrid: For encouraging me to show my stoopid mug on some egg headed video that nobody want’s to watch. It’s this very same type of encouragement hat keeps our economy running. Without all the dumb ideas released every hour nobody will be encouraged to fund/buy into the remaining mediocrity that our country produces.
Kropotkin: Because I feel like smashing a motor cycle.
Anthony: For reminding me about the little project I started that could turn out to be a great idea but will never release because I’m just too busy filling my blog with nonsense.