.NET Vs Java – The F5 puppets

This is more of a rant than a useful discussion, so if you’re expecting the later go write yourself a Hello World ;-)

In 2002, for a class project I had the option of working with either Microsoft Foundation Classes (MFC) or Java. After having worked with Windows SDK in the last semester, the decision was clear. Anything that didn’t come from Microsoft was going to be OK. So I started reading this book – The Java Programming Language and that is when it happened. I fell in love with James. James Gosling that is. How funny, how intelligent, how brilliant this man might be I thought. If it wasn’t for my employer who made me write Java Server Pages (JSP), I might still have been in love. I’m not quite sure, but I guess it had something to do with the fact that my job involved staring at the “Null Pointer Exception” in the Apache command window for four hours a day, that brought my love story to an end.

In 2003, I was forced to move from Java to .NET. I wasn’t ready for the separation, but the HR lady would hear nothing of it. What did I expect? Human Resources and Programmers are a match made in hell. So there I was, staring reluctantly at my first .NET program. I pressed F5. Everything worked, I didn’t see a “Null Pointer Exception”. Wait a minute I thought, what about the web server? I don’t remember starting it, or installing it, or reading the ten page documentation on how to configure it. I cried. My life as a programmer was over. I was reduced to a Visual Studio puppet – my only task henceforth would be to click F5. I starred enviously at my friends who after two days of debugging had discovered that their program was crashing because they were using JDK 1.3.2 instead of JDK 1.3.1. Oh how I missed being a programmer.

I’ve missed being a programmer for the last seven years now, but I seemed to have survived the million F5s and the zillion “Microsoft Programmer” jokes ;-) Last weekend I started a little hobby project with my husband and a friend – both loyal to the sun, who of course sold their souls to the oracle. The project was to be in Java, no discussion needed there.

So I installed Eclipse. A Java editor that looked professional and was free. Was I falling in love again? Maybe. I then needed to install some Google plugins for our project – what hobby project is complete without involving Google? Ok, it didn’t work, it couldn’t find java. Ummm… why? Well turns out because Eclipse uses its own java compiler or something (don’t ask me!), as javac clearly didn’t exist on my machine. Interesting. So after installing Eclipse I install the JDK! Fine. Subversion crashes. Ummm… Why? Don’t know again – some clash apparently with the java version and the class paths. I found myself digging through the Environment Variables and looking for issues with the “path”. I’d forgotten all about “Environment Variables” in windows, I was hoping they were dead by now. Yikes. Anyway, after it was all sorted out I created some beautiful java classes only to eventually discover that I had the wrong version of Eclipse to write JSP files!

As you can tell, I am not a good java developer. I couldn’t even install the right version of Eclipse. I gave up, someone would have to write the JSP for me. Neither my husband nor my friend seemed too keen on writing that JSP – not sure why. My husband got stuck with it as my friend had a genuine reason, he was a “server side programmer” so he couldn’t be expected to write front end stuff. As a Microsoft developer, you do not have the liberty of making such statements. If you did, it wouldn’t be long before you heard – “Geez man, my 5 year old son can create an ASP.NET website – all you have to do is click F5 !”

10 thoughts on “.NET Vs Java – The F5 puppets

  1. Ok…this sure is gonna be my favorite blog for long time :) Although, I feel NPE in java is little exaggerated here :p
    I agree that Web development in java was always ignored. Don’t know where it stands now..i ll let the jsp expert comment on it. Without coding “Hello world” in .NET world, I can say that concealing feet long view from developer will only promote monopoly of software development tools, where a 5 yr old could build websites before learning to operate TV remote ;)

  2. OK I admit, I did exaggerate a little, I spent three not four hours staring at NPE, one hour I spent cursing everyone around me ;-)

    And my dear dear santosh… you say “where a 5 yr old could build websites”… but it is no longer a could, he very well CAN. Check out the WebMatrix launch by Microsoft (http://weblogs.asp.net/scottgu/archive/2010/07/06/introducing-webmatrix.aspx), I even wrote a post about it here => https://preetiedul.wordpress.com/2010/07/14/microsoft-webmatrix-a-tool-for-the-lazy/

  3. Oh web development in Java is way more advanced than .Net. .Net got an MVC framework in Oct 2008 when it was invented 30 years ago.

    Preeti I agree with you. If you want quick website in 15 mins you should do ASP.NET but then their approach is not sustainable and you know that having been a asp.net developer all your life.

    Having said that the problems of Java are of different kind. Java world believes in options. Sometime the options become way too many for a novice to make sense of them. This is where asp.net approach wins over java. “Do it this way and you will have no problems.” But once you wander outside this sweet spot you are screwed.

    The modern ;) way of developing websites is Ruby on Rails. website in 20 mins. really :) in fact asp.net mvc borrows heavily from rails..

    parting note jsp/servlets was the way to go 10 years ago not now.. good option would be spring mvc.. its just that you need to setup and all and nothing comes out of the box like asp.net mvc..

    cheers!

    PS: null pointer is a reality of life.. face it ;)

  4. @Praful, on a serious note – The argument between two similarly placed languages is pointless and one can go on back and forth. I just wanted to put forth my experience with the two languages over the past years. Language features aside, the plumbing that surrounds “setting up” environments is greatly simplified and almost non-existent for .net projects as opposed to Java ones where one still has to worry about java versions being used. In the .net world, its all taken care for you.

    Now weather you find this a small detail, or not a good approach or then an amazing thing MS has done, is, of course, a personal preference :)

  5. AHAAHAHAH funny!!! That’s happened to me too. Times in times I try get involved with something in Java world, either because google/android or open source tools. But it’s hard, always so freakin hard to get things done easily. I’m not saying that microsoft is best, just pointing the java stuff is less productive than microsoft stuff in the first moment (anyway, I don’t know the other moments because I neve did it so far ehehehhee)

    Bye!!

    By the way, I came across your website throuth stackoverflow.com!! bye!

    • @Eduardo, hey ! nice of you to visit :) Indeed, a lot of open source or cool stuff back then and even today does revolve around Java unfortunately. After plenty of experience with C# or C++ it would seem that working with Java would be a no-brainer but sadly thats never the case ! MS programmers are a spoiled breed ;-)

  6. 1. staring at the “Null Pointer Exception” in the Apache command window for four hours a day –> 4 hrs? why?? stack trace???
    2. I pressed F5. Everything worked, I didn’t see a “Null Pointer Exception” –> did you check event logs in event viewers?
    3. I starred enviously at my friends who after two days of debugging had discovered that their program was crashing because they were using JDK 1.3.2 instead of JDK 1.3.1 –> dll hell?
    4. what hobby project is complete without involving Google? –> Seems like you were trying to play with GWT based projects. Once you failed with eclipse, did you manage to get GWT project worked on Visual Studio .NET?
    5. Subversion crashes. Ummm… Why? Don’t know again – some clash apparently with the java version and the class paths. –> java and svn classpaths have nothing to do with each other. if you are looking for someone/something to blame, blame OS.
    6. I’d forgotten all about “Environment Variables” in windows –> as long as windows is here , env. vars. is here to stay. The newest trend in MS Windows is to restart the OS when new plugin, updates or apps are installed auto/manually.
    7. I couldn’t even install the right version of Eclipse. I gave up, someone would have to write the JSP for me. –> Just curious, did you try installing IntelliJ Idea, RAD or JDeveloper?

    I won’t argue with the fact that simple programs can be written faster and conveniently in .NET languages (C#/ASP.NET+MVC). Visual Studio is an ‘OK’ IDE. Add plugins like ReSharper to it and you get a wonderful tool to work with. On java side, try using IntelliJ Idea (the Resharper counterpart but superior) and you will truly ‘develop with pleasure’.

    I have worked on both sides of the isles (3 yrs in java, then 4 years in .net, then 4 years java). I have enjoyed the simplicity of programming in .NET but only to be haunted by long period of debugging the incompatibilities and hard to trace bugs. Then I miss ‘Null Pointer Exception’ and stack-trace. I miss tools that help me to build, deploy, debug, profile, analyze (code complexity + performance) etc, continuous integration, simple test-driven development etc etc which do not mean much in the .NET world. I guess it is always going to be easy to work on one tool if you are going to deploy on one server and target one browser.

    Here are few more tools I enjoy everyday: spring mvc, spring security (acegi), quartz scheduling, tiles, tag libraries, velocity, lucene, ant, maven/nexus, jenkins, sonar, cobertura, orm (you name it), gwt, flex, geoserver.

    Here are few mores: puppet (deployment management), vagrant (virtual machine management), proxmox virtual cluster.

    Are these tools challenging to use? You BET. Are you learning new ideas everyday? You BET. Is there a step learning curve? You double BET. But hey, if you can kill the day by staring at a ‘Null Pointer Exception’ for 4 hours and still can’t figure out what’s going on, perhaps .NET is truly made for you. Besides, if its all about easy not (done-right), who needs design patterns, right? Just ask a 5-year old to create a ASP.NET page and press F5 to deploy it.

Leave a reply to Karma Ananda Cancel reply