Live data from Hacker News

The Economic Benefit of Refactoring

martinfowler.com

61–70 of 132 posts

Re: The Economic Benefit of Refactoring

#61
post #10

Interesting that the amount of code remained essentially unchanged. In my experience it is not unusual that refactoring messy code cuts the number of lines in half.

Yep, this was a real surprise to me, too. That’s why I included that top line in the figure. It also doesn’t line up with the agent’s predictions when it laid out the refactoring before proceeding.

There’s further work to do to understand exactly what’s going on here.

Re: The Economic Benefit of Refactoring

#62

I find it funny how the best practices for programmers, ignored in most IT companies, get reinvented as the best practices for AIs. Boring: The documentation should be in code, not in external Word documents uploaded to the company SharePoint server. Exciting: The documentation for the AI should be in code, not in external Word documents uploaded to the company SharePoint server. Boring: You should give your develope…

No this isn't mindless reinventing --- this is finally having clear empiric evidence for something that we knew the entire time. This is a huge relief! Next up is demonstrating the AI is more productive with better programming languages.

> Next up is demonstrating the AI is more productive with better programming languages.

That actually would be pretty exciting!

But, wouldn't AI be biased toward more popular languages, since those will by nature of their popularity provide more sources for training material?

Even still, the AI could demonstrate which algorithms or maybe patterns and techniques are more productive, in the context of the popular languages.

Re: The Economic Benefit of Refactoring

#64
post #62

Earlier quoted context omitted.

No this isn't mindless reinventing --- this is finally having clear empiric evidence for something that we knew the entire time. This is a huge relief! Next up is demonstrating the AI is more productive with better programming languages.

> Next up is demonstrating the AI is more productive with better programming languages. That actually would be pretty exciting! But, wouldn't AI be biased toward more popular languages, since those will by nature of their popularity provide more sources for training material? Even still, the AI could demonstrate which algorithms or maybe patterns and techniques are more productive, in the context of the popular langu…

That’s not necessarily a bad thing.

As an example, 110v American outlet plugs are almost certainly not the most efficient way to power devices and appliances; but, because they are so standard and are good enough, using them massively eases the burden of making, buying and selling powered appliances in the US. Similar story with USB C.

Re: The Economic Benefit of Refactoring

#65

I find it funny how the best practices for programmers, ignored in most IT companies, get reinvented as the best practices for AIs. Boring: The documentation should be in code, not in external Word documents uploaded to the company SharePoint server. Exciting: The documentation for the AI should be in code, not in external Word documents uploaded to the company SharePoint server. Boring: You should give your develope…

Exactly

Re: The Economic Benefit of Refactoring

#66

The benefits go beyond reducing token consumption. Compact contexts also foster better reasoning, enable intelligence across more layers if you can load them in a single context, and writing software to enable this, results in more correct software, software that _generalizes_, that has higher probability of being correct not just for tested cases, but for the interpolations and extrapolations of these cases. Refacto…

Imagine what happens when human readability is discarded as a goal. LLMs are already very good at inferring meaning with little context. If the objective function is reduction of token consumption, it's hard to know where we will end up.

Re: The Economic Benefit of Refactoring

#67
post #62

Earlier quoted context omitted.

> Next up is demonstrating the AI is more productive with better programming languages. That actually would be pretty exciting! But, wouldn't AI be biased toward more popular languages, since those will by nature of their popularity provide more sources for training material? Even still, the AI could demonstrate which algorithms or maybe patterns and techniques are more productive, in the context of the popular langu…

That’s not necessarily a bad thing. As an example, 110v American outlet plugs are almost certainly not the most efficient way to power devices and appliances; but, because they are so standard and are good enough, using them massively eases the burden of making, buying and selling powered appliances in the US. Similar story with USB C.

Outlets benefit from standards, however. Every device (well kind of) uses the same few plug types, and a different plug would be a disadvantage.

On the other hand, having a bunch of different languages is an advantage. People can pick the best tool for the job, and experiment with new language features.

Re: The Economic Benefit of Refactoring

#68

I find it funny how the best practices for programmers, ignored in most IT companies, get reinvented as the best practices for AIs. Boring: The documentation should be in code, not in external Word documents uploaded to the company SharePoint server. Exciting: The documentation for the AI should be in code, not in external Word documents uploaded to the company SharePoint server. Boring: You should give your develope…

To be clear, the guy who wrote this article is Martin Fowler. Fowler was the author of a book literally titled "Refactoring", which he wrote over 20 years ago (it didn't invent the term "refactoring", but it's widely credited as popularizing it).

In other words, this is not some new AI-bandwagon-jumping blogger trying to rebrand old practices as something new ... this is the guy who coined the very term "refactoring"! He's not pretending what's old is new, he's arguing that best practices from 20+ years ago remain relevant (and showing receipts).

Re: The Economic Benefit of Refactoring

#69

I find it funny how the best practices for programmers, ignored in most IT companies, get reinvented as the best practices for AIs. Boring: The documentation should be in code, not in external Word documents uploaded to the company SharePoint server. Exciting: The documentation for the AI should be in code, not in external Word documents uploaded to the company SharePoint server. Boring: You should give your develope…

To be clear, the guy who wrote this article is Martin Fowler. Fowler was the author of a book literally titled "Refactoring", which he wrote over 20 years ago (it didn't invent the term "refactoring", but it's widely credited as popularizing it). In other words, this is not some new AI-bandwagon-jumping blogger trying to rebrand old practices as something new ... this is the guy who coined the very term "refactoring"…

The website is martinfowler.com, but the article seems to be written by Giles Edwards-Alexander.

Re: The Economic Benefit of Refactoring

#70

I find it funny how the best practices for programmers, ignored in most IT companies, get reinvented as the best practices for AIs. Boring: The documentation should be in code, not in external Word documents uploaded to the company SharePoint server. Exciting: The documentation for the AI should be in code, not in external Word documents uploaded to the company SharePoint server. Boring: You should give your develope…

To be clear, the guy who wrote this article is Martin Fowler. Fowler was the author of a book literally titled "Refactoring", which he wrote over 20 years ago (it didn't invent the term "refactoring", but it's widely credited as popularizing it). In other words, this is not some new AI-bandwagon-jumping blogger trying to rebrand old practices as something new ... this is the guy who coined the very term "refactoring"…

It’s an easy mistake to make, given the name of the website, but Fowler frequently hosts guest authors. This article was written by Giles Edwards-Alexander, ThoughtWorks CTO for EMEA.
Post reply on HN