Archives for posts with tag: programming

This year, on August 19, celebrate Whyday. Set aside that day to remember Why’s contributions to our community and culture by hacking just for the fun and joy of it.

  • See how far you can push some weird corner of Ruby (or some other language).
  • Choose a tight constraint (for example, 4 kilobytes of source code) and see what you can do with it.
  • Try that wild idea you’ve been sitting on because it’s too crazy.
  • You can work to maintain some of the software Why left us (although Why is more about creating beautiful new things than polishing old things).
  • On the other hand, Why is passionate about teaching programming to children. So improvements to Hackety Hack would be welcome.
  • Or take direct action along those lines, and teach Ruby to a child.

http://whyday.org/

Hmm I wonder what to do!!??

“Java has evolved from a groundbreaking, revolutionary language platform to something closer to a modern-day version of Cobol. In just 15 years”. (from Geriatric Java struggles to stay relevant)

As a Java developer myself I can totally appreciate this. In fact I remember saying exactly the same thing just a few months ago (to an ex-Sun developer), and it seems that everyone is coming to the same conclusion, if they hadn’t already.  After just a taste of some of the more ‘modern’ languages such as Ruby, I find myself struggling to come up with Java solutions anything close to the elegance that these ‘cooler’ languages provide – not to mention the order of magnitude reduction in the amount of code written.

So why has Java become so old and frustrating, when no so long ago it was the darling of the tech industry.

Old clunky syntax is surely a major part. Java’s power is in its library support, and not in its syntax which is frankly overly verbose, overly strict and generally inelegant. Admittedly the first two points mentioned make it a good language for newbie coders as everything has to be explicitly ‘put out there’ and you get your wrists slapped by the compiler if you try anything a little out of the box! But as far as expressiveness goes, this is where it fails. Its strictness is the death of creativity (Groovy builders / DSL’s anyone?).

Lack of closures, is closely related to the last point. Once you use closures in your coding, you’ll never be able to think the same again, they just give you so much more flexibility it’s ridiculous. Ok, so you can kind of achieve the same with inner classes, plus they’re being put in for the Java 7 release, but what are the odds they’ll be unnatural and forced, as generics were in Java 5.

Concurrency has been a major concern of mine for some time now. Chip makers, such as Intel, have given up on Moore’s law and are now using the tactic of multiple low powered cores in a processor, rather than a single high powered core. This means that all our single threaded Java apps will actually run slower on newer processors than ones from 2-3 years ago (as the single thread is confined to a single core). I’m sure if you’ve attempted concurrency in a Java app (without the use of a framework, such as the servlet framework) then you’ll appreciate how complex, and confusing it can be. This is one of Java’s big downfall’s, and a major problem for the future, whereas newer languages such as Scala, Clojure handle this quite elegantly with, for example, transactional memory.

So what is the future?

Well as I mentioned earlier, I believe Java’s power is not in the language, but in the JVM and libraries associated with it. Millions and millions of apps have been written for Java over the past 15 years, and it’s almost guaranteed that if you need to hook into another system there is already a library to do it. Need to write an app for a supermarket system, use JBarcode; need a machine learning library, look no further than Apache Mahout, etc.

To hook into this vast collection of code (without using Java itself), it will be the newer, cooler JVM languages that will carry on Java’s legacy, while the language itself quickly becomes the next Cobol, or Pascal. Any JVM language can interact with Java’s own bytecode, so none of this rich history is lost, nothing needs to be re-written, but we also don’t need to hang onto old syntax and conventions to achieve this.

… and what of the non-JVM languages. What are the cool contenders there? which languages will the young new hackers be using? I know which two are on my learning list,

any other recommendations?

Interesting Posts

The Struggle to Keep Java Relevant

Geriatric Java Struggles to Stay Relevant

Oracle Looks to Keep Java Interesting and Attract Young Developers

Follow

Get every new post delivered to your Inbox.