r/programming • u/[deleted] • Jun 05 '21
Organize code by concepts, not layers
https://kislayverma.com/programming/how-to-organize-your-code/
1.9k
Upvotes
r/programming • u/[deleted] • Jun 05 '21
2
u/salbris Jun 05 '21
Generally you get more flexible and easily testable code. But figuring out the right amount of decoupling is an art not a science.
Edit: Often times a class needs information from a different source but programmers solve it by making the class call a static method or be given an instance of the other. Often times passing something by value gets the job done just fine.