this post was submitted on 17 Jul 2023
495 points (97.5% liked)

Programmer Humor

32453 readers
1479 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Knusper@feddit.de 2 points 1 year ago

No, they should not need to test everything, but this strongly depends on your code quality and project setup.
There's definitely other paths to the goal, but generally for larger projects, I recommend:

  • Good isolation between components. A change in one component should not have unforeseeable effects in other components.

  • Automatic unit tests for each component, so devs can test their changes in isolation.

  • A statically typed, compiled language, so that compiling does a basic integration check between components.

  • Strong ties between components, where it makes sense. For example, ideally, the communication model between backend and frontend is in a shared module/library, so that if someone does change the model, it leads to compile errors on both sides.

  • Automatic integration tests + a CI/CD pipeline, which tests the rest of the application after each push. This will let you know as early as possible, if you did push a broken commit.

  • A multi-project build with all parts of your application in a monolithic repo, so that all components get continuously compiled + integrated with their most recent changes.

This rigidity does have challenges of its own.
For example, a change in the backend might force a change in the communication model and therefore in the frontend, too. And if you're exclusively backend, you might struggle with updating the frontend accordingly.
Then you'll need to push onto a separate branch and look at it with your frontend colleague later. But hopefully, you get that arranged within a day or two, so the merge conflicts should still be quite tame.

And obviously, this rigidity has tons of advantages. Not needing to wonder whether frontend and backend, or any other interface, is compatible right now, is just insanely good.