3 ms·
"In essence, all principles help you to model your software in a way that’s highly cohesive and loosely coupled- They are the building blocks of a well designed
by ki_ 4y ago
"In essence, all principles help you to model your software in a way that’s highly cohesive and loosely coupled- They are the building blocks of a well designed software."
My suggestion, stay away from all these design patterns. In my experience, they lead to overly complex code because of all the structure. The best structure is the most simple one.
"When you start thinking in abstractions and create abstractions in your code, either top down or bottom up, you will end up producing a good software design."
This, to me, is the most untrue statement you could make about software. Abstractions introduce more complexity, the more complex, the less stable and maintainable your software becomes.
If you want well designed software, you need to keep it the code simple, so its maintainable. Then add some tests to it so you are certain it works correctly. Working with a type strict language is also recommended. To me, this is the only way (right now) to build stable software.
Keep LOC low, keep file count low, stay away from abstractions and hidden code (unless it's very useful somewhere), keep the amount of types/classes low. TL;DR; you dont want a "code maze. aka. 10 million lines of structured code".
- lakomen 4y agoKISS is also my experience. It NEEDS to be simple because maintaining code a year or more later you need code you can easily grasp. The job descriptions of 99% of companies don't reflect that. "It needs to be as simple as possible but not too simple"
- discreteevent 4y ago> The best structure is the most simple one. > Abstractions introduce more complexity There is truth in both of these statements. But also: "You can make a dog house out of anything" - Alan Kay What he's saying is that you can't make a skyscraper out of anything. You need some structure. The trick is to get the amount of structure right. Maybe Ousterhout has the right direction with "deep modules"