Recent Coded Smorgasbord

Inspired by the Pop-up Potpourri, the examples presented here aren't necessarily "bad" code nor do they imply the miserable failure that we're all used to reading here. The examples are more-or-less fun snippets of code like ones that we've all written at one time or another.

Sep 2011

SingleQautedString(), RemoveMeFunction(), Human-Friendly Dates, and More

by in Coded Smorgasbord on

"Following the code-as-a-commodity principle," writes Jan, "our management team not only sends large projects overseas, but goes with the lowest bidder."

/**
 * @param str The string which must put into 2 Signle Quat
 * @return The single quated String
 */
public String SingleQautedString(String str) {
  return "'" + str + "'";
}