Hacker News new | past | comments | ask | show | jobs | submit login

This kind of thing in particular is really interesting:

  public static void print(String text) {
    System.out.println(text);
  }
This person cares enough about brevity to make little wrapper functions like this, but at the same time everything is very procedural and monolithic. This gives a vague, weird sense of refined taste, despite some obvious problems with the artifact as a whole.

I'm going to go out on a limb and guess that the programmer came from a C background (where brevity tends to be valued and abstractions tend not to be) and used Java because it's cross-platform.




That's not bad, actually. It's one reason why I hated leaving Perl for Python. Python is a little too orthodox sometimes.

What I'm seeing is where frameworks are becoming the new "programming languages". People now bicker over what framework to use rather than first master the language they are using for a task. I tend to favor the method of "do the simplest thing that works".


I'd bet they made that function so they had a single place to intervene on text being written, not necessarily for the brevity/aesthetics.


Given the extreme lack of abstraction elsewhere, I highly doubt it.


I can understand that slightly. Back in college when I was doing a lot of Java if the IDE hadn't had a shortcut to auto complete System.out.println() I probably would have either made it as a macro or defined a function like that in a library (or in a block I would paste in every single project if we're being completely honest).


Does Java have macros now?


No a macro in my editor. Most text editors will have some capability to do user defined text replacements.


totally should have been called p(...)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: