News for hackers. Stuff that matters.
Re:Undebt: How We Refactored 3M Lines of Code by wRastel27 on Wednesday August 24, 2016 @01:58AM (#12349998)
"...time that could be better spent working on new features and shipping new code"

Can we please stop putting forth this idea that features >>> reliable product? The amount of dev time that a company will save from removing technical debt will likely be more than the extra sales the company will get from a new feature. I look forward to the day where the executive team comes to the developers and ask why they are working on features instead of cutting down technical debt.

Re:Undebt: How We Refactored 3M Lines of Code by r00fus on Wednesday August 24, 2016 @02:24AM (#12350105)
> I look forward to the day where the executive team comes to the developers and ask why they are working on features instead of cutting down technical debt.

I had a Philippino friend who told me of his early experience in a Japanese development outfit - the team got praised by management (maybe not CEO) on performance improvements and code reduction. At the time I thought those priorities would never have flown in the US (though was of like thinking).

So this mindset does/did exist.

Re:Undebt: How We Refactored 3M Lines of Code by bmj on Wednesday August 24, 2016 @07:24AM (#12351194)
Do you know what sort of project/product the team produced? I find that to be a key indicator of what sort of work management expects.

If are building something that will be sold, particularly in a competitive market, management will almost always believe that new features trump reducing technical debt. To a product manager, even four weeks of technical debt reduction sounds like "no new features for a month."

Re:Undebt: How We Refactored 3M Lines of Code by initram on Wednesday August 24, 2016 @01:15PM (#12353561)
>To a product manager, even four weeks of technical debt reduction sounds like "no new features for a month."

Yeah, but if you can't implement new features in under a month because the code is such a mess, then maybe spending a month cleaning it up will allow you to do more features in a shorter amount of time, thus increasing revenue faster than just hacking more features into the existing crappy codebase. Obviously it depends on the codebase, but you have to look at both long and short term goals to make good decisions.

Re:Undebt: How We Refactored 3M Lines of Code by douche on Wednesday August 24, 2016 @07:30AM (#12351227)
Sometimes it's a struggle to get blessing for four days of technical debt reduction...
Re:Undebt: How We Refactored 3M Lines of Code by bigiain on Wednesday August 24, 2016 @02:19AM (#12350088)
There is an old Joel On Software blog post I was reading recently that talked about a methodology at Microsoft they called "Zero defects", where fixing known bug _alway_ had priority over working on new features.

<google google google>

Here - pont 5 in this post: http://www.joelonsoftware.com/articles/fog0000000043.html

Re:Undebt: How We Refactored 3M Lines of Code by epidemian on Wednesday August 24, 2016 @03:02AM (#12350251)
Interesting. I recently read an article[1] where John Romero talks about the culture of early id Software and he mentions something similar:

> As soon as you see a bug, you fix it. Do not continue on. If you don’t fix your bugs your new code will be built on a buggy codebase and ensure an unstable foundation.

Looking back to the codebases i've worked with, this advice seems extremely wise.

[1] http://www.gamasutra.com/view/news/279357/Programming_princi...

Re:Undebt: How We Refactored 3M Lines of Code by sotojuan on Wednesday August 24, 2016 @08:58AM (#12351650)
I guess he forgot about this when making Daikatana? :-) Good advice nonetheless. It's a bit far-fetched, but reminds me of the "if you can do it in less than fives minutes, do it now" thing.
Re:Undebt: How We Refactored 3M Lines of Code by pjmorris on Wednesday August 24, 2016 @12:08PM (#12353021)
Obligatory mention of 'Masters of Doom'. I think Romero may have been a better programmer than first-time large project manager, but he wouldn't be the only one :)
Re:Undebt: How We Refactored 3M Lines of Code by Cu-chulainn on Wednesday August 24, 2016 @09:57AM (#12352016)
That's exactly what "Lean" is all about. When you spot an issue "pull the Andon cord" and stop the line, deal with the issue then and there. You then potentially conduct Kaizen to address the process to ensure the issue doesn't happen again.

At core all of Agile Software Development is aiming to mirror Lean in the manufacturing world. At the core of which is the concept of minimizing work-in-progress. Because WIP may result in waste if you subsequently find a problem that renders the WIP null and void. Hence the drive for continuous flow to minimize WIP and a "stop the line" mentality to spot and address issues when they arise.

I'm often amazed at how many people "doing" agile through sprints don't understand that the sprint is just an artificial mechanism to minimize WIP.

Not dealing with technical debt when it occurs is just increasing WIP.

Re:Undebt: How We Refactored 3M Lines of Code by BurningFrog on Wednesday August 24, 2016 @02:24AM (#12350107)
That's by far the best way to work.

It's hard to explain to someone who hasn't experienced it how much easier it is to develop in a bug free code base.

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.
Re:Undebt: How We Refactored 3M Lines of Code by codedokode on Wednesday August 24, 2016 @05:55AM (#12350825)
Also Joel wrote another article where he says that rewriting the code from scratch (removing technical debt or switching to a new popular framework) is generally a bad idea: http://www.joelonsoftware.com/articles/fog0000000069.html

Improving and perfecting the code is a task that can take infinite amount of time.

Re:Undebt: How We Refactored 3M Lines of Code by fbr on Wednesday August 24, 2016 @03:37AM (#12350388)
I like this policy, but it doesn't directly help to reduce the technical debt.
Re:Undebt: How We Refactored 3M Lines of Code by Ericson2314 on Wednesday August 24, 2016 @03:32AM (#12350368)
I want to believe we can someday gave the same policy for bad abstractions.
Re:Undebt: How We Refactored 3M Lines of Code by collyw on Wednesday August 24, 2016 @04:18AM (#12350534)
Bad abstractions are what really makes code difficult to maintain in my opinion.
Re:Undebt: How We Refactored 3M Lines of Code by Ericson2314 on Wednesday August 24, 2016 @04:13PM (#12354882)
And what allows many of those bugs to exist in the first place. The best interface is one which cannot be used incorrectly.
Re:Undebt: How We Refactored 3M Lines of Code by ajdlinux on Wednesday August 24, 2016 @02:03AM (#12350018)
"The amount of dev time that a company will save from removing technical debt will likely be more than the extra sales the company will get from a new feature."

Not always true (though it often is!), but particularly not always true in the timespan that the company needs to get sales in...

Re:Undebt: How We Refactored 3M Lines of Code by PhilipA on Wednesday August 24, 2016 @05:36AM (#12350770)
The problem is that this is very hard to measure. You can't really measure how much time you save on new features after you fixed the old spaghetti-code.
Re:Undebt: How We Refactored 3M Lines of Code by iMerNibor on Wednesday August 24, 2016 @02:05AM (#12350035)
technical debt will not always manifest itself as instability/bad product.

It might just affect development time of things interacting with the bad, old code - or make bugs harder to fix Changes to old nasty code will probably be hacky under the mentality "we're going to refactor this anyways, no point in writing clean code /now/"

Most old code (i've worked with) will function fine - it has for a while after all.

Re:Undebt: How We Refactored 3M Lines of Code by InclinedPlane on Wednesday August 24, 2016 @03:26AM (#12350349)
There's a pervasive idea that software is just a laundry list of features. This idea isn't just wrong, it's dangerous. You can pick lots of examples of software where the competitors are in theory feature comparable but the experience of using one is vastly superior to the other, with a consequent huge impact on market success.
Re:Undebt: How We Refactored 3M Lines of Code by akamaozu on Sunday August 28, 2016 @01:49PM (#12377508)
How best would you go about objectively convincing the executive team that it's better in the long run to invest a bit in stability now?

Very new to talking with execs and I don't know where to begin.

Re:Undebt: How We Refactored 3M Lines of Code by bahjoite on Wednesday August 24, 2016 @03:05PM (#12354427)
Agreed. If you want to spend more time working on features, don't accrue technical debt - or pay it off early.
Re:Undebt: How We Refactored 3M Lines of Code by jbhatab on Wednesday August 24, 2016 @01:52PM (#12353869)
This may or may not be true. Just depends.
Re:Undebt: How We Refactored 3M Lines of Code by Ericson2314 on Wednesday August 24, 2016 @03:30AM (#12350364)
Yes! 3M is way way way too much, and too few viscerally feel this. Yelp is far from the only offender, of course.
Re:Undebt: How We Refactored 3M Lines of Code by bachback on Wednesday August 24, 2016 @08:40AM (#12351552)
yes, please! can we then also get rid of the notion that there exists a linear design space called "features", and a linear error space called "bugs"? architecture, protocols, security, etc. can all be considered dimensions.