Has it really been 18 years since I did Java?

I've definitely had to touch Java in the intervening years, but the last big Java project I can remember working on was in 1997. And that was a VR Mutech that we ripped out and replaced with C++ and Javascript ASAP. Java code always seems somewhat like someone is pulling my leg...

  • You wrote 43 lines of code to define two methods, both of which are literally one-line calls that forward the call to another method?
  • You wrote 30 lines of code to read the first line of a file and print it to stdout?

sure, I get it, you can pull in huge numbers of coders and chain them to the wagon... but seriously it seems 90% of their effort is pulling the wagon sideways against each other. I also realize that likely 99% of the code is actually written by some Eclipse plugin that generates meaningless boilerplate... but then you've got to maintain that cr*p forever or let it rot.


  1. Vincent Bernat

    Vincent Bernat on 10/30/2015 6:11 a.m. #

    With Java 8, things got simpler. To print the first line of a file:

    Stream<String> lines = Files.lines(Paths.get("/etc/passwd"));

  2. Mike Fletcher

    Mike Fletcher on 11/02/2015 1:42 a.m. #

    That still seems like someone is pulling your leg a bit. Better than the 30 lines of circuitous code, but when you're used to this:

    print( open( '/etc/passwd' ).readline() )

    it all just seems rather... pointlessly verbose.

Comments are closed.


Pingbacks are closed.