Archives Nov. 10, 2015
Java Jokes
Written by
on
in
Knight Errant,
Snaking.
So I ran across a snippet of code today in a Java codebase:
additionalCommands.add(new XYZAdminClientMenuItemAdditionalCommand(START_COMMAND, "Start Cluster")); additionalCommands.add(new XYZAdminClientMenuItemAdditionalCommand(STOP_COMMAND, "Stop Cluster"));
additionalCommands.add(new XYZAdminClientMenuItemAdditionalCommand(MON_COMMAND, "Start Monitor the Cluster"));
which, to any Python programmer looks like someone is pulling your leg.
Here's a Java version that doesn't seem quite so crazy to a Python programmer:
protected static ...