Software Engineering discussion

7 views
Code Complete > Using Conditionals

Comments Showing 1-3 of 3 (3 new)    post a comment »
dateUp arrow    newest »

message 1: by [deleted user] (new)

This chapter has some interesting advice on if and case statements. One new one for me is to always code an 'else' if you have an 'if then', and even in the case where 'else' is empty, to still code it and add a comment that you considered the else and decided that it should be empty. It sounds like a good idea to me.


message 2: by Aleksander (new)

Aleksander Shtuk | 84 comments I liked the idea of using default clause for detecting faults. I guess I just like every idea in this book that contributes to self testing code…


message 3: by Erik (new)

Erik | 165 comments Good chapter for new programmers. Nice ideas for readability and generally avoiding bugs too.

I think "Fallthroughs" on switch statements are fine when a comment line identifies the intent too.


back to top