Click here to Skip to main content
15,867,568 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: iScreen = iScreen < 8 ? iScream : ... Pin
Reese Currie3-Aug-12 3:12
Reese Currie3-Aug-12 3:12 
GeneralRe: iScreen = iScreen < 8 ? iScream : ... Pin
SeattleC++3-Aug-12 6:04
SeattleC++3-Aug-12 6:04 
GeneralRe: iScreen = iScreen < 8 ? iScream : ... Pin
agolddog3-Aug-12 4:12
agolddog3-Aug-12 4:12 
GeneralRe: iScreen = iScreen < 8 ? iScream : ... Pin
BobJanova3-Aug-12 4:58
BobJanova3-Aug-12 4:58 
GeneralRe: iScreen = iScreen < 8 ? iScream : ... Pin
David MacDermot3-Aug-12 7:31
David MacDermot3-Aug-12 7:31 
GeneralRe: iScreen = iScreen < 8 ? iScream : ... Pin
RafagaX3-Aug-12 5:19
professionalRafagaX3-Aug-12 5:19 
GeneralRe: iScreen = iScreen < 8 ? iScream : ... Pin
Brisingr Aerowing15-Aug-12 15:20
professionalBrisingr Aerowing15-Aug-12 15:20 
General:'-( PinPopular
AspDotNetDev30-Jul-12 6:43
protectorAspDotNetDev30-Jul-12 6:43 
The following code is copy/pasted verbatim from a live production environment (the entire project/solution is on the production file system, side-by-side with the executing code):
VB.NET
Private Function GrabDataSet(ByVal sSQL As String) As DataSet
	Try
		Dim oDAdapt As SqlClient.SqlDataAdapter
		Dim oRs As New DataSet
		Dim cmdSQL As String = sSQL
		'oConn.Open()
		oRs = New DataSet
		oDAdapt = New SqlClient.SqlDataAdapter(cmdSQL, oConn)
		oDAdapt.Fill(oRs)
		Return oRs
		oRs.Dispose()
		oDAdapt.Dispose()
		'oConn.Close()
	Catch ex As Exception
		'MsgBox(ex.Message, MsgBoxStyle.OKOnly, "Database Error")
	End Try
End Function


Found this in a web service I'm upgrading. It's hard to find anything NOT wrong with this. Cry | :((

GeneralRe: :'-( Pin
Chris Meech30-Jul-12 7:10
Chris Meech30-Jul-12 7:10 
GeneralRe: :'-( Pin
AspDotNetDev30-Jul-12 7:20
protectorAspDotNetDev30-Jul-12 7:20 
GeneralRe: :'-( Pin
ExcellentOrg31-Jul-12 23:39
ExcellentOrg31-Jul-12 23:39 
GeneralRe: :'-( Pin
Andrei Straut30-Jul-12 9:07
Andrei Straut30-Jul-12 9:07 
GeneralRe: :'-( Pin
Pete O'Hanlon30-Jul-12 10:48
subeditorPete O'Hanlon30-Jul-12 10:48 
GeneralRe: :'-( Pin
AspDotNetDev30-Jul-12 12:59
protectorAspDotNetDev30-Jul-12 12:59 
GeneralRe: :'-( Pin
Pete O'Hanlon30-Jul-12 23:37
subeditorPete O'Hanlon30-Jul-12 23:37 
GeneralRe: :'-( Pin
Tom Deketelaere31-Jul-12 0:03
professionalTom Deketelaere31-Jul-12 0:03 
GeneralRe: :'-( Pin
Alan Burkhart1-Aug-12 17:28
Alan Burkhart1-Aug-12 17:28 
GeneralRe: :'-( Pin
ExcellentOrg31-Jul-12 23:41
ExcellentOrg31-Jul-12 23:41 
JokeRe: :'-( Pin
dan!sh 1-Aug-12 1:46
professional dan!sh 1-Aug-12 1:46 
GeneralRe: :'-( Pin
jim lahey30-Jul-12 23:29
jim lahey30-Jul-12 23:29 
GeneralRe: :'-( Pin
CDP180231-Jul-12 1:22
CDP180231-Jul-12 1:22 
GeneralRe: :'-( Pin
jim lahey31-Jul-12 1:27
jim lahey31-Jul-12 1:27 
GeneralRe: :'-( Pin
RobCroll31-Jul-12 15:02
RobCroll31-Jul-12 15:02 
GeneralRe: :'-( Pin
woosterprogrammer1-Aug-12 1:51
woosterprogrammer1-Aug-12 1:51 
GeneralRe: :'-( Pin
Schmuli1-Aug-12 3:00
Schmuli1-Aug-12 3:00 

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.