Hacker News new | ask | show | jobs
by nycticorax 2 days ago
This is interesting, but I think it would be even more interesting to see a comparison of the token cost of adding a new feature, in the original codebase vs the refactored one. You'd think/hope that the cost of adding the new feature would be lower when starting from the refactored codebase, indicating that refactoring makes economic sense in the long run by lowering the cost of adding new features.
1 comments

That's what I've shown in this article. The token consumption shown is for adding a new feature (the same feature each time -- in a sub-agent) after every refactoring is applied. I didn't actually capture the token cost of the refactoring. That was a miss, and I'm making sure I do that in the future.
Kind of you to engage! Ahh, ok, I misunderstood. Very cool! I think maybe it would have helped me if you had given a one-or-two-sentence description of the "representative change" in the main text, to make it a bit more concrete up-front? But possibly just a 'me' issue...