Click here to Skip to main content
15,893,564 members

Survey Results

In which order do you test conditionals?   [Edit]

Survey period: 19 Jan 2009 to 26 Jan 2009

Behind every seemingly trival task there are vast schools of philosophy.

OptionVotes% 
Always if (statement is true) then... 42920.32
Always if (statement is false) then...572.70
It specifically depends on the situation1,42167.31
Random.482.27
I"ve never actually thought about it1567.39



 
GeneralRe: Huh? PinPopular
Hamed Musavi20-Jan-09 8:08
Hamed Musavi20-Jan-09 8:08 
GeneralRe: Huh? Pin
Jeremy Falcon20-Jan-09 6:40
professionalJeremy Falcon20-Jan-09 6:40 
GeneralRe: Huh? Pin
PIEBALDconsult20-Jan-09 7:57
mvePIEBALDconsult20-Jan-09 7:57 
GeneralRe: Huh? Pin
Jeremy Falcon20-Jan-09 9:45
professionalJeremy Falcon20-Jan-09 9:45 
GeneralRe: Huh? Pin
PIEBALDconsult20-Jan-09 12:32
mvePIEBALDconsult20-Jan-09 12:32 
GeneralRe: Huh? Pin
jordan1322-Jan-09 5:09
jordan1322-Jan-09 5:09 
GeneralUse a CASE tool to do the job right Pin
Stuart Cox19-Jan-09 5:47
Stuart Cox19-Jan-09 5:47 
GeneralRe: Use a CASE tool to do the job right Pin
Dave Sexton19-Jan-09 6:37
Dave Sexton19-Jan-09 6:37 
Depending on the problem at hand, I almost always opt for switch..case over multiple if..else statements. General rule of thumb in my style of coding is that if there's 3 or more conditions to check for then switch...case is the way to go. Makes code much easier to read as well.



But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
Because programming is an art, not a science. Marc Clifton
I gave up when I couldn't spell "egg". Justine Allen



GeneralRe: Use a CASE tool to do the job right Pin
Stuart Cox19-Jan-09 6:42
Stuart Cox19-Jan-09 6:42 
GeneralRe: Use a CASE tool to do the job right Pin
firegryphon19-Jan-09 13:02
firegryphon19-Jan-09 13:02 
GeneralRe: Use a CASE tool to do the job right Pin
W Balboos, GHB20-Jan-09 1:54
W Balboos, GHB20-Jan-09 1:54 
GeneralRe: Use a CASE tool to do the job right Pin
Dave Sexton20-Jan-09 2:00
Dave Sexton20-Jan-09 2:00 
GeneralRe: Use a CASE tool to do the job right Pin
W Balboos, GHB20-Jan-09 2:05
W Balboos, GHB20-Jan-09 2:05 
GeneralRe: Use a CASE tool to do the job right Pin
Dave Sexton20-Jan-09 3:02
Dave Sexton20-Jan-09 3:02 
GeneralRe: Use a CASE tool to do the job right Pin
W Balboos, GHB20-Jan-09 3:25
W Balboos, GHB20-Jan-09 3:25 
GeneralRe: Use a CASE tool to do the job right Pin
Dave Sexton20-Jan-09 4:47
Dave Sexton20-Jan-09 4:47 
GeneralMessage Removed Pin
19-Jan-09 5:35
professionalN_tro_P19-Jan-09 5:35 
GeneralRe: Check for Null Pin
WillemM19-Jan-09 5:48
WillemM19-Jan-09 5:48 
GeneralMessage Removed Pin
19-Jan-09 6:07
professionalN_tro_P19-Jan-09 6:07 
GeneralRe: Check for Null Pin
WillemM19-Jan-09 6:23
WillemM19-Jan-09 6:23 
JokeRe: Check for Null Pin
hfrmobile19-Jan-09 22:26
hfrmobile19-Jan-09 22:26 
GeneralRe: Check for Null Pin
Dave Sexton19-Jan-09 6:41
Dave Sexton19-Jan-09 6:41 
GeneralDepends on the situation Pin
Vikram A Punathambekar19-Jan-09 5:28
Vikram A Punathambekar19-Jan-09 5:28 
Generaltry this Pin
JackMcG19-Jan-09 4:18
JackMcG19-Jan-09 4:18 
AnswerRe: try this Pin
ghle19-Jan-09 14:31
ghle19-Jan-09 14:31 

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.