1,619 reputation
49
bio website johansens.us
location Michigan
age
visits member for 3 years, 7 months
seen Mar 3 at 16:36

Feb
24
answered Is it reasonable to assume that any physical quantity can be represented by a 64-bit integer without overflow or underflow?
Jan
30
comment Leaving intentional bugs in code for testers to find
I'm guessing that Patton meant that you should have rigorous training and field exercises during peace time. The analogy would be to have rigorous classes in IT school or post-degree training. I'm pretty sure Patton didn't mean that officers should be instructed to shoot at their own troops from behind to keep the troops on their toes!
Jan
30
awarded  Nice Answer
Jan
28
answered Leaving intentional bugs in code for testers to find
Jan
28
comment Leaving intentional bugs in code for testers to find
"incentivized to find the bugs you know are there" Excellent point. If an organization is doing this, it likely means that someone is breathing down the QA folks necks to make sure they find the planted bugs, so that will be their top priority. What if they get together and figure out, say, "Hey the planted bugs are almost always that it fails to save one field on an edit screen with a bunch of data" (or whatever). Then they'll spend an inordinate amount of time looking for that one type of bug, and increase the chance that they'll miss other types of bugs.
Jan
25
comment Throw exception or let code fail
@MarcvanLeeuwen RE the potential race condition: True. I find that a more persuasive argument.
Jan
25
comment Throw exception or let code fail
@MarcvanLeeuwen Why is efficiency not important in the case where there is an error? I don't think that's necessarily true at all. If in the error case the program will display an error message to the user and stop, while in the success case it does a bunch of additional work, it might be relatively less important. But at this level you don't know that. Maybe when there's an error the caller selects a different NAME and tries again, and keeps trying different names until if finds one that's a success -- for example in a function that's trying to assign a unique name.
Jan
25
awarded  Supporter
Jan
23
comment What is negative code?
@Synetech Sure ... to a point. If by replacing clear, readable code with something hopelessly cryptic I shave 0.01 seconds off the time it takes the screen to respond to a button press, almost certainly not worth it. If an easier to read function means that a screen that used to return in half a second now takes half an hour, no. But I agree that most of the time, readability and maintainability are more important than speed, because in real life, speed gains are usually -- not always, but usually -- trivial.
Aug
26
awarded  Yearling
Dec
31
comment What is negative code?
@Synetech Sure, brevity achieved by using some obscure construct is not a plus. But brevity achieved by eliminating redundant code is a huge plus. Brevity achieved by eliminating code that is never executed is a big plus too. Brevity achieved by simplifying the algorithm requires case by case analysis: If by simplifying it you have made it easier to understand but take longer to run, that could go either way.
Dec
31
comment What is negative code?
A more serious analogy would be that measuring software productivity by lines of code is like measuring progress on an auto repair job by counting the number of grease rags used. This could be accurate to an extent: the more work the mechanic does, the more grease rags he'll use. But it counts mistakes and wasted effort as much as effort that actually leads to a goal, and a big mistake -- like accidentally breaking an oil line and having to clean up a huge mess -- gets counted as major progress when it's really the opposite.
Aug
26
awarded  Yearling
Aug
26
awarded  Yearling
Dec
27
awarded  Nice Answer
Aug
27
awarded  Nice Answer
Aug
26
awarded  Mortarboard
Aug
26
awarded  Good Answer
Aug
26
awarded  Teacher
Aug
26
awarded  Nice Answer