Click here to Skip to main content
15,890,690 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: Initializing an array of structures Pin
Luc Pattyn23-Mar-09 8:27
sitebuilderLuc Pattyn23-Mar-09 8:27 
GeneralRe: Initializing an array of structures Pin
Thomas Weller23-Mar-09 8:35
Thomas Weller23-Mar-09 8:35 
GeneralRe: Initializing an array of structures Pin
Luc Pattyn23-Mar-09 8:43
sitebuilderLuc Pattyn23-Mar-09 8:43 
GeneralRe: Initializing an array of structures Pin
Adrian Cole23-Mar-09 10:00
Adrian Cole23-Mar-09 10:00 
GeneralRe: Initializing an array of structures Pin
Fatbuddha 123-Mar-09 23:34
Fatbuddha 123-Mar-09 23:34 
GeneralRe: Initializing an array of structures Pin
VentsyV25-Mar-09 11:12
VentsyV25-Mar-09 11:12 
GeneralRe: Initializing an array of structures Pin
peterchen30-Mar-09 6:19
peterchen30-Mar-09 6:19 
GeneralRe: Initializing an array of structures Pin
Thomas Weller2-Apr-09 2:24
Thomas Weller2-Apr-09 2:24 
peterchen wrote:
I especially love the brackets he put around the loop bodies


Well, this can be a coding guideline. It may look a bit silly and pedantic to put brackets around a single statement, because it makes you write things like:

if (somecondition)
{
    return;
}


Tools like e.g. ReSharper (for C#) do that automatically, so you don't have to type. I've seen this often in larger teams, and it brings some more readability to the code. I do it myself...

Or, as you suggest, it's simply an absence of any thinking or understanding.
Who knows ? Cool | :cool:

Regards
Thomas

www.thomas-weller.de

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Programmer - an organism that turns coffee into software.


GeneralRe: Initializing an array of structures Pin
peterchen2-Apr-09 2:40
peterchen2-Apr-09 2:40 
General[Message Deleted] [modified] Pin
bulg26-Mar-09 7:05
bulg26-Mar-09 7:05 
GeneralRe: Initializing an array of structures Pin
Luc Pattyn26-Mar-09 7:08
sitebuilderLuc Pattyn26-Mar-09 7:08 
GeneralRe: [Message Deleted] Pin
bulg26-Mar-09 7:19
bulg26-Mar-09 7:19 
GeneralRe: [Message Deleted] Pin
Luc Pattyn26-Mar-09 9:05
sitebuilderLuc Pattyn26-Mar-09 9:05 
GeneralRe: Initializing an array of structures Pin
dighn23-Mar-09 13:13
dighn23-Mar-09 13:13 
GeneralRe: Initializing an array of structures Pin
PIEBALDconsult23-Mar-09 14:46
mvePIEBALDconsult23-Mar-09 14:46 
GeneralRe: Initializing an array of structures Pin
Luc Pattyn23-Mar-09 16:08
sitebuilderLuc Pattyn23-Mar-09 16:08 
GeneralRe: Initializing an array of structures Pin
PIEBALDconsult23-Mar-09 16:23
mvePIEBALDconsult23-Mar-09 16:23 
JokeRe: Initializing an array of structures Pin
Mladen Janković23-Mar-09 16:34
Mladen Janković23-Mar-09 16:34 
JokeRe: Initializing an array of structures Pin
Yusuf24-Mar-09 5:28
Yusuf24-Mar-09 5:28 
GeneralRe: Initializing an array of structures Pin
peterchen2-Apr-09 2:42
peterchen2-Apr-09 2:42 
GeneralThe "Yeah baby" increment way... PinPopular
akyriako7823-Mar-09 5:12
akyriako7823-Mar-09 5:12 
GeneralRe: The "Yeah baby" increment way... Pin
Thomas Weller23-Mar-09 7:48
Thomas Weller23-Mar-09 7:48 
GeneralRe: The "Yeah baby" increment way... Pin
akyriako7823-Mar-09 20:39
akyriako7823-Mar-09 20:39 
GeneralRe: The "Yeah baby" increment way... Pin
annathor24-Mar-09 1:04
annathor24-Mar-09 1:04 
GeneralRe: The "Yeah baby" increment way... Pin
Yusuf24-Mar-09 5:34
Yusuf24-Mar-09 5:34 

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.