An engineering degree taught me how to use Karnaugh maps to optimize boolean expressions. Running a software company taught me to not.
-
-
@patio11 Or you could just leave a big comment like I did here: https://github.com/php/php-src/blob/e6ed53e011bee5ebb681e5a13db31ee7f08ef3d2/ext/standard/random.c#L105-L113 … (Also,@tqbf might like that implementation.) -
@patio11 Making it easier for the next person to understand the code > making it run faster.
End of conversation
New conversation -
-
-
@patio11 and then you can add a bit of refactoring with named expressions and have code read like English statement in your domain.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 i'd be tempted to extract out such tests into predicatesThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 I'd like to see some research because one line is much easier for me to read than a bunch of nested if/then/elses. And I'm normal.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 Most definitely. Also comment what the code should be doing. Maintenance is mainly reading comments with tiny bit of code tweaking.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 So it's not just me who feels that way! It infuriates me when I see complex logic grouped together. How do you even debug that?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
This Tweet is unavailable.
-
This Tweet is unavailable.
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.