Today’s coding WTF

This is some code—nothing added, nothing taken away—that I’m having to work with today. The temptation to rip the whole lot out and start again is so strong, I cannot tell you.

Must… be… strong…

 function functionNewDocSFSubmit01()

function functionNewDocSFSubmit02()

function functionNewDocSFSubmit03()

function functionNewDocSFSubmit04()

Help me Obi-Wan, you’re my only hope.


  1. Even money bet that there is an if statement somewhere that says something like:

    if (field.equals("01") { functionNewDocSFSubmit01
    } else if …. etc.


    Simon O'Doherty#
  2. What's your problem? It looks like good clean code to me. Very easy to understand.Ethann Castell#
  3. Blogging about it probably took more time than rewriting it? ;-)Dennis van Remortel#
  4. @1: Simon, you are spot on :-) Ben Poole#
  5. I did not give you permission to publish my code to the public ;-)Henning Heinz#
  6. Do people still get paid by the KLOC? Darren Duke#
  7. Oops! This is patented code! Oliver Schwabedissen#
  8. There should be a professional coding tribunal where you can submit code and dob in a coder who commits such heinous crimes of stoopidness and can be named-and-shamed.

    If future employers can see your record…I think alot of people would pick up their game. But alot of people would be unemployed to…me included…lolGiulio#
  9. I bet that represented the pinnacle of someones knowledge once upon a time. Perhaps it should stand as a warning to all :-)Jason#

Comments on this post are now closed.


I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.