Hacker News new | ask | show | jobs
by laksdjfkasljdf 2056 days ago
Writing tests without fixing the lack of understanding first is even worse.

Now the next cycle will have to understand not only the code, but why some test is validating some unused endpoint with data you never thought possible

1 comments

That’s where comments come in. I tend to do a brain dump around the code I wrote in comments: why does this code exists and in particular why is it doing it in this horrible, convoluted, suboptimal way. I also wrote small functions and pick my variable names carefully.

My colleagues think I’m an idiot writing too many comments and being too careful.

We can’t ship any feature in less than 3–4 weeks, most of the codebase is an inscrutable mess, and we introduce regressions all the time (unit tests are for losers)