skip to main | skip to sidebar

yawmark.com

Thursday, April 29, 2010

Stupid coding tricks.

In a fit of distraction one day, this was the most ridiculous "solution" for converting a test score to a letter grade I could muster.
public static char S2G(int s) {
return (char)(1249078710>>s/10*3&7|64);
}

DailyWTF-worthy, I say.
Posted by Steve at 8:31 AM 0 comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2012 (1)
    • ►  March (1)
  • ►  2011 (5)
    • ►  October (1)
    • ►  June (2)
    • ►  February (1)
    • ►  January (1)
  • ▼  2010 (18)
    • ►  November (3)
    • ►  September (1)
    • ►  August (2)
    • ►  July (6)
    • ►  May (2)
    • ▼  April (1)
      • Stupid coding tricks.
    • ►  March (3)
  • ►  2009 (23)
    • ►  December (1)
    • ►  November (1)
    • ►  August (4)
    • ►  July (1)
    • ►  June (1)
    • ►  April (3)
    • ►  March (11)
    • ►  February (1)
  • ►  2008 (2)
    • ►  June (1)
    • ►  May (1)
  • ►  2007 (11)
    • ►  December (2)
    • ►  October (1)
    • ►  September (3)
    • ►  August (1)
    • ►  July (2)
    • ►  June (2)

Search This Blog