Comment by ChrisMarshallNY
2 years ago
> There is a very good chance that the same feature set could have been implemented with just 10K lines of code, less buggy and in half the time
A significant part of my personal code review process, is going back through my code, and factoring out complexity. It takes time and humility, but is very much, in my opinion, worth it.
Documenting my code is a trick that helps. When I am writing why I did something, I sometimes reflect, and say to myself "Didn't I just do this a few lines back?"
My code tends to be complex, by necessity, but it should be no more complex than absolutely needed.
A big, big tool for that, is OOP inheritance, which is considered "bad coder" smell, these days.
A big, big tool for that, is OOP inheritance, which is considered "bad coder" signal, these days.
Is it? I’d agree that there’s increasing awareness of the limitations of OOP, and I’d agree that using inheritance excessively can be one of the limiting factors, but I don’t think I’ve ever personally seen anyone criticised or penalised for using inheritance appropriately.
Just using OOP is considered bad. There is no "appropriate" way to use OOP. I see people being criticized for that, all the time.
I have run into folks that don't understand polymorphism. It seems that it is not even being taught.
Old Boomer Yells at Sky
I've done a lot of OoP and my opinion these days is that if the reader needs to understand polymorphism properly to understand your inheritance, it's too complex.
(Exceptions exist, of course, like libraries inherently dealing with reflection)
3 replies →
Some of that is the fact industry never really evolved OOP approaches and they tended to trend to toward heavy and complex. Peers aren’t great with the power OOP can have.
I’ve also seen composition go sideways too.
Sometimes it feels like nobody takes software engineering seriously anymore, if I’m being honest
Yeah, I remember that "Write a story. The nouns are objects, and the verbs are methods." school of thought.
I never warmed to that. In my experience, it resulted in unholy messes.