Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to write my if/else like the author advocates. The "true" condition first, followed by the "false".

A long time ago, a friend code reviewed and asked me to change to the most common condition first, as advocated in the Code Complete book (which I hadn't read at the time).

I still think it reads better if/else as true/false, but I am also big on having standards and a coding style, even if I disagree with them.

I mean, unless there's a lack of coding standard I will follow it.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: