Reputation
2,015
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
5 10
Newest
 Custodian
Impact
~24k people reached

15h
reviewed Approve How do I design a subclass whose method contradicts its superclass?
Jun
26
awarded  Custodian
Jun
26
reviewed Approve Why can't native machine code be easily decompiled?
Jun
26
revised Why would a program use a closure?
deleted 4 characters in body
Jun
26
revised Why would a program use a closure?
added 617 characters in body
Jun
24
revised Simple and clean way of comparing three numbers
added 50 characters in body
Jun
24
comment Simple and clean way of comparing three numbers
(1) why auxiliary macros instead of functions? (2) why do you need visual confirmation here? is it really your core problem or is the need for visual confirmation a consequence of code duplication? Your best option is to factorize your code into a single, simple function that you check once for all.
Jun
24
revised Simple and clean way of comparing three numbers
added 633 characters in body
Jun
24
comment Simple and clean way of comparing three numbers
More constructively: I'd suggest to simplify your answer by leaving out some details and thinking about the structure of your answer. I appreciate that you took time to write and post the C++ code generating permutations, but maybe you could give the main result and only one table: as it is now, it looks like you dumped all your work as-is. I almost failed to spot the TL;DR thing (you could start with that). Hope it helps.
Jun
24
comment Simple and clean way of comparing three numbers
-1: wouldn't reducing the number of decisions lead to simpler code paths and more readable code? You argument is not clear: first, you say everybody is wrong; then, you put not one or two but three tables; I hoped they would lead to a simpler way to compute the result but instead you confirmed what everybody else already knew (OP's code does the right thing). Sure, the question is about readability, but readability is not achieved only by modifying code layout (you admit your changes would hardly fit existing code standards). It makes sense to simplify logic when optimizing for readability.
Jun
23
revised Simple and clean way of comparing three numbers
deleted 3 characters in body
Jun
23
revised Simple and clean way of comparing three numbers
added 44 characters in body
Jun
22
revised Simple and clean way of comparing three numbers
deleted 112 characters in body
Jun
22
comment Simple and clean way of comparing three numbers
@DocBrown Granted, most of the benefits come from the early exit behavior.
Jun
22
comment Simple and clean way of comparing three numbers
@PieterB I was wronlgy assuming that it would not matter if we returned either MOSTLY_A or MOSTLY_C in case a == c and a > b. This is fixed. Thanks.
Jun
22
revised Simple and clean way of comparing three numbers
added 255 characters in body
Jun
22
revised Simple and clean way of comparing three numbers
added 500 characters in body
Jun
22
answered Simple and clean way of comparing three numbers
Jun
19
comment In git, how to do versioning for a dozen libraries all worked at in parallel
@sbi What are submodules if not a special case of branching and tagging? You think submodules are about dependency management, because they also keep track of dependencies. But sure, please reinvent submodules with tags if you want, I don't mind. I don't understand your problem: if reviewed code is a prime feature, your must budget some time for reviews. You are not bogged down, you go as fast as possible with the constraints put on you.
Jun
19
revised In git, how to do versioning for a dozen libraries all worked at in parallel
added 584 characters in body