Yes, that's right, I wrote "Vari-Post 2000." I'm actually the only person who never got tired of the some-really-big-number-with-the-occasional-XL-suffix fad. Anyway, as you may have gathered, it's time once again for a variety post ...

First up is a submission from Andrew Vos. I generally do my best to conceal the author of code posted here, but our submitter did take blame for this snippet. Note that he actually make it all the way to "Z" before shaking his, saying "WTF!", and starting over ...

Private Function GetLetter(ByVal Index As Integer) As String 
  Select Case Index 
    Case 0 Return "a" 
    Case 1 Return "b" 
    'SNIP: ... all the way to "Z"
  End Select 
End Function 

Christopher Sawyer is fortunate to work with a pretty extensive transaction monitoring system. It does all sorts of things from live charting to predictive analysis. Like anything else, it does have a few weak points ... one being the difficulty in determing whether a transaction was successful or not ....

Next we have Colin McGuigan, who was trying to figure out why their system wasn't sending out emails. The logs indicated no problems, so he took a look in the code. It would seem the original coder forgot to write "please" when requesting that the compiler handle errors ...

try
{
    System.Web.Mail.SmtpMail.Send(myMail);
} catch {
    // handle errors
}

Proving once again that some of us have waaaaay to much free time, "BAADF00D" was browsing through Overstock.com's CSS styles and found these curiously named classes. Spot the difference between the styles and their names ... you'll see it eventually ...

.plabel
{
    PADDING-RIGHT: 5px;
    PADDING-LEFT: 5px;
    PADDING-BOTTOM: 0px;
    COLOR: black;
    PADDING-TOP: 3px;
    TEXT-ALIGN: left;
    white-space: nowrap;
}

.plabelnowrap
{
    PADDING-RIGHT: 5px;
    PADDING-LEFT: 5px;
    PADDING-BOTTOM: 0px;
    COLOR: black;
    PADDING-TOP: 3px;
    TEXT-ALIGN: left;
}

Then there's Andy Korth who couldn't quite figure out what was so important with June 7th ...

If CDate(BeginDate) = CDate("6/7/1") Then
    BeginDate = BeginDate
End If

And finally we have Shane Courtrille, who demonstrates that higly-paid consultants do actually provide value. Note how much easier this is to use than typing "(myObject Is Nothing)" ...

PRIVATE FUNCTION IsNothing(Obj)
  IF Obj Is Nothing THEN
    IsNothing = TRUE
  ELSE
    IsNothing = FALSE
  END IF
END FUNCTION
[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!