Hacker News new | ask | show | jobs
by shearnie 3380 days ago
He's deliberately made the java example of file input too busy, it's poorly written. And added multiple exception handling to make it longer than it needs to be (in its context).

I started in BASIC as a kid. The barrier to entry was minimal and fun for a few hundred lines of code.

To manage the complexities of a large code base, you need to have supports and infrastructure and information hiding to structure it neatly. That adds extra code, but contains it in a way to makes sense of it all.

1 comments

>He's deliberately made the java example of file input too busy, it's poorly written.

Do you have evidence to judge the intention of the author?

The simple truth is that good pedagogical code is hard to write in any language, but Java makes it especially hard since it makes the two most essential things, invocation and I/O, needlessly difficult. Java also makes graphics (AWT and Swing) and even something as simple as Date/Time needlessly difficult. Just about the only thing that's really outstanding in the standard library are the Collection classes (arguably util.concurrent is good too, but a) concurrency isn't for beginners and b) concurrency requires better language and runtime constraints, like those provided by Clojure or Erlang).

Java was invented for embedded devices and was supposed to be C without pointers that could run anywhere. Not quite sure how it ended up as an Enterprise Server platform. marketing, I guess.