4 ms·
This sounds like the old arguments about OOP. Turning everything into an object can make a small program into a big program, so it’s maybe not such a good idea
by ChrisMarshallNY 7y ago
This sounds like the old arguments about OOP.
Turning everything into an object can make a small program into a big program, so it’s maybe not such a good idea for small-scale stuff.
http://www.solipsys.co.uk/new/TheParableOfTheToaster.html http://www.solipsys.co.uk/new/TheParableOfTheToaster.html
However, in my experience, OOP made it possible to do really big stuff.
It’s all about not having a “one-size-fits-all” approach. I don’t think it’s just about scaling architectures; it’s about changing architectures to match scale.
It’s difficult as hell to make these changes, because people get invested in methodology, and insist on applying the same lens to everything we do.
It sounds like they had the right idea, but they probably had the wrong people.
- FpUser 7y ago"Turning everything into an object can make a small program into a big program, so it’s maybe not such a good idea for small-scale stuff." In my experience OOP actually makes programs smaller. Assuming of course they have good programmers/architects and the program itself is larger than "Hello world".
- darkerside 7y agoIn my experience, OOP makes programs different. Might be bigger or smaller, but the real difference is complexity. Not in that it makes things more or less complex, but in that it moves the complexity around to different places. Those places being complex (and others simpler) might make it easier or harder to maintain your program, which is what makes these decisions highly dependent on your particular systems and teams.
- FpUser 7y agoOOP does not "move" complexity. People do.
- mbrameld 7y agoA distinction without a difference.
- FpUser 7y agoThere is a difference. OOP is just one of many tools to help accomplish a task. Many other tools as well. It is up to the people how to use tools for a job and what tools for what job. You equating OOP with the dangerous things that should be kept away has no basis in programming.
- afiori 7y agoThe concept of footgun exists.
- mbrameld 7y agoThe way people use OOP causes them to move the complexity in a particular way. That's why the distinction doesn't make a difference in this context. You're right, technically it wasn't OOP that was writing the code, it was the person. We would have never figured that out without your guidance, we all just though OOP was banging away on the keyboard.
- FpUser 7y ago"The way people use OOP causes them to move the complexity" Why don't you try to read carefully what you've just said in the sentence above
- mbrameld 7y agoWhy? I wrote it, I know exactly what it means. Maybe you should take a closer look? If everyone who uses OOP moves the complexity in the same way because they're adhering to OOP, then it is a distinction without a difference because the complexity is moved regardless. It's a nuanced concept so don't beat yourself up if you don't understand.
- 7y ago
- fouc 7y agoSounds pretty unlikely. You don't need OOP to have fairly DRY and well organized code that is nice and small.
- FpUser 7y agoYou do not need a lot of things to write software. Does not mean you can no benefit from those when applied with good reasons. OOP concepts can help while coding certain domains and yet other can benefit from a different style.
- ChrisMarshallNY 7y agoDon't get me wrong. I love OOP, and have been using it since before it was cool. It's been a standard wrench in my toolbox for decades. In fact, I have been running into folks, these days, that don't understand it, as, apparently, OOP is becoming "uncool." I've always been a "right tool for the right job" kind of guy. I started off with ML (Machine Language, not Machine Learning). I am quite comfortable, sitting down with a breadboard, and flashing an OS. But I remember the old days of OOP, where "classic" structured programmers didn't "get" OOP, and designed these horrific chimeras. I always make it a point to understand my methodology and drivers "to the bone." Just because someone at a conference said it, doesn't mean that I should use it for everything.
- jjgreen 7y agoPlease write a blog post called "Horrific OOP chimeras" and post a link on HN ...
- ChrisMarshallNY 7y agoOh...the stories I could tell... But I have made it a point of personal ethos not to post criticism or polemics, denigrating/excoriating the work of others. I know that could buy me a lot of clicks (and probably some considerable HN Above The Fold time), but I think we have enough negativity and finger-pointing on the Internet. If you read my stuff, you won't see much of that. I may, in a rather vague way, allude to something that gives me a frowny-face, but I don't want that to be part of my "personal brand," so to speak. I do take tremendous personal pride in my work; both coding and writing, and hold myself to a high bar. I may even project that bar onto others (only in some circumstances), but I don't think it's helpful to do so in public. I find it most gratifying to write a "This is how I do this..." post, as opposed to a "This isn't how you should do it..." post.
- FpUser 7y agoLots of words. What's the conclusion? OOP is bad? Or maybe it is incompetent people who manage to f.. things up no matter what you give them or people with the agenda going on holy crusades?
- gridlockd 7y agoThis phenomenon can be described as "excessive factoring" and it can easily happen under any paradigm. Perhaps it's more prevalent with OOP programmers, but perhaps it just appears that way because the boilerplate for classes is a bit larger than the boilerplate for functions and structs.
- hedora 7y agoThe “micro” in “microservices” implies “excessive factoring”. Otherwise they’d be services.
- kumarvvr 7y agoThe reason OOP made it possible to do big stuff, seems tobe because it improved the average productivity of the average programmer. With procedural code, you would need an exceptional programmer to produce a big program. With OOP, an average programmer can deconstruct a problem into its component parts and solve it, mainly because, the human brain can reason about concrete objects more easily, than say, abstract methods like functional programming. Edit : OOP has encapsulation which, in my view, significantly reduces the cognitive load when thinking about state management in an app. I remwmber writing a small graphics library using Borland Graphics Interface in Turbo C++. It was a breeze to do because I know about 'things' I want on my screen and coded my classes to reflect those things.