Quote:
Originally Posted by
JonnyPoet
by simple giving tooo much information to people with obviously no experience.
If a student is too stupid to understand the concept, he should quit immediately. This is not rocket science, it's a fundament of OOP that is simple to understand, and touches the very base of the entire concept.
Quote:
So I'm always looking to the knowingness level of a person when answering a post and trying to give just the needed information.
"Give a man a fish, and you've fed him for a day. Teach a man to fish, and you have fed him for a lifetime". If you only reply to their school assignments, you do nothing but make them dumber.
Quote:
Another point is that the name of this is 'primitive obsession' and an obsession would it be if a person feels the urgent need to do something.
It is a commonly known term in OOP. I'm surprised that you do not know about it with your 30 odd years of development? I've known about it for at least 10 years now..? Maybe you are becoming outdated?
Quote:
Sorry IMHO always person can go the other way and becoming to get 'Objects Obession' :D programmers.
Possibly, but without it, you can't really call yourself an object oriented developer, if you do not understand OOP, can you?
Quote:
I have done programs that have 100.000 and more lines and never had a problem that an supplierId was used instead of a productID only because both are int32 values. To differ here we simple have the system of talking names, so this is not a cogent example that really shows me the needs of 'never' using an primitive.
I've seen plenty of miserable code with more lines than that. What is your point here?
Quote:
A balanced use of such things like wrapping a primitive, especially when there is an additional benefit like validation tests and all that is a very good technique, no daubt, but only and ever - IMHO No. All in live what is going to excessive and exclusive at least will not be survival. there is nothing which is
'Only , 'Exclusive' or 'Always' and 'Ever' in this world. Exceptions are the salt in the soup in this world :D
I agree, I often abuse the words "never", "always" etc to drive a point through and to spark a reaction. I can tell from your wish for balanced use of wrapping primitives that you have misunderstood the point. Think of it as blinking the lights of your car when you are driving. It is a good habit to do so, even when there is nobody around, because then it becomes an instinctive reaction that you do without thinking about it - and it is a good practice because you become a better driver as a result of it.
The same is true for good habits in programming. There are various things one can do to improve the quality of code. Enhance readability, work in a continuous integration environment, following one or more of the Agile methods, and, as one of the simplest concepts, you can avoid passing primitive datatypes as parameters to functions - this is considered a bad practice for oop.