Click here to Skip to main content
15,897,226 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: False selection... Pin
CDP180211-Oct-10 2:32
CDP180211-Oct-10 2:32 
GeneralRe: False selection... Pin
lordofawesome11-Oct-10 2:41
lordofawesome11-Oct-10 2:41 
GeneralRe: False selection... Pin
CDP180211-Oct-10 2:46
CDP180211-Oct-10 2:46 
GeneralRe: False selection... Pin
lordofawesome11-Oct-10 3:02
lordofawesome11-Oct-10 3:02 
GeneralRe: False selection... Pin
CDP180211-Oct-10 3:10
CDP180211-Oct-10 3:10 
GeneralRe: False selection... Pin
lordofawesome11-Oct-10 3:37
lordofawesome11-Oct-10 3:37 
GeneralRe: False selection... Pin
CDP180211-Oct-10 4:01
CDP180211-Oct-10 4:01 
GeneralRe: False selection... Pin
josda100011-Oct-10 4:05
josda100011-Oct-10 4:05 
lordofawesome wrote:
I believe BIT_DEPTH_MULTI and REFRESH_RATE_UNKNOWN don't need to be there.


According to the original function comments, that is incorrect. You can't just change the premise of the code on a whim. You can make it cleaner in any way you feel you want (even though it worked), but you can't change the unit requirements after it has already been in use like that.


lordofawesome wrote:
even if they should be there, it still would be a lot cleaner.


Fine, but you must include those constants if they were already there. incorporate them into your code.


lordofawesome wrote:
Even with 50 things to check it's much more readable using variables then doing some if structures


Some would agree with you, some would disagree. Let's put it this way: if someone wrote code that works, leave it alone. Why reinvent the wheel?

GeneralRe: False selection... PinPopular
Stryder_111-Oct-10 3:35
Stryder_111-Oct-10 3:35 
GeneralRe: False selection... Pin
CDP180211-Oct-10 3:46
CDP180211-Oct-10 3:46 
GeneralRe: False selection... Pin
lordofawesome11-Oct-10 3:46
lordofawesome11-Oct-10 3:46 
GeneralRe: False selection... Pin
Stryder_111-Oct-10 6:34
Stryder_111-Oct-10 6:34 
GeneralRe: False selection... Pin
lordofawesome11-Oct-10 6:35
lordofawesome11-Oct-10 6:35 
GeneralRe: False selection... Pin
ely_bob12-Oct-10 3:42
professionalely_bob12-Oct-10 3:42 
GeneralRe: False selection... Pin
ely_bob12-Oct-10 3:40
professionalely_bob12-Oct-10 3:40 
GeneralRe: False selection... Pin
David Skelly11-Oct-10 3:55
David Skelly11-Oct-10 3:55 
GeneralRe: False selection... Pin
lordofawesome11-Oct-10 4:23
lordofawesome11-Oct-10 4:23 
GeneralRe: False selection... Pin
David Skelly11-Oct-10 4:57
David Skelly11-Oct-10 4:57 
GeneralRe: False selection... Pin
lordofawesome11-Oct-10 5:40
lordofawesome11-Oct-10 5:40 
GeneralRe: False selection... Pin
ely_bob12-Oct-10 3:43
professionalely_bob12-Oct-10 3:43 
GeneralRe: False selection... Pin
ely_bob12-Oct-10 3:39
professionalely_bob12-Oct-10 3:39 
GeneralRe: False selection... Pin
lordofawesome12-Oct-10 4:23
lordofawesome12-Oct-10 4:23 
GeneralRe: False selection... Pin
ely_bob12-Oct-10 5:13
professionalely_bob12-Oct-10 5:13 
GeneralRe: False selection... Pin
James H12-Oct-10 4:02
James H12-Oct-10 4:02 
GeneralRe: False selection... Pin
LockH12-Oct-10 4:13
LockH12-Oct-10 4:13 

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.