MinusPi (she/they)
link
fedilink
English
385M

Documentation and testing are fundamental parts of writing code.

Also, tests ARE THE code, and equally important too! However so many people make the mistake of writing tests after the function, when the benefit is less immediate. They also have the illusion that they are done and have to do extra work. And since they didn’t write the test first, they most likely wasted a ton of time and energy on extra work of testing changes manually

I disagree unless the tests are reasonably high level.

Half the time the thing you’re testing is so poorly defined that the only way to tighten that definition is to iterate.

In this sense, you’re wasting time writing tests until you’ve iterated enough to have something worth testing.

At that point, a couple of regression tests offer the biggest bang for buck so you can sanity check things are still working when you move on to another function and forget all about this one

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 151 users / day
  • 310 users / week
  • 699 users / month
  • 2.84K users / 6 months
  • 1 subscriber
  • 1.57K Posts
  • 34.8K Comments
  • Modlog