Hacker News new | ask | show | jobs
by thomasloh 4167 days ago
> but your OOP needs to be on point if you hope to build something maintainable for the web.

OOP != maintainable codebase

2 comments

amen - even small 3k products websites are about far more than OOP just knowing how all your pages are generated is a big ask fore most sites.
The idea behind OOP makes sense. But the carry-out of OOP in pragmatic programming languages is the problem.

http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hic...

You seriously expect me to watch an hour-long presentation just to get your point?
if you seriously want to understand it :)
Please don't treat me like an idiot. I've been studying OOP concepts for quite some time now. I'm quite capable of figuring out any deep concepts you care to throw at me. If you can't explain them in your own words, fine, but don't expect me to believe you have any real insight on this question because of that. I could watch that whole video and still not know what you were trying to argue.
Doing OOP in languages like Java and Ruby tend to involve classes, objects, encapsulation and state coordinating. Now, the truth is, state is really hard to maintain. You have this piece of information where everyone is trying to change or grab at, it's gonna end up leading to race conditions and locking. It may work for a small app, but as your application scale up, it's a maintainability disaster. So you said OOP done right helps. But, OOP was the wrong paradigm to begin with, it's like saying "Horse-riding done right gets you anywhere faster". I'm not saying everyone who has been programming in OOP is wrong, it totally makes sense to use OOP because it's easier to model real world things with. But no one has ever question, "This paradigm may be facilitating my understanding of the problem, BUT is it the right paradigm?"

As Dijkstra said,

"Dont't trade simplicity for familiarity."