Click here to Skip to main content
12,510,860 members (58,082 online)

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: .NET is Hell (subtitle: An error message from Microsoft) Pin
alexander ypema11-Oct-12 3:06
memberalexander ypema11-Oct-12 3:06 
GeneralRe: .NET is Hell (subtitle: An error message from Microsoft) Pin
Brendon123413-Oct-12 19:09
memberBrendon123413-Oct-12 19:09 
GeneralRe: .NET is Hell (subtitle: An error message from Microsoft) Pin
Stefan_Lang15-Oct-12 4:53
memberStefan_Lang15-Oct-12 4:53 
GeneralInfinate levels of hierarchal data Pin
asdrog3-Oct-12 1:30
memberasdrog3-Oct-12 1:30 
GeneralRe: MySQL "in (list)" example to recursivly get information - And the power of Loops! Infinate levels of hierarchal data Pin
mark merrens3-Oct-12 5:22
membermark merrens3-Oct-12 5:22 
GeneralRe: MySQL "in (list)" example to recursivly get information - And the power of Loops! Infinate levels of hierarchal data Pin
asdrog3-Oct-12 6:30
memberasdrog3-Oct-12 6:30 
GeneralRe: MySQL "in (list)" example to recursivly get information - And the power of Loops! Infinate levels of hierarchal data Pin
mark merrens3-Oct-12 6:43
membermark merrens3-Oct-12 6:43 
GeneralRe: MySQL "in (list)" example to recursivly get information - And the power of Loops! Infinate levels of hierarchal data Pin
AspDotNetDev3-Oct-12 6:45
protectorAspDotNetDev3-Oct-12 6:45 
GeneralRe: MySQL "in (list)" example to recursivly get information - And the power of Loops! Infinate levels of hierarchal data Pin
mark merrens3-Oct-12 7:02
membermark merrens3-Oct-12 7:02 
GeneralRe: MySQL "in (list)" example to recursivly get information - And the power of Loops! Infinate levels of hierarchal data Pin
asdrog3-Oct-12 13:21
memberasdrog3-Oct-12 13:21 
GeneralRe: MySQL "in (list)" example to recursivly get information - And the power of Loops! Infinate levels of hierarchal data Pin
Sentenryu4-Oct-12 0:50
memberSentenryu4-Oct-12 0:50 
GeneralRe: Infinate levels of hierarchal data Pin
Bernhard Hiller4-Oct-12 0:28
memberBernhard Hiller4-Oct-12 0:28 
GeneralRe: Infinate levels of hierarchal data Pin
asdrog4-Oct-12 11:35
memberasdrog4-Oct-12 11:35 
GeneralRe: Infinate levels of hierarchal data Pin
AspDotNetDev4-Oct-12 12:24
protectorAspDotNetDev4-Oct-12 12:24 
You may be interested in another way of doing hierarchical data in a table. It looks a bit like this:
IdParentIdIdPathWhateverData
1NULL1Blah
211_2Blah
311_3Blah
4NULL4Blah
521_2_5Blah
651_2_5_6Blah
If you include the full path of ID's (the ID and all ancestor ID's), you can reduce the number of queries required to get all descendents of a record. I think newer versions of SQL Server have some ability to query hierarchical data, but this approach will work on all SQL systems.

GeneralRe: Infinate levels of hierarchal data Pin
asdrog4-Oct-12 13:20
memberasdrog4-Oct-12 13:20 
GeneralCSS selector of the day PinPopular
Chris Maunder2-Oct-12 8:41
adminChris Maunder2-Oct-12 8:41 
GeneralRe: CSS selector of the day Pin
Zac Greve2-Oct-12 9:32
memberZac Greve2-Oct-12 9:32 
GeneralRe: CSS selector of the day Pin
Mike Ortmans2-Oct-12 22:38
memberMike Ortmans2-Oct-12 22:38 
GeneralRe: CSS selector of the day Pin
BobJanova2-Oct-12 23:31
memberBobJanova2-Oct-12 23:31 
GeneralRe: CSS selector of the day Pin
Chris Maunder3-Oct-12 4:19
adminChris Maunder3-Oct-12 4:19 
JokeRe: CSS selector of the day Pin
Marcus Kramer3-Oct-12 4:23
memberMarcus Kramer3-Oct-12 4:23 
GeneralRe: CSS selector of the day Pin
Sentenryu3-Oct-12 1:11
memberSentenryu3-Oct-12 1:11 
GeneralRe: CSS selector of the day Pin
Yvan Rodrigues3-Oct-12 3:55
memberYvan Rodrigues3-Oct-12 3:55 
GeneralRe: CSS selector of the day Pin
jayson lorenzen3-Oct-12 5:03
memberjayson lorenzen3-Oct-12 5:03 
GeneralRe: CSS selector of the day Pin
César de Souza3-Oct-12 5:13
memberCésar de Souza3-Oct-12 5:13 
GeneralRe: CSS selector of the day Pin
Chris Maunder3-Oct-12 8:20
adminChris Maunder3-Oct-12 8:20 
GeneralRe: CSS selector of the day Pin
jsc4211-Oct-12 0:43
memberjsc4211-Oct-12 0:43 
GeneralRe: CSS selector of the day Pin
Chris Maunder11-Oct-12 4:34
adminChris Maunder11-Oct-12 4:34 
GeneralCoded insults PinPopular
dojohansen28-Sep-12 4:14
memberdojohansen28-Sep-12 4:14 
GeneralRe: Coded insults PinPopular
Mike Winiberg30-Sep-12 20:29
memberMike Winiberg30-Sep-12 20:29 
AnswerRe: Coded insults Pin
Mark Springsteen30-Sep-12 21:07
memberMark Springsteen30-Sep-12 21:07 
GeneralRe: Coded insults Pin
Mike Winiberg30-Sep-12 21:16
memberMike Winiberg30-Sep-12 21:16 
GeneralRe: Coded insults Pin
Eddy Vluggen3-Oct-12 2:33
memberEddy Vluggen3-Oct-12 2:33 
GeneralRe: Coded insults Pin
Marco Bertschi10-Oct-12 2:09
memberMarco Bertschi10-Oct-12 2:09 
GeneralRe: Coded insults PinPopular
krubach21-Oct-12 0:42
memberkrubach21-Oct-12 0:42 
GeneralRe: Coded insults Pin
Bob10003-Oct-12 5:56
memberBob10003-Oct-12 5:56 
GeneralRe: Coded insults Pin
JohnLBevan30-Sep-12 22:46
memberJohnLBevan30-Sep-12 22:46 
GeneralRe: Coded insults Pin
Timothy J Sygitowicz1-Oct-12 5:10
memberTimothy J Sygitowicz1-Oct-12 5:10 
GeneralRe: Coded insults Pin
VallarasuS1-Oct-12 5:55
memberVallarasuS1-Oct-12 5:55 
GeneralRe: Coded insults PinPopular
patbob1-Oct-12 5:27
memberpatbob1-Oct-12 5:27 
GeneralRe: Coded insults Pin
BobJanova1-Oct-12 6:06
memberBobJanova1-Oct-12 6:06 
GeneralRe: Coded insults Pin
erzengel.des.lichtes1-Oct-12 6:58
membererzengel.des.lichtes1-Oct-12 6:58 
GeneralRe: Coded insults Pin
BobJanova2-Oct-12 0:02
memberBobJanova2-Oct-12 0:02 
GeneralRe: Coded insults Pin
Stefan_Lang2-Oct-12 4:30
memberStefan_Lang2-Oct-12 4:30 
GeneralRe: Coded insults Pin
emajyn1-Oct-12 6:25
memberemajyn1-Oct-12 6:25 
GeneralRe: Coded insults Pin
patbob1-Oct-12 7:02
memberpatbob1-Oct-12 7:02 
GeneralRe: Coded insults Pin
Stefan_Lang2-Oct-12 4:36
memberStefan_Lang2-Oct-12 4:36 
GeneralRe: Coded insults Pin
emajyn2-Oct-12 4:39
memberemajyn2-Oct-12 4:39 
GeneralRe: Coded insults Pin
Ravi Bhavnani2-Oct-12 9:38
memberRavi Bhavnani2-Oct-12 9:38 
GeneralRe: Coded insults Pin
ProgramFOX1-Oct-12 5:59
memberProgramFOX1-Oct-12 5:59 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.160929.1 | Last Updated 30 Sep 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid