Before delving into our assortment of WTF, I thought I'd take the opportunity to announce that The Daily WTF is now officially one year old. Note that this does *not* constitute as a "blogiversary." I refuse to recognize that particular arrangement of letters as a word, let alone use it in any manner other than pointing out that it's a non-word.

In any case, I want to thank, first and foremost, every one for reading; I suppose there wouldn't be much point in writing if it weren't for you. Praise is also due to everyone who's bravely submitted their coworkers' horrible code; I probably would have run out of examples within a few weeks (and don't hesitate to continue to submit, either). And finally, I gotta give props to Brady Gaster for suggesting that I take my daily complaints about work and turn it into a forum were everyone can join it; that was a pretty good idea. For your pedagogical purposes, here is the first post to appear exclusively on this domain: Function Batman().

Speaking of pedagogy, these Cornell students are really on the road to WTFery with the code from their Beverage Monitor project (found by Omer van Kloeten). To be fair, it is a pretty sweet project, though  ...

#define begin {
#define end   }
  if(buttonCounter == 30) {
    buttonCounter = 0;
  else {

Next up is code that Craig (yes, that Craig) came across. You probably never thought you'd ever have to wonder whether an anchor or ImageButton would take precedence, now didja? ..

<a href="<%=Application("siteroot")%>/submitpayment.aspx?code=18&scr=18b">
  <asp:ImageButton id="btnSubmit" runat="server" 
ImageUrl="../images/btnSubmit.gif" ImageAlign="Left"></asp:ImageButton> </a>

BAnVA sent in some code from the same programmer being PrintMonth(). This was, aparantly, also from the It-Worked-When-I-Tested-It department ...

If Not objUser.IsAdministrator Then
  Response.Redirect "anotherpage"
End If

Here's some Cold Fusion Josh Freitas came across while doing some maintence. Actually, these are a bit more mild than some of the more offensive ones he found ....

<cfif #UseGroups# EQ "1">
  <tr><td>There are no fixtured games to display</td></tr>
  <tr><td>There are no fixtured games to display</td></tr>

<!-- .... -->
<cfif CurrentRound NEQ "">
  <cfset LastRound = "">
  <cfset LastRound=#CurrentRound#>

And finally, here's another bit from Tristan Harmer. His colleague, aparantly, didn't quite understand the "repeating" nature of a repeater ...

Private Sub LoadAllAreaList()

  Dim dsDataSet As New DataSet()
  Dim drDataRow As DataRow

  'Create dummy dataset to allow us to use the repeater
  drDataRow = dsDataSet.Tables(0).NewRow()

  'Bind datareader to repeater
  rptAll.DataSource() = dsDataSet

End Sub

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