801: Golden Hammer

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
Golden Hammer
Took me five tries to find the right one, but I managed to salvage our night out--if not the boat--in the end.
Title text: Took me five tries to find the right one, but I managed to salvage our night out--if not the boat--in the end.

Explanation[edit]

Java is a programming language touted for its Portability™ (the ability for software to run on many different systems "write once, run everywhere"), which sometimes leads to it being used in systems where it really just shouldn't be used. Cueball laments that the hardware he's tinkering with, despite being used for a single purpose, has its firmware written in Java; since the microprocessor is unknown, it's quite possible the Java Virtual Machine (JVM) had to be ported over to the processor before the hardware designers could write firmware for it. Presumably, they considered this worthwhile to be able to write the control code in a language they're comfortable with, even though it probably would have been much more effective to just write the control code in whatever language they used to port the JVM in the first place, or maybe even take the effort to design an ASIC that can drive the peripheral instead.

Black Hat explains that this is really an example of an age-old adage: "When all you have is a hammer, everything looks like a nail", also referred to as the "law of the instrument" or, as in the title, the "golden hammer". The hardware developers probably only knew Java, and when they thought about how to write firmware for their new device, "Java" was the only solution that occurred to them.

Of course, instead of a hammer and a nail, Black Hat's analogy is about using bolt-cutters and vodka to get through the lock on Wolf Blitzer's boathouse. Not-so-coincidentally, Black Hat is actually holding a pair of bolt-cutters and a mostly empty vodka bottle; the implication is that Black Hat did, in fact, drunkenly break into Blitzer's boathouse the previous night, which is why he has just now entered the door at the start of the strip. The changes he makes to the adage implies that he believes vodka and boltcutters are designed specifically to be used on Blitzer's boathouse, an interpretation that fits Black Hat's warped and anarchic disposition. Most normal people would react with shock at what Black Hat has (allegedly) done, but Cueball, being either extremely jaded by the (mis)use of Java or simply desensitized to Black Hat's behaviour, can only bring himself to say that he's glad Black Hat's been having more fun than him.

The title text implies that Black Hat had to break into a number of boathouses before he found Blitzer's, and that his boat did not survive the evening. The use of the phrase 'our night' allows us to infer that Black Hat was not alone when he broke into the boathouse (Danish would probably be his most likely partner in crime).

Transcript[edit]

[Black Hat is going through a door, an almost-empty bottle in his hand. A voice speaks to him from off panel.]
Cueball: Seriously? This thing runs Java? It's single-purpose hardware!
[Cueball is sitting at a computer, holding some device which is wired to a box, and pointing at the screen.]
Cueball: I bet they actually hired someone to spend six months porting this JVM so they could write their 20 lines of code in a familiar setting.
[Black Hat has a pair of bolt cutters in his hand that had been obscured in the first panel.]
Black Hat: Well, you know what they say— When all you have is a pair of bolt cutters and a bottle of vodka, everything looks like the lock on the door of Wolf Blitzer's boathouse.
Cueball: I'm glad you had a nice night.


comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!

Discussion

What is the title referencing? 108.162.216.45 05:25, 12 December 2013 (UTC)

Isn't that one of the original intents of Java, that is embedded systems? Presumably Java does run in several PLC type devices, but I have no first had account on this; Java certainly is not popular or common there. I checked the Wikipedia page and smart TV's were mentioned, this for 1991. 108.162.230.131 21:49, 12 December 2014 (UTC)

Not all embedded systems are single-purpose hardware. Smart TVs use Java, so other developers can also easily create additional applications for them. Condor70 (talk) 12:40, 15 July 2015 (UTC)

Does anybody know why Randall choose Wolf Blitzer for this comic? Does he have some relation to boats? Condor70 (talk) 12:40, 15 July 2015 (UTC)

Presumably Randall knows, though it could be something as simple as "He's wealthy enough to have a boat and most people would know who he is". -Pennpenn 108.162.250.162 06:39, 30 September 2015 (UTC)

Nobody outside America has heard of Wolf Blitzer. Just sayin'. Brenda (talk) 00:39, 29 June 2018 (UTC)

Golden hammer is also usual anti-pattern in software design. Means overkill. https://sourcemaking.com/antipatterns/golden-hammer

A good, brief explanation of golden hammer is found here:
https://en.wikipedia.org/wiki/Law_of_the_instrument#Computer_programming
173.245.54.49 02:28, 18 August 2020 (UTC)

I dont know who this Wolf Blitzer dude is so I will leave some links. Wikieditor431 (talk) 17:04, 12 February 2021 (UTC)Wikieditor431