|
by Joel Aufrecht
11:00 PM, 02 Aug 2005
One of the sites I read every morning is The Daily WTF, which highlights very bad code reported to be in use in production systems. Just as FuckedCompany reveals some of the rot and deception behind the shiny lies, The Daily WTF is more informative and useful for a working programmer (or technical manager) than many sites about how to do it the right way. I mention this because today's post was a bit special. Here's an excerpt. Note that the lines beginning with apostrophes are comments allegedly made by the original programmer himself.
' This code will calculate order total, mask it, and send it to ' the ThankYou.asp page, where it will then be unmasked to reveal ' its true beauty, just like the poor Phantom of the Opera. Randomize amount = oTotal maskerLeft = Int((999999 - 100000 + 1) * Rnd + 100000) maskerRight = Int((999999 - 100000 + 1) * Rnd + 100000)A large part of the value of the Daily WTF is the commentary on the awful code by other people. This excerpt and comment is choice: ' takes order total and jumbles it mathematically maskerAmount = ((((oTotal + 22) * 7 )) - 12) * 620
Categories:
Quotation
Comments (0)
|
Joel's Blog CategoriesChina (2 items)Denmark (22) Danish (11) Commentary (57) Quotation (131) War (24) Singapore (223) Public Finance (21) Institutional Analysis (15) Brain (5) Managing the Public Sector (15) Global Issues and Institutions (20) Non-State Actors in Governance (17) Leadership and Dynamics of Communication (12) Good News (97) Reviews (51) Baseball (31) Policy Analysis and Programme Evaluation (10) Urban Transport Policy (1) Archive
October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 June 2003 May 2003 April 2003 March 2003 February 2003 January 2003 April 2001 NotificationsYou may request notification for Joel's Blog. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||