Click here to Skip to main content
15,895,084 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: OLE Pin
Patrick Etc.19-Sep-07 8:21
Patrick Etc.19-Sep-07 8:21 
GeneralRe: OLE Pin
Mike Dimmick19-Sep-07 9:37
Mike Dimmick19-Sep-07 9:37 
GeneralRe: OLE Pin
NormDroid20-Sep-07 1:08
professionalNormDroid20-Sep-07 1:08 
GeneralRe: OLE Pin
AEternal1-Oct-07 9:50
AEternal1-Oct-07 9:50 
GeneralRe: OLE Pin
NormDroid1-Oct-07 20:27
professionalNormDroid1-Oct-07 20:27 
GeneralRe: OLE Pin
Judah Gabriel Himango21-Sep-07 11:48
sponsorJudah Gabriel Himango21-Sep-07 11:48 
GeneralRe: OLE Pin
KarstenK24-Sep-07 1:43
mveKarstenK24-Sep-07 1:43 
GeneralIf at first you don't succeed... Pin
sushicw18-Sep-07 7:32
sushicw18-Sep-07 7:32 
While trying to debug some legacy code, I ran into this unique take on an infinite loop:

''' <summary><br />
''' Initializes the trouble ticket display for stations<br />
''' </summary><br />
Public Sub initalizeTTick(ByVal stationID As String)<br />
    'Database <br />
    Dim db As New LabConsoleDB()<br />
<br />
    Try<br />
        Dim dr As DataRow = db.StationDetailedRecord(stationID)<br />
        If dr Is Nothing Then Return<br />
<br />
        'Populate the textbox for the trouble ticket<br />
        txtTTick.Text = "Location:" & vbTab & stationID("stnName").ToString().ToUpper() & vbCrLf<br />
        txtTTick.Text = txtTTick.Text & "Model:" & vbTab & dr("machManuf").ToString() & " " & dr("machModel").ToString() & vbCrLf<br />
        txtTTick.Text = txtTTick.Text & "Serial:" & vbTab & stationID("machSerial").ToString() & vbCrLf<br />
        txtTTick.Text = txtTTick.Text & "ICN:" & vbTab & dr("machICN").ToString() & vbCrLf<br />
        txtTTick.Text = txtTTick.Text & "" & vbCrLf<br />
        txtTTick.Text = txtTTick.Text & "Problem:" & vbTab & vbCrLf<br />
        lblStnName.Text = dr("stnName").ToString().ToUpper()<br />
<br />
        'Show the form<br />
        Me.StartPosition = FormStartPosition.CenterScreen<br />
        Me.Show()<br />
    Catch<br />
        Call initalizeTTick(stationID)<br />
    End Try<br />
End Sub

GeneralRe: If at first you don't succeed... Pin
Pete O'Hanlon18-Sep-07 10:56
mvePete O'Hanlon18-Sep-07 10:56 
GeneralRe: If at first you don't succeed... Pin
PIEBALDconsult18-Sep-07 11:30
mvePIEBALDconsult18-Sep-07 11:30 
GeneralRe: If at first you don't succeed... Pin
Liam O'Hagan18-Sep-07 13:30
Liam O'Hagan18-Sep-07 13:30 
GeneralRe: If at first you don't succeed... Pin
PIEBALDconsult18-Sep-07 14:56
mvePIEBALDconsult18-Sep-07 14:56 
GeneralRe: If at first you don't succeed... [modified] Pin
DavidNohejl18-Sep-07 22:55
DavidNohejl18-Sep-07 22:55 
GeneralRe: If at first you don't succeed... Pin
Steve Hansen18-Sep-07 21:18
Steve Hansen18-Sep-07 21:18 
GeneralRe: If at first you don't succeed... Pin
sushicw19-Sep-07 8:41
sushicw19-Sep-07 8:41 
GeneralRe: If at first you don't succeed... Pin
John R. Shaw21-Sep-07 17:57
John R. Shaw21-Sep-07 17:57 
GeneralRe: If at first you don't succeed... Pin
StevenWalsh23-Sep-07 16:41
StevenWalsh23-Sep-07 16:41 
GeneralTell me... Pin
etkid8418-Sep-07 6:24
etkid8418-Sep-07 6:24 
JokeRe: Tell me... Pin
Big Daddy Farang18-Sep-07 6:35
Big Daddy Farang18-Sep-07 6:35 
GeneralRe: Tell me... Pin
DavidNohejl18-Sep-07 22:51
DavidNohejl18-Sep-07 22:51 
GeneralRe: Tell me... Pin
etkid8419-Sep-07 2:44
etkid8419-Sep-07 2:44 
GeneralRe: Tell me... Pin
RoswellNX19-Sep-07 17:55
RoswellNX19-Sep-07 17:55 
GeneralRe: Tell me... Pin
CARPETBURNER27-Sep-07 4:32
CARPETBURNER27-Sep-07 4:32 
GeneralRe: Tell me... Pin
RoswellNX27-Sep-07 11:30
RoswellNX27-Sep-07 11:30 
GeneralRe: Tell me... Pin
charlieg25-Sep-07 14:10
charlieg25-Sep-07 14:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.