Live data from Hacker News

Undebt: How We Refactored 3M Lines of Code

engineeringblog.yelp.com

131–140 of 143 posts

Re: Undebt: How We Refactored 3M Lines of Code

#131

"...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 wor…

This may or may not be true. Just depends.

Re: Undebt: How We Refactored 3M Lines of Code

#132
post #47

It would be nice if some research institution would pay for the rehabilitation of some huge, bloated, ancient, but relatively unimportant app. Ideally by independent teams in parallel. Just to get some real data on what works, rather than anecdotes from veterans.

Your comment opened my eyes. Considering the importance of software development in today's world ( and tomorrow's), the fact that those best practices or code management technics are found mostly in blogs, instead of scientific papers with proper experiments, tells a lot.

There is a strong field exploring this subject, but it's called 'software verification'. Here's a paper on automated defect detection [0], which is effectively a study on how to write good tests.

[0] https://homes.cs.washington.edu/~mernst/pubs/mutation-effect...

Re: Undebt: How We Refactored 3M Lines of Code

#133

I would also be interested the thought process in deciding what functionality to refactor. Did you review the code and identify areas before unleashing your tool on it? With 3M lines of code gone, it must be terrifying to feel that it may have broken something. How did you ensure that it is still working as before? Edit: Grammatic corrections.

One approach that's probably quite easy to implement is to generate test suite code coverage by file, and only do the substitutions in files with sufficient coverage (where your definition of "sufficient" might vary, of course).

Re: Undebt: How We Refactored 3M Lines of Code

#134

"...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 wor…

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

#135
“Let a 1,000 flowers bloom. Then rip 999 of them out by the roots.”

This is paraphrasing of Chairman Mao:

"The policy of letting a hundred flowers bloom and a hundred schools of thought contend is designed to promote the flourishing of the arts and the progress of science"

And the ripping out by roots part brings labor camps to mind:

"After this brief period of liberalization, Mao abruptly changed course. The crackdown continued through 1957 as an Anti-Rightist Campaign against those who were critical of the regime and its ideology. Those targeted were publicly criticized and condemned to prison labor camps."

https://en.wikipedia.org/wiki/Hundred_Flowers_Campaign

Re: Undebt: How We Refactored 3M Lines of Code

#136
post #46

Earlier quoted context omitted.

I want to believe we can someday gave the same policy for bad abstractions.

Bad abstractions are what really makes code difficult to maintain in my opinion.

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

#138
Refactoring... "puts a massive drain on developer time; time that could be better spent working on new features and shipping new code"

This is the wrong way to think. Refactoring will save time by making code faster, more reliable and making it easier to build those new features in the first place. Looks like their biggest issue is bad technical management, not deprecated code.

Re: Undebt: How We Refactored 3M Lines of Code

#139
post #51

This smells as being a need that comes as a consequence of using a dynamically-typed language. Because the example given seems to be just getting rid of the usage of a certain method, to replace with a new one. In a statically typed language, e.g. C#, you just mark the old method with an [Obsolete] attribute and go fix all the warnings. (Granted, a tool that replaces all these usages is also useful, but to me, there…

Exactly, this is just basic functionality of Visual Studio now, this whole operation could be done in a few seconds without issue. Fix any build errors, run tests, job done.
Post reply on HN