Click here to Skip to main content
15,867,141 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: The worst error message ever, ever Pin
I.explore.code1-Oct-11 4:38
I.explore.code1-Oct-11 4:38 
Generalamusing message which I got while viewing this thread Pin
bVagadishnu3-Oct-11 3:53
bVagadishnu3-Oct-11 3:53 
GeneralRe: The worst error message ever, ever Pin
Asday3-Oct-11 6:27
Asday3-Oct-11 6:27 
GeneralRe: The worst error message ever, ever Pin
KP Lee3-Oct-11 19:16
KP Lee3-Oct-11 19:16 
GeneralRe: The worst error message ever, ever Pin
Craig Baird3-Oct-11 21:47
Craig Baird3-Oct-11 21:47 
GeneralRe: The worst error message ever, ever Pin
Dave Sewhuk5-Oct-11 7:41
Dave Sewhuk5-Oct-11 7:41 
GeneralRe: The worst error message ever, ever Pin
GStrad6-Oct-11 2:31
professionalGStrad6-Oct-11 2:31 
GeneralAh, VB ... PinPopular
Firo Atrum Ventus26-Sep-11 23:09
Firo Atrum Ventus26-Sep-11 23:09 
I'm having bad day today as I stumbled across some VB code that's worse than usual coding horror. So I decided to relieve my mind by sharing those gems here.
VB
If _Inspeksi = Inspeksi.JTM Then
    Else
        SQL = "SELECT ID_GI FROM AGARDU_INDUK WHERE NO_GARDU='" & DDGI2.ID & "'"
        DT = New DataTable
        DT = GlobalClassV2.Globals.Instance.ExecuteQuery(SQL)
        SQL = ""
        If DT.Rows.Count = 0 Then
            Exit Function
        End If
        GINDUKR = DT.Rows(0)!ID_GI
        SQL = "SELECT ID_GD FROM AGARDU_DISTRIBUSI WHERE NO_GARDU='" & GINDUK & "'"
        DT = New DataTable
        DT = GlobalClassV2.Globals.Instance.ExecuteQuery(SQL)
        SQL = ""
        If DT.Rows.Count = 0 Then
            Exit Function
        End If
        GINDUK = DT.Rows(0)!ID_GD
End If
If GlobalClassV2.Globals.Instance.ExecuteQuery2(XSQL) = False Then
    Throw New Exception("GAGAL")
    Exit Function
End If
For iData As Integer = 1 To FG2.Rows.Count - 1
    If IsDBNull(FG2.Item(iData, 0)) = True Then
    Else
        DLInsert.InsertInspeksiJTMTR2_DETIL_NEWEST(False, pIDInspeksi, "R", dtTglPeriksa.Text, _
            CG.CheckNull(FG2.Item(iData, 0)), FG2.Item(iData, 8), "", CG.CheckNullNum(FG2.Item(iData, 13)), "", Split(CG.CheckNull(FG2.Item(iData, 2)), " - ")(0), _
            Split(CG.CheckNull(FG2.Item(iData, 3)), " - ")(0), "", "", _
            Split(CG.CheckNull(FG2.Item(iData, 4)), " - ")(0), CG.CheckNull(FG2.Item(iData, 5)), Split(CG.CheckNull(FG2.Item(iData, 7)), " - ")(0), _
            CG.CheckNull(FG2.Item(iData, 11)), "", Globals.Instance.EncodeDate(DateTime.Parse(FG2.Item(iData, 12))), _
            Split(CG.CheckNull(FG2.Item(iData, 13)), " - ")(0), CG.CheckNull(FG2.Item(iData, 5)), CG.CheckNull(FG2.Item(iData, 6)), _
            CG.CheckNull(FG2.Item(iData, 1)), Split(CG.CheckNull(FG2.Item(iData, 14)), " - ")(0), Split(CG.CheckNull(FG2.Item(iData, 15)), " - ")(0), _
            CG.CheckNull(FG2.Item(iData, 17)), Split(CG.CheckNull(FG2.Item(iData, 18)), " - ")(0), FG2.Item(iData, 9), FG2.Item(iData, 10))
    End If
Next

Excuse me for my improper grammar and typos.
It's because English is my primary language, not my first language.

My first languages are C# and Java.
VB, ASP, JS, PHP and SQL are my second language.
Indonesian came as my third language.
My fourth language? I'm still creating it, I'll let you know when it's done! Big Grin | :-D

GeneralRe: Ah, VB ... Pin
Bernhard Hiller27-Sep-11 0:42
Bernhard Hiller27-Sep-11 0:42 
GeneralRe: Ah, VB ... Pin
CDP180227-Sep-11 3:47
CDP180227-Sep-11 3:47 
GeneralRe: Ah, VB ... Pin
AspDotNetDev27-Sep-11 5:00
protectorAspDotNetDev27-Sep-11 5:00 
JokeRe: Ah, VB ... Pin
StM0n27-Sep-11 7:04
StM0n27-Sep-11 7:04 
GeneralRe: Ah, VB ... Pin
Sander Rossel27-Sep-11 7:51
professionalSander Rossel27-Sep-11 7:51 
GeneralRe: Ah, VB ... Pin
jgrogan29-Sep-11 20:52
jgrogan29-Sep-11 20:52 
GeneralRe: Ah, VB ... Pin
zenstain30-Sep-11 3:47
professionalzenstain30-Sep-11 3:47 
General21,662 Pin
AspDotNetDev23-Sep-11 9:02
protectorAspDotNetDev23-Sep-11 9:02 
GeneralRe: 21,662 Pin
StM0n23-Sep-11 11:09
StM0n23-Sep-11 11:09 
JokeRe: 21,662 Pin
Sander Rossel24-Sep-11 10:37
professionalSander Rossel24-Sep-11 10:37 
JokeRe: 21,662 Pin
AspDotNetDev24-Sep-11 11:00
protectorAspDotNetDev24-Sep-11 11:00 
GeneralRe: 21,662 Pin
Sander Rossel24-Sep-11 11:40
professionalSander Rossel24-Sep-11 11:40 
GeneralRe: 21,662 Pin
AspDotNetDev24-Sep-11 12:22
protectorAspDotNetDev24-Sep-11 12:22 
GeneralRe: 21,662 Pin
Sander Rossel24-Sep-11 12:50
professionalSander Rossel24-Sep-11 12:50 
GeneralRe: 21,662 Pin
AspDotNetDev24-Sep-11 14:16
protectorAspDotNetDev24-Sep-11 14:16 
GeneralRe: 21,662 Pin
BobJanova26-Sep-11 4:07
BobJanova26-Sep-11 4:07 
GeneralRe: 21,662 Pin
Sander Rossel26-Sep-11 8:01
professionalSander Rossel26-Sep-11 8:01 

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.