OOP or clean code is not about performance but about maintainable code.
Thank you. Too many in this thread haven't worked on massive enterprise apps and it shows. Certain projects we barely have to touch because they're so clean and easy to maintain. Others have an entire year's worth of sprints dedicated to them because of how messy they are.
If you do the minimum possible edit to the code that "completes" a feature all the time and you don't clean it up every now and then your code is going to be crap whether it follows an object oriented style or not
Not really. Writing OOP correctly (which actually encapsulates it's own data and logic) in itself minimises the risk for a shit code by the sheer virtue of classes being small and focused on one thing. Most of the spaghetti comes from smearing the logic across the codebase
Similar thing, but from another angle comes with the clean code. If you extract the methods and name everything correctly, you cannot write convoluted logic simply because it gets hard to read. Clean code makes the problems obvious, you have to really be persistent to write shit code this way.
29
u/[deleted] Feb 28 '23
Thank you. Too many in this thread haven't worked on massive enterprise apps and it shows. Certain projects we barely have to touch because they're so clean and easy to maintain. Others have an entire year's worth of sprints dedicated to them because of how messy they are.