Archive for the ‘java’ Category

Everbody hates Java. Jax 2012.

Mittwoch, Mai 2nd, 2012

Here are the slides for my talk at Jax. I’ve not written anything up yet, so here’s a link to the interview the JAX team did with me before the conference: interview (German). The slides probably don’t make much sense without me clowning around in front of them, sorry.

Tim’s Guide to JVM Languages.

Donnerstag, Dezember 1st, 2011

JRuby: for people who realize the Ruby interpreter isn’t that hot performancewise or –more likely– whose sysadmins refuse to deploy anything but jar files. Vaguely useful in case you absolutely require a Java library for a script that involves opening a file, parsing xml, printing to the screen, adding two `byte`s or something similarly impossible to do in Java without becoming so enraged that you end up twisting some cute little animal’s head off.

Jython: see JRuby

Groovy: for hardcore Java nerds who don’t want to admit to themselves that Java isn’t the be-all end-all of programming by resorting to JRuby or Jython. Because for unknown reasons, groovy is somehow „more“ Java.

Scala: for people who feel Java isn’t special enough for them, because they’re very special. Yet they’re too limp dicked to use haskell or erlang. In all honesty, they would prefer to use ocaml, but the JVM handles cache line optimization in Intel’s upcoming Larabee architecture better and they need to squeeze every last bit of performance out of their „boxen“. They also enjoy using important words like „contravariant“ that noone including themselves understands. This makes them feel even more special.

Fantom: see Scala, add: for who Scala is too mainstream because Twitter and one other company allegedly used it a some point.

Clojure: see Scala, but switch „scheme or lisp“ in for „haskell or erlang“, feeks slightly less absurd than Scala to me.

JavaScript: oh-my-god just go ahead and scratch my eyes out, why in hell would anyone … oh yeah, it ships with the JVM (no joke). The „embedded language“ of choice in case you need to embed some language into your Java desktop software.

JavaFX: sadomasochists with a serious Sun Microsystems fetish who have wet dreams of Dukeâ„¢ (the little java dude) gnawing their balls off. They also really hate Flash and want to stick it to Adobe. But they haven’t heard that Adobe discontinued it or that you can do „mouseover“ effects in HTML5 thus enabling Rich Internet Applicationsâ„¢ without Appletsâ„¢.

All of the other JVM languages are either someone’s uni dissertation or total bullshit. Except for Frink which is pretty awesome but not really a general purpose programming language.

That said, Java is a really annoying language, but so are all other computer languages that don’t live in the JVM to some degree. It’s perfectly possible to write solid and useful code with it.

(this rant originally posted by me here. I updated it with a link to cute animals and frink)

Visualizing Ant Redux.

Dienstag, Oktober 14th, 2008

I’ve written a small update to my ant-file visualization tool. The only visible change is that the default task is now marked in the output.

You can either download the jar containing everything you need, or build it yourself from the source available via:

svn co http://a2800276.googlecode.com/svn/branches/antvis

If Antvis is run from the command line like so:

$ java -jar antvis.jar
usage: [jre] antvis.AntVis -f inputFile [-t format] [-o outfile]
	format: format supported by dot. Default: `dot`
	outfile: Default stdout
call [jre] antvis.AntVis -l for a list of supported formats

It prints out the available options. If it’s called correctly:

$ java -jar antvis.jar -f build.xml -t png -o self.png

It will produce graphical representations of the provided build.xml file like this one

self.png

for Antviz’s own build.xml or this one

jpos_ant.png

The above is an example of a more complicated build.xml script, it ships with jpos.

Visualizing Ant Scripts.

Dienstag, April 8th, 2008

XML is generally not only tedious to write, but also hideous to look at, yet sometimes you gotta bite the bullet and use an ant build script.

I’ve written a little tool that renders a dependancy graph of all the tasks in a ant build.xml file. The result looks like this:

ant_deps

The above was generated from this xml file which is too long and ugly to include here.

In case you’d also like to generate nifty little pictures like the above, to beef up skimpy documentation, for example, you can download the tool here. Just call:

java -jar antvis.jar

And all the rest should be self-explanatory. You’ll need to have a copy of Graphviz installed in order to render the pictures. In case you are interested in the source, you can grab a copy using subversion here:

svn co http://a2800276.googlecode.com/svn/branches/antvis