"At my workplace, we have a wiki for the 'WLC' — the Worst Line Competition," Kirk writes. "We post lines of code that the lead developers have decided were good additions to the applications that we port. Here is one of the better ones:"

patno -= ((((((((((((((((40+1)+1)+1)+1)+1)+1)+1)+1)+1)+1)+10)+1)+('Z'-'A'))+1)+1)+1);

Currently, this line is winning the Worst Line Competition.

For most of our submissions, I can tell what the developer was going for (and where he went wrong). Not this time, though. I've narrowed it down to two theories — either the developer's number keys other than 4, 1, and 0 were broken, or he was playing a future prank on some poor maintenance developer.

I've taken the liberty of making it more readable (and therefore more profitable if paid by the line) below. You're welcome.

patno -=
(
 (
  (
   (
    (
     (
      (
       (
        (
         (
          (
           (
            (
             (
              (
               (
                40 + 1 //41
               )
               + 1 //42
              )
              + 1 //43
             )
             + 1 //44
            )
            + 1 //45
           )
           + 1 //46
          )
          + 1 //47
         )
         + 1 //48
        )
        + 1 //49
       )
       + 1 //50
      )
      + 10 //60
     )
     + 1 //61
    )
    +
    (
     'Z' - 'A' //86
    )
   )
   + 1 //87
  )
  + 1 //88
 )
 + 1 //89
);

Also, I should note that you may not use this code in your own applications. If you want to reduce a variable by 89, you'll have to find another way to do it.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!