this post was submitted on 25 Feb 2026
41 points (100.0% liked)

Programming

25831 readers
205 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] thenextguy@lemmy.world 9 points 3 days ago (3 children)

I’m not a tdd guy, but I would reach for tests first. You don’t know the code yet. Testing is the only way to stay sane. And writing the tests if they don’t exist yet will help you learn the code.

[–] kibiz0r@midwest.social 7 points 3 days ago (1 children)

Yes, but you do need to be careful with what level you test at. Too high level and the tests may be slow, flaky, and difficult to focus onto small details. Too low level and they may just bake-in the existing implementation.

[–] thenextguy@lemmy.world 5 points 3 days ago

That was such a huge problem on my last job. Most of the unit tests just executed the code and didn’t really test anything and any time you changed the implementation everything broke.

Thankfully it was truly my last job. 😊

[–] HaraldvonBlauzahn@feddit.org 4 points 2 days ago* (last edited 2 days ago) (1 children)

The thing is... to test such code, you often need to modify it first.

You see the problem?

[–] thenextguy@lemmy.world 2 points 2 days ago

No. I don't grant your premise.

[–] dandi8@fedia.io 1 points 2 days ago

I think this is compatible with TDD. It's just fancy divide-and-conquer.