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: Because Reasons Pin
Brisingr Aerowing4-Sep-16 18:16
professionalBrisingr Aerowing4-Sep-16 18:16 
GeneralRe: Because Reasons Pin
johannesnestler26-Jul-16 1:34
johannesnestler26-Jul-16 1:34 
GeneralRe: Because Reasons Pin
Ravichanadeepakarandescarar29-Jul-16 16:03
Ravichanadeepakarandescarar29-Jul-16 16:03 
GeneralRe: Because Reasons Pin
loctrice29-Jul-16 16:19
professionalloctrice29-Jul-16 16:19 
GeneralRe: Because Reasons Pin
Ravichanadeepakarandescarar29-Jul-16 16:39
Ravichanadeepakarandescarar29-Jul-16 16:39 
GeneralRe: Because Reasons Pin
loctrice29-Jul-16 17:50
professionalloctrice29-Jul-16 17:50 
GeneralRe: Because Reasons Pin
Vander Wunderbar31-Jul-16 11:37
Vander Wunderbar31-Jul-16 11:37 
GeneralRecursion schmecursion! Pin
PIEBALDconsult14-Jul-16 16:53
mvePIEBALDconsult14-Jul-16 16:53 
I found a novel (or at least weird and wonderful) way to avoid recursion when traversing the nodes in a TreeView. Jig | [Dance]

Here's a teaser:

C#
System.Windows.Forms.TreeNode nod = this.tvMain.SelectedNode as System.Windows.Forms.TreeNode ;

System.Collections.Generic.Stack<System.Collections.IEnumerator> sub = 
  new System.Collections.Generic.Stack<System.Collections.IEnumerator>() ;

sub.Push ( nod.Nodes.GetEnumerator() ) ;


Stay tuned for an article. Badger | [badger,badger,badger,badger...]
GeneralRe: Recursion schmecursion! Pin
Super Lloyd14-Jul-16 17:15
Super Lloyd14-Jul-16 17:15 
GeneralRe: Recursion schmecursion! Pin
Brisingr Aerowing14-Jul-16 17:28
professionalBrisingr Aerowing14-Jul-16 17:28 
GeneralRe: Recursion schmecursion! Pin
PIEBALDconsult14-Jul-16 18:50
mvePIEBALDconsult14-Jul-16 18:50 
GeneralRe: Recursion schmecursion! Pin
Brisingr Aerowing15-Jul-16 13:18
professionalBrisingr Aerowing15-Jul-16 13:18 
GeneralRe: Recursion schmecursion! Pin
PIEBALDconsult15-Jul-16 13:25
mvePIEBALDconsult15-Jul-16 13:25 
GeneralRe: Recursion schmecursion! Pin
Bernhard Hiller17-Jul-16 22:04
Bernhard Hiller17-Jul-16 22:04 
GeneralRe: Recursion schmecursion! Pin
PIEBALDconsult18-Jul-16 3:32
mvePIEBALDconsult18-Jul-16 3:32 
GeneralFound in old code Pin
Sanjay K. Gupta1-Jul-16 1:12
professionalSanjay K. Gupta1-Jul-16 1:12 
GeneralRe: Found in old code Pin
phil.o1-Jul-16 3:13
professionalphil.o1-Jul-16 3:13 
JokeRe: Found in old code Pin
ZurdoDev1-Jul-16 3:24
professionalZurdoDev1-Jul-16 3:24 
GeneralRe: Found in old code Pin
Rob Grainger14-Jul-16 4:39
Rob Grainger14-Jul-16 4:39 
GeneralRe: Found in old code Pin
BillW331-Jul-16 4:32
professionalBillW331-Jul-16 4:32 
GeneralRe: Found in old code Pin
Bernhard Hiller3-Jul-16 22:21
Bernhard Hiller3-Jul-16 22:21 
GeneralRe: Found in old code Pin
Sanjay K. Gupta4-Jul-16 2:44
professionalSanjay K. Gupta4-Jul-16 2:44 
GeneralRe: Found in old code Pin
F-ES Sitecore6-Jul-16 22:49
professionalF-ES Sitecore6-Jul-16 22:49 
GeneralRe: Found in old code Pin
Sanjay K. Gupta7-Jul-16 0:34
professionalSanjay K. Gupta7-Jul-16 0:34 
JokeRe: Found in old code Pin
Kyle Moyer6-Jul-16 10:30
Kyle Moyer6-Jul-16 10:30 

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.