Click here to Skip to main content
15,887,683 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: Is this a coding horror? [modified] Pin
annathor30-Aug-11 0:06
annathor30-Aug-11 0:06 
QuestionRe: Is this a coding horror? Pin
Paladin200030-Aug-11 3:38
Paladin200030-Aug-11 3:38 
AnswerRe: Is this a coding horror? Pin
annathor30-Aug-11 4:48
annathor30-Aug-11 4:48 
GeneralRe: Is this a coding horror? Pin
Nagy Vilmos30-Aug-11 5:04
professionalNagy Vilmos30-Aug-11 5:04 
GeneralRe: Is this a coding horror? Pin
Marbry Hardin30-Aug-11 5:34
Marbry Hardin30-Aug-11 5:34 
GeneralRe: Is this a coding horror? Pin
BobJanova30-Aug-11 6:17
BobJanova30-Aug-11 6:17 
GeneralRe: Is this a coding horror? Pin
GibbleCH30-Aug-11 11:42
GibbleCH30-Aug-11 11:42 
GeneralRe: Is this a coding horror? Pin
BobJanova30-Aug-11 23:12
BobJanova30-Aug-11 23:12 
Up to a point. Code which contains nothing but several levels of 'well named functions' wrapped around a simple arithmetic calculation are a pain to debug (trying to actually find the places where calculations are done and therefore being able to see whether they're done right). It's kind of like trying to read a book by just looking at the contents page. It's hard to read such long names, too (unless you put in underscores to make it look like a sentence but then the arguments seem to be bound to the last word).

This would go in a function for me if I were using it in more than one place (which in this example I almost certainly would be).

Your proposed name misses the most important point, by the way. It should be called "STPVolume" or "GetVolumeAtSTP" or something like that.
GeneralRe: Is this a coding horror? Pin
GibbleCH31-Aug-11 3:56
GibbleCH31-Aug-11 3:56 
GeneralRe: Is this a coding horror? Pin
BobJanova31-Aug-11 6:04
BobJanova31-Aug-11 6:04 
GeneralRe: Is this a coding horror? Pin
GibbleCH31-Aug-11 7:50
GibbleCH31-Aug-11 7:50 
GeneralRe: Is this a coding horror? Pin
BobJanova1-Sep-11 0:40
BobJanova1-Sep-11 0:40 
GeneralRe: Is this a coding horror? Pin
YSLGuru2-Sep-11 6:57
YSLGuru2-Sep-11 6:57 
GeneralRe: Is this a coding horror? Pin
I.explore.code30-Aug-11 5:30
I.explore.code30-Aug-11 5:30 
GeneralRe: Is this a coding horror? Pin
patbob30-Aug-11 5:59
patbob30-Aug-11 5:59 
GeneralRe: Is this a coding horror? Pin
BloodyBaron29-Aug-11 22:38
BloodyBaron29-Aug-11 22:38 
GeneralRe: Is this a coding horror? Pin
GibbleCH30-Aug-11 11:44
GibbleCH30-Aug-11 11:44 
GeneralRe: Is this a coding horror? Pin
BloodyBaron30-Aug-11 22:21
BloodyBaron30-Aug-11 22:21 
GeneralRe: Is this a coding horror? Pin
GibbleCH31-Aug-11 3:56
GibbleCH31-Aug-11 3:56 
GeneralRe: Is this a coding horror? Pin
BobJanova31-Aug-11 0:03
BobJanova31-Aug-11 0:03 
GeneralRe: Is this a coding horror? Pin
Rob Grainger6-Sep-11 0:58
Rob Grainger6-Sep-11 0:58 
GeneralRe: Is this a coding horror? Pin
Eusebiu Marcu30-Aug-11 2:46
Eusebiu Marcu30-Aug-11 2:46 
GeneralRe: Is this a coding horror? Pin
BobJanova30-Aug-11 2:51
BobJanova30-Aug-11 2:51 
GeneralRe: Is this a coding horror? Pin
BobJanova30-Aug-11 2:47
BobJanova30-Aug-11 2:47 
GeneralRe: Is this a coding horror? Pin
BubingaMan30-Aug-11 3:03
BubingaMan30-Aug-11 3:03 

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.