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

    bool subCondition1 = /* something kinda long */;
    bool subCondition2 = /* something also kinda long */;
    bool subCondition3 = /* something absurdly long */;
    bool condition = (subCondition1 && subCondition2) || subCondition3;

    if (condition) {
      /* do something */
    }
where, ideally, the sub conditions all have meaningful, relevant names that succinctly express what they were testing for.


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

Search: