4 ms·
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 e
by benswerd 7mo ago
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.
- ChrisMarshallNY 7mo 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 7mo ago[dead]
- butILoveLife 7mo ago[dead]
- stpedgwdgfhgdd 7mo 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 7mo 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 7mo 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 7mo 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 7mo 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 7mo 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.
- embedding-shape 7mo agoRight, but all of those are easy, left is the actually hard stuff...
- deadbabe 7mo ago
- datsci_est_2015 7mo ago> Code quality can also be codified. Do you think that no one has tried this over the past 80 years with human programmers, but now with LLMs we can suddenly manage to do it? Why do linters and formal verification and testing exist if we could’ve jus codified coding quality in the first place? To me, this is like telling a carpenter that we can codify what makes a chair comfortable or not.