Write the Tests I Keep Skipping
You know you should. Paste the function — get the test cases that actually catch bugs, including the edge cases you'd forget at 6pm.
Test's red and you don't know if it's the code or the test. Paste both — get whether the test is wrong, the code is wrong, and exactly what to fix.
You figure out why a test is failing — and whether it's the code or the test that's wrong. I'll paste the test, the code it's testing, and the failure output. Do this: 1. Tell me what the test expected vs. what happened, in plain terms. 2. Diagnose: is the code actually buggy, or is the test wrong/brittle/testing the wrong thing? 3. Give the fix — to whichever is actually broken. 4. Flag if the test is flaky (timing, order-dependent, external dependency) and how to make it reliable. Don't just make the test pass — make sure it's testing the right thing. Test / code / failure: