4 ms·
Because 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 bac
by ChrisMarshallNY 8mo ago
Because 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.
- benswerd 8mo agoI 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.
- ChrisMarshallNY 8mo agoOh, no. I test. Each. and. Every. Step. I use a test harness, and step through the code, look at debug logs, and abuse the code, as much as possible. Kind of a pain, but I find unit tests are a bit of a "false hope" kind of thing: https://littlegreenviper.com/testing-harness-vs-unit/ https://littlegreenviper.com/testing-harness-vs-unit/
- cindyllm 8mo ago[dead]
- butILoveLife 8mo ago[dead]
- stpedgwdgfhgdd 8mo agoYou can ask it to /simplify Related, it seems to me that there are two types of tests, the ones created in a TDD style and can be modified and the ones that come from acceptance criteria and should only be changed very carefully.
- theshrike79 8mo agoCode quality can also be codified. If you can't express "code quality" deterministically, then it's all just feels. And if you can define "quality" in a way the agent can check against it, it will follow the instructions.
- embedding-shape 8mo ago> then it's all just feels Would that be so bad? "Readability" sure is subjective, so it seems "code quality" is. Ask 10 programmers what quality a snippet of code is, and you'll get 10 different answers.
- theshrike79 8mo agoAnd there is the problem. Then you start arguing about brace positions and function names and whether simple data classes should have docstrings on properties or not. All that time it's people arguing with people and wasting time on pure feels. People will get offended and angry and defensive, nothing good ever comes from it. But when you pick a style and enforce it with a tool like gofmt or black both locally and in the CI, the arguments go away. That's the style all code merged to the codebase must look like and you will deal with it like a professional. Go proverb: "Gofmt's style is no one's favorite, yet gofmt is everyone's favorite."
- embedding-shape 8mo ago"Style" is such a small part about what people generally care about when they talk about code quality though, useful/intuitive abstractions, the general design and more tends to be a lot more important and core to the whole code quality debate.
- theshrike79 8mo agoLinters can be set check for cyclomatic complexity, using old/inefficient styles of programming (go fix ftw) etc. Formatting is just an easy and clear example that everyone should understand.