Click here to Skip to main content
15,902,114 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: Vintage code Pin
Jörgen Sigvardsson1-Jun-07 3:00
Jörgen Sigvardsson1-Jun-07 3:00 
GeneralRe: Vintage code Pin
Chris Losinger1-Jun-07 4:02
professionalChris Losinger1-Jun-07 4:02 
GeneralRe: Vintage code Pin
Jörgen Sigvardsson1-Jun-07 4:09
Jörgen Sigvardsson1-Jun-07 4:09 
GeneralRe: Vintage code Pin
leppie29-May-07 5:34
leppie29-May-07 5:34 
GeneralRe: Vintage code Pin
Stephen Hewitt29-May-07 17:31
Stephen Hewitt29-May-07 17:31 
GeneralRe: Vintage code Pin
Tim Carmichael30-May-07 5:28
Tim Carmichael30-May-07 5:28 
GeneralRe: Vintage code Pin
ScottM14-Jun-07 2:22
ScottM14-Jun-07 2:22 
GeneralSELECT * + datareader.getstring(0...100) = Nightmare Pin
Dave Herren25-May-07 16:09
Dave Herren25-May-07 16:09 
Someone just gave a database example on the forum using select * and I needed to drop in here and do a brief rant. I realize it was just an example and was unrelated to what they were showing, but still... I just got through fixing an application where this caused problems. I needed to make a small change to the application which required me to to add a few database columns. I added the columns in between related columns in the table. This of coarse broke everything because in addition to select * they also used datareader.getstring(0) ect. for the 60+ fields returned from the table. My additions put the columns in a new order when retrieved with select *.

Of course this wasn't the only problem... the whole thing was a nightmare. MS access backend, which of course means tons of bad inline sql (not paramitized). One big God class that handled everything and no database layer. Every small change I made broke 5 unrelated things. I ended up refactoring the whole thing. I pulled out related functionality into static helper classes, bad coding practice I know, but there wasn't time for proper class design. But I did implement some interfaces and decoupled significant sections of the code so that I could make changes without breaking everything.

Any way that's my coding horror rant... thanks I feel better.

topcoderjax - Remember, Google is your friend.

GeneralRe: SELECT * + datareader.getstring(0...100) = Nightmare Pin
PIEBALDconsult26-May-07 5:23
mvePIEBALDconsult26-May-07 5:23 
GeneralRe: SELECT * + datareader.getstring(0...100) = Nightmare Pin
Dave Herren26-May-07 9:03
Dave Herren26-May-07 9:03 
GeneralRe: SELECT * + datareader.getstring(0...100) = Nightmare Pin
John R. Shaw29-May-07 3:01
John R. Shaw29-May-07 3:01 
GeneralString in hands of dumb****s Pin
Cristian Amarie23-May-07 0:37
Cristian Amarie23-May-07 0:37 
GeneralRe: String in hands of dumb****s Pin
maz233123-May-07 10:01
maz233123-May-07 10:01 
GeneralRe: String in hands of dumb****s Pin
KarstenK23-May-07 22:56
mveKarstenK23-May-07 22:56 
AnswerRe: String in hands of dumb****s Pin
Leon Segal29-May-07 3:11
Leon Segal29-May-07 3:11 
GeneralRe: String in hands of dumb****s Pin
maz23314-Jun-07 5:19
maz23314-Jun-07 5:19 
GeneralRe: String in hands of dumb****s Pin
Kochise24-May-07 2:27
Kochise24-May-07 2:27 
GeneralRe: String in hands of dumb****s Pin
Lutosław20-Aug-07 23:28
Lutosław20-Aug-07 23:28 
GeneralVB6: Graphics Pin
codemunkeh20-May-07 12:29
codemunkeh20-May-07 12:29 
GeneralRe: VB6: Graphics Pin
Pete O'Hanlon20-May-07 23:16
mvePete O'Hanlon20-May-07 23:16 
GeneralRe: VB6: Graphics Pin
Rage22-May-07 3:24
professionalRage22-May-07 3:24 
GeneralRe: VB6: Graphics Pin
codemunkeh22-May-07 4:01
codemunkeh22-May-07 4:01 
GeneralRe: VB6: Graphics [modified] Pin
CPallini24-May-07 3:15
mveCPallini24-May-07 3:15 
GeneralRe: VB6: Graphics Pin
maz233123-May-07 10:04
maz233123-May-07 10:04 
GeneralRe: VB6: Graphics Pin
KarstenK24-May-07 21:40
mveKarstenK24-May-07 21:40 

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.