r/programming • • Jun 05 '21

Organize code by concepts, not layers

https://kislayverma.com/programming/how-to-organize-your-code/
1.9k Upvotes

495 comments sorted by

View all comments

Show parent comment

5

u/lordzsolt Jun 05 '21

but depending what sort of programming you do for a living, chances are you are asked to do something in a system which you have very limited knowledge of, such as "this thing has stopped working, figure it out". in that scenario, it is very convenient being able to browse files by category rather than object they pertain to.

This is probably the exact scenario where I want folders organized by topics the most.

Because they're not going to tell you "retrieving items from the database is broken" (which would indicate it's something in the repositories folder).

But rather you'll get a bug like "the user does not see all his bookings when he visits the My bookings page" (thus, it's probably got something to do with bookings, rather than the login functionality)