News for hackers. Stuff that matters.
Re:Undebt: How We Refactored 3M Lines of Code by wcdolphin on Wednesday August 24, 2016 @03:42AM (#12350407)
I challenge that; I don't think a "bug free code base" actually exists. Joshua Bloch has a great article about this which I think may be of interest to other readers: https://research.googleblog.com/2006/06/extra-extra-read-all....

To paraphrase: We programmers need all the help we can get, and we should never assume otherwise. Careful design is great. Testing is great. Formal methods are great. Code reviews are great. Static analysis is great. But none of these things alone are sufficient to eliminate bugs: They will always be with us. A bug can exist for half a century despite our best efforts to exterminate it. We must program carefully, defensively, and remain ever vigilant.

Re:Undebt: How We Refactored 3M Lines of Code by tonyedgecombe on Wednesday August 24, 2016 @04:16AM (#12350523)
I don't think Spolsky was saying their product is bug free, just that they won't tolerate having known bugs.
Re:Undebt: How We Refactored 3M Lines of Code by bigiain on Wednesday August 24, 2016 @11:33PM (#12356834)
Not even quite "won't tolerate having known bugs" - it's fundamentally acknowledging that you will at times find bugs in your code base - but that when you do discover bugs you'll prioritise fixing them above adding new features or hitting pre-set project deadlines.

It's a great philosophy or methodology, but it can be very hard to execute on 100%. In the real world there are deadlines and resource requirements and impatient clients and produce launch plans with set dates and trade shows starting next week and the Thanksgiving/Xmas launch opportunity and and and.

Re:Undebt: How We Refactored 3M Lines of Code by kmorgan on Wednesday August 24, 2016 @08:28AM (#12351492)
There exist, however, code bases where any refactoring or feature addition exposes a latent bug that has to be fixed before proceeding. Additionally, fixing that bug often exposes another one.
Re:Undebt: How We Refactored 3M Lines of Code by BurningFrog on Wednesday August 24, 2016 @11:55AM (#12352930)
We didn't have a bug free code base, but it was rare that someone found an actual bug. As I remember it, it happened maybe once or twice a month in an 8 person team.

At other places I've worked, I wouldn't raise an eyebrow if I found 3 bugs in a day, just trying to get other stuff done.

Re:Undebt: How We Refactored 3M Lines of Code by lmm on Wednesday August 24, 2016 @05:12AM (#12350702)
That bug exists because it's written in a language where + is permitted to silently do surprising things, for reasons that made sense as a performance optimization for general-purpose computers in the '70s and embedded systems in the '90s (the original target of Java) but do not make sense for general-purpose computers today.

Better languages are possible. Provably correct software is possible. We really can eliminate bugs.

Re:Undebt: How We Refactored 3M Lines of Code by bennofs on Wednesday August 24, 2016 @06:13AM (#12350914)
> Provably correct software is possible.

Even then, the software is provably correct according to some specification, which can still have bugs. No technology can fully prevent logic bugs.

Re:Undebt: How We Refactored 3M Lines of Code by DanWaterworth on Wednesday August 24, 2016 @06:21AM (#12350944)
You're technically correct, but in practice, proving that software does confirm to a formal specification is, empirically, a good way of drastically reducing defects.
Re:Undebt: How We Refactored 3M Lines of Code by jbergens on Wednesday August 24, 2016 @05:32AM (#12350760)
Often when people mention provably correct software what they mean is software that don't crash and always produces output for correct input. It usually doesn't mean that the output is correct...
Re:Undebt: How We Refactored 3M Lines of Code by chimprich on Wednesday August 24, 2016 @05:27AM (#12350749)
> Provably correct software is possible.

Ah cool, so you've solved the halting problem then?

Re:Undebt: How We Refactored 3M Lines of Code by DanWaterworth on Wednesday August 24, 2016 @06:06AM (#12350880)
You don't need to solve the halting problem to write provably correct software (that is, software that conforms to a formal specification). The halting problem (and Rice's theorem) come into play when you are trying to deduce things about arbitrary programs written in turing complete languages.

It's like the difference between being able to express proofs in maths, versus having a method of deciding the validity of arbitrary propositions. We can certainly write programs that we can we can prove things about, but given an arbitrary program, we can't always tell whether it will do the right thing.

Re:Undebt: How We Refactored 3M Lines of Code by lmm on Wednesday August 24, 2016 @06:09AM (#12350894)
It was "solved" in 1940 (proven in 1967) by the simply typed lambda calculus.
Re:Undebt: How We Refactored 3M Lines of Code by weavie on Wednesday August 24, 2016 @05:42AM (#12350783)
They didn't say it had to be Turing complete.
Re:Undebt: How We Refactored 3M Lines of Code by DanWaterworth on Wednesday August 24, 2016 @06:09AM (#12350891)
It's not about turing completeness. Deducing arbitrary properties of programming written in primitive recursive languages is also undecidable. This is why type inference in dependently typed languages is undecidable.