Compilers are really good at this. Programmers are not. Write the function for the benefit of the person who'll be maintaining it.
-
-
-
If you've got complicated business logic it's easier to reason about commented cascading if/then statements than return (a && (b||!c)) || d
- 2 more replies
New conversation -
-
-
@patio11 I think you can get quite far by putting logic in to a well-named variables if(isInsideLeftBoundary && isInsideRightBoundary)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 Decision tables work as domain-specific KMaps where empty cells show gaps in state space coverage better than ifthenelse+comments.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 K-maps meant something when you were dealing with hardware limitations on 8-bit computers. Even Raspberri Pi has more than that.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 Funny. I just used a K-Map yesterday. Not to optimize, but to check the coverage of an ad hoc set of queries sent by an end user.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.