|
Inheritance is one of the pillar of OOP. However, in the real world, most classes are not designed to be properly inheritable. "Our lips are sealed"
Oh, I remember those arguments. I guess people will still be having this one when I'm buried.
|
|
|
|
|
I dread to think how bitchy this guy will get when he learns the word "interface".
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
What's so dumb about this argument, and the parallel--make all data private--is that it assumes that whoever uses the class knows nothing about it and, apparently, barely knows how to read, let alone do programming.
Recently, I added extra [C++] code just so I could isolate an implementation in a file for the simple reason that it and it alone used some really big header files. However, to make things simple I violated some of the precious rules of OOP purists. It honestly bugged me for a second, but then I figured if someone takes advantage of this, and ignored my comment in the code, they're an idiot and deserve the sky falling on them.
Going back to .NET, the number of sealed classes irritated me. Instead of, for example, having a map of X, you have to have a map of Y, each of which contains an X, which you then make public because it's too damn irritating to create methods for all of it's methods and that ONE extra thing you need. In the end, you arguably make worse code so the purists can sit on their clouds and pat themselves on the back. (Yeah, this happens with C++ STL, but it's not as bad.)
|
|
|
|
|
Sometimes, you can use extension methods to add functionality. Sometimes, you can even find the source code to the object and modify it so that it's more usable.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
that's unusually reasonable of you upvoted.
more seriously, when you get to open-source stuff using frameWorks that incorporate other frameworks ... you may, theoretically, have all the code available, but, good luck finding the particular needle in a particular haystack that just made your code bleed.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
I've had to write extension methods for my own classes - mostly to avoid regression testing chores (since the class itself didn't change, I was golden).
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I like Extension Methods mucho, although I am still reluctant to write them for basic Types.
And, a library of these methods could help contribute to the quest for continuing employment, after the client realizes they need to buy them from you in order to get the feature they didn't pay you for to work ... because they weren't in the spec
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
I love these all-or-nothing arguments. Actually I don’t.
Why not, instead of making a
statement that actively attacks the principles of object oriented development, he writes an article articulating issues in inheritance and outlines best practices to make things better. Or chooses a language that doesn’t allow inheritance.
Or stops writing things just to get page views.
cheers
Chris Maunder
|
|
|
|
|
Chris Maunder wrote:
Or stops writing things just to get page views.
Again, the effort to get rid of Kent!
|
|
|
|
|
Chris Maunder wrote: I love these all-or-nothing arguments. Actually I don’t. Reading this brought on a mild seizure where I hallucinated it was my (first) ex-wife talking
In Thai: "sabai dee maak maak nit noi" ("I'm much, much, happy/well/okay ... a little") is a somewhat "catty" way of replying to the usual casual interrogatory question/greeting: "are you okay/well/happy." "Catty" is atypical for Thai modes of social communication where major nuances can be achieved through the modulation of six-tones ... and, there's a huge binary gap between polite, and directly insulting. So, who knows, this expression which I have heard Thais use (rarely) could have originated from some expat.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
The 'BlocKit', which includes items such as plastic tubs, clay discs, padlocks, envelopes, sticky notes and battery-powered candles, is aimed to help people understand how digital blockchains work and can also be used by innovators designing new systems and services around blockchain. Is it real money then?
|
|
|
|
|
I never ceased to be amazed by the seemingly endless supply of people who are willing to spend large numbers of their finite hours on doing things that are totally and completely worthless.
Let's not bring "contributing to message boards" into this discussion, eh?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Is that an attack on Kent?
(Edit: Don't worry, Kent, all your work brings enjoyment to tens of other cynics.)
modified 10-Jul-19 17:18pm.
|
|
|
|
|
It's pretty much an attack on my life.
I feel happy for anyone who can't say that.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I've got A much simpler option that gets to the heart of the matter:
I'll gladly pay you Tuesday for a hamburger today.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
My point is that the quality of the code (and of the software) is closely related to how much the people that write and design it understand what they’re doing. Well, that's my career down the tubes
modified 11-Jul-19 12:02pm.
|
|
|
|
|
Not a problem.
Just ask any dev what it is that he doesn't understand, and the answer you'll get is "Why some people aren't totally and religiously devoted to Star Wars and/or Trek".
So they can code anything.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
That, and do the people asking for the software understand what they are asking for.
(We also always cretaed what the customer needed, rather than what they asked for. It saved time.)
|
|
|
|
|
If programmers did that, we wouldn't be able to out-source...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Kent Sharkey wrote: what you con’t understand
Shirley that should be either "can't" or "don't"?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
or both?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Richard Deeming wrote: Shirley that should be either "can't" or "don't"?
It's both... and please don't call me Shirley.
"When you are dead, you won't even know that you are dead. It's a pain only felt by others; same thing when you are stupid."
Ignorant - An individual without knowledge, but is willing to learn.
Stupid - An individual without knowledge and is incapable of learning.
Idiot - An individual without knowledge and allows social media to do the thinking for them.
modified 19-Nov-21 21:01pm.
|
|
|
|
|
I refuse to understand what I am doing!
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
Not understanding at the beginning isn't a problem. If you don't understand it by the program's completion, be very scared!
|
|
|
|
|
See the second sentence in my signature
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|