2 ms·
There's two possibilities here. One is that the code is very efficient for what it does, and the design is there as a form of bureaucracy to prevent further pro
by muzani 5y ago
There's two possibilities here. One is that the code is very efficient for what it does, and the design is there as a form of bureaucracy to prevent further problems or make certain processes easy to do and bug free. Then try to learn from and understand why it's that way.
The other option is it could just be overengineered and inefficient. This is more often the case. The main symptoms are people are just creating hacks to get around it and everyone dreads coming to work. Good code feels like the programming language was designed
Often overengineering happens for a good reason. Ask why it's that way. The worst code I've seen uses "clean architecture". So I worked to understand what clean architecture was really about. Don't just say that it's bad - look at what it's trying to do and understand why that's not working or what is being implemented poorly.
In our case, the business logic was done entirely on back end, but the front architecture was designed for extensive logic, so it just led to weird situations like most functions executing only one line of code. Some things were also on the wrong layers - business logic should be below the repository layer, but a lot of it snuck in above it. Again the symptom of people writing hacks because the code was too hard to work with.
Even though you might not enjoy this, it's a good opportunity to learn why you don't like it.