Be intentional about how AI changes your codebase
61–70 of 123 posts
Re: Be intentional about how AI changes your codebase
#62Re: Be intentional about how AI changes your codebase
#63My intentionality is that I'll never let it make the changes. I make the changes. I might make changes it suggests, but only upon review and only written with my hands.
I think this style of work will go away. I was skeptical but I now write the majority of my code through agents.
Re: Be intentional about how AI changes your codebase
#64I've seen a lot of people talking about how AI is making codebases worse. I reject that, people are making codebases worse by not being intentional about how their AI writes code. This is my take on how to not write slop.
Re: Be intentional about how AI changes your codebase
#65"Every optional field is a question the rest of the codebase has to answer every time it touches that data," This is a beautiful articulation of a major pet peeve when using these coding tools. One of my first review steps is just looking for all the extra optional arguments it's added instead of designing something good.
There's nothing specific to AI about this. Humans make the same mistake. To solve this permanently, use a linter and apply a "ratchet" in CI so that the LLM cannot use ignore comments
Re: Be intentional about how AI changes your codebase
#66Re: Be intentional about how AI changes your codebase
#67"Every optional field is a question the rest of the codebase has to answer every time it touches that data," This is a beautiful articulation of a major pet peeve when using these coding tools. One of my first review steps is just looking for all the extra optional arguments it's added instead of designing something good.
Re: Be intentional about how AI changes your codebase
#68My intentionality is that I'll never let it make the changes. I make the changes. I might make changes it suggests, but only upon review and only written with my hands.
unfortunately, unless you are god level good (i would say top 100 developers in the entire world), you will be fired eventually.
Re: Be intentional about how AI changes your codebase
#69Because of the way that I use AI, I am constantly looking at the code. I usually leave it alone, if I can; even if I don't really like it. I will, often go back, after the fact, and ask for refactors and documentation. It works. Probably a lot slower than using agents, but I test every step, and it is a lot faster than I would do it, unassisted.
I don't think testing the product alone is good enough, because when you give it tests it has to pass it prioritizes passing them at the expense of everything else — including code quality. I've seen it pull in random variables, break semantic functions, etc.
And if you can define "quality" in a way the agent can check against it, it will follow the instructions.
Re: Be intentional about how AI changes your codebase
#70Earlier quoted context omitted.
this always starts out right but over the years the code changes and its documentation seldom does, even on the best of teams. the amount of code documentation that I have seen that is just plain wrong (it was right at some point) far outnumbers the amount of code documentation that was actually in-sync with the code. 30 years in the industry so large sample size. now I prefer no code documentation in general
Are there any good systems that somehow enforce consistency between documentation and code? Maybe the problem is fundamentally ill-posed.
It's not a massively complex AI monstrosity (it's from 2018 after all) or a perfect solution, but it's a good jumping off point.
With a slight sprinkling of LLM this could be improved quite a bit. Not by having the agent write the documentation necessarily, but for checking the parity and flagging it for users.
For example a CI job that checks that relevant documentation has been created / updated when new functionality is added or old one is changed.