The Economic Benefit of Refactoring
71–80 of 132 posts
Re: The Economic Benefit of Refactoring
#72Anthropic told me that I have till August 19th to be get my act together becuase they are going to reduce my token count by 50%. lol. I have been abusing my Pro Max allowance and need to start being less wasteful.
Articles like this, can help us come up with ideas on how to do it.
Re: The Economic Benefit of Refactoring
#73Earlier quoted context omitted.
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
#74I 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"…
Re: The Economic Benefit of Refactoring
#75Re: The Economic Benefit of Refactoring
#76I 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.
Re: The Economic Benefit of Refactoring
#77Earlier quoted context omitted.
I did not mean it as a metric but as an indicator what was wrong with the code. - the code is essentially good but all is in one file, you split it up, lines of code stay the same - the code is essentially good but lacks some structure, for a function that does five things directly, you extract the functionality into five functions and call them from the original function, lines of code goes very slightly up But once…
> What scenarios are there where the code is actually bad but refactoring does not reduce the lines of code? IMX: the scenarios where people hold higher standards than what you describe :) (i.e. such that "the function does five things" is deemed "actually bad". Of course, that does depend on the refactoring not causing an unacceptable performance hit, which can happen depending on the environment.)
What I really want to get at is the distinction between leaving the actual code untouched and just moving it a bit around - to other functions, other classes, other files - and having to change the code - from deduplicating to completely rewritting it.
Re: The Economic Benefit of Refactoring
#78Earlier 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.
True, and to my point, "popular" isn't necessarily "better".
> because they are so standard and are good enough, using them massively eases the burden of making, buying and selling powered appliances
Yes, but LLMs can do the heavy lifting when analyzing the "better programming languages" for productivity. There will be a bias toward popularity in their training sources, though.