The dream which made me reconsider Java

James Gosling

as a fan of C, Python and Perl I have always dismissed Java. For 20 years in fact. Until yesterday! This is what happened:

As I was waiting for the compilation of the latest kernel to finish, I was browsing some Java forums (for a laugh, as you do). But I must have nodded off …. As my head rested on the keyboard I had the strangest dream.

In this dream I was headhunted by a promising VC-funded start-up called ButtMint.io. They hired me as technical lead and Full-Stack Java Developer. I was selected because unlike other applicants, I was fully dedicated to Java/J2EE. And in my CV I highlighted that “Java IS the stack”.

Guess the HR guy liked me because I never let my mind be poisoned with one of these hipster hype-languages such as Scala, LISP or Erlang. Ok I must admid, once I was tempted because of all this functional-programming talk lately. But thanks to the release of Java 8, I now have the power of lambdas at my fingertips! Alonzo Church would be so proud.

In my dream there were some younger guys on the team. They were always “Clojure this and Python that”. When I see people writing shell-scripts, it makes me gag. Fucking upstarts, … fresh out of university, … with their shiny skills, …. over-engineering everything! But guess I shouldn’t be too hard on them. Freshers just don’t know that in Java there is no need for scripts as you can simply use the power of exec():

public static void main(String argv[]) {
    try {
      String line;
      Process p = Runtime.getRuntime().exec("java ls -al| java sort");
      p.waitFor();
      System.out.println(p.exitValue());
    }
    catch (Exception err) {
      err.printStackTrace();
    }
  }

One time my colleagues played a trick on me and installed a vim plugin in my Eclipse. I almost lost a whole afternoon … had to call tech-support to help me exit Vim. I re-installed and defragged my computer and changed my password from java to J2ee!!!!! (J2EE improved my system security. So suck on that Java-bashers!).

What people don’t understand is that Java programming is like art! If Bob Ross would be a programmer he too would be a Java guru just like me.

happy little exceptions

Then I was awoken by the sweet sound of my hard-disk churning away as the kernel compiled. Feeling intrigued by what I learned from this dream I decided to no longer dismiss Java and after 20 years of C, Perl and Python give it one last chance.

So here is what I learned:

  1. Java is great because it works on all Operating Systems similar to anal sex works on all genders
  2. Java is a great language to learn programming because the time it takes the garbage-collection to complete you can learn other programming languages
  3. Java method names are never mentioned on twitter
  4. Java is not a hasty language. If it were a language in LOTR it would be New-Entish: It takes an awful lot of time to say anything: From coding to compilation to execution, Java is very “unhasty“.
  5. Java code has 90% less bugs than other programming languages, because it is so verbose and takes very long to type out what you want the program to do, … and so your mind starts wandering off, … and therefore it is likely that while typing you will subconsciously discover bugs made earlier.
  6. Java often gets a bad rep for being too verbose. This is unfair because Java supports loops and recursion to reduce it’s verbosity for those who lazy programmers who don’t like typing. But I prefer to keep it simple and happily accept the trade-off in readability over complexity. Remember not everyone might be a guru like you, so try to avoid exotic constructs such as while() and for(), …
  7. Memory leaks in Java are only theoretical because all the available memory of the OS can be made available to the application using -Xms -Xmx options (Insider tip for Linux: write a java program jfree.java to determine the amount of free memory on the OS and pass the value to these options. Use swapon (8) to add more memory on systems with less than 1 petabyte of physical memory or if you get ENOMEM errors)
  8. Java code is suitable for real-time applications by optimizing it’s logic in hardware (duh!)
  9. Sometimes logical errors and bugs will go away by switching to another JVM. This saves you from sifting through overly verbose source code (see above).
  10. Swing, Swinging & Swingers means something entirely different in the Java community. (unless you are looking for adult fun on the actual Indonesian island of Java, oh boy then it really gets confusing but that’s another story for another day)
  11. Security researchers have been picking at Java since 1995. Therefore over time, Java has become more secure, robust and stronger than other languages. “J2ee!!” is an excellent password because it contains upper-/lower case letters, digits and ! characters.
  12. Buffer overflows are impossible in Java because its buffers are bigger than yo mamma.
  13. Finding things about Java on the web is incredibly simple thanks to the “Ask! Toolbar” which gets re-/installed with every Java update.
  14. Java is a lightweight programming language suitable for embedded systems and close to the metal. (OK, one time I was alone in the bathroom … And I said this 3 times into the bathroom mirror. Then the ghost of Dennis Ritchie appeared and smacked me over the head with his book on C)

Conclusion: People who hate Java or poke fun at Java programmers should remember that this type of intolerance is exactly they type of thing which allowed the Nazis to gain power. So stop.

Comments appreciated, please no flames.

This entry was posted in IT, programming and tagged , , . Bookmark the permalink.

5 Responses to The dream which made me reconsider Java

  1. roseglace says:

    Don’t forget #12: “you get to learn how to write easy-to-maintain code, because an update tomorrow will break everything you’ve written in the last seventeen months.

    Liked by 1 person

  2. Anonymous says:

    Good that you didn’t dream about C# or you would wake up with white stuff in your pants…

    Liked by 1 person

  3. Pingback: The dream which made me reconsider Java | Dysle...

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s