logoalt Hacker News

majormajortoday at 1:06 AM0 repliesview on HN

The pattern I observe is: "write code, write test, make things green"

This is different in two ways from the classic TDD red-green-refactor suggestion:

1) they don't start with the test first, so the tests that get implemented are after writing the code, and run the risk of the model attention being now more influenced by the just-written code than the original spec

2) they finish when everything is green and don't followup with the "refactor" step unless manually prompted (either directly or indirectly by your own scaffolding/rules/whatever). this results in frequent hyper-local non-ideal-longterm fixes for things that went wrong in the first shot at writing the code pre-test-writing.

(As always, the only person who can ensure the code landing in your repo is good is you.)