You have the power. Login and vote now.
By bloid
via stephan.reposita.org
Published: May 02 2008 / 10:29
Never, never, never use (unwrapped) String or long or int. Why? Those primitive types have no semantic meaning. They are hard to understand, hard to maintain, and hard to extend. I’ve been evangelizing this concept for some time, the essay “Object calisthenics” finally prompted be to write this post. Suppose we have an example of a cinema ticket booking service.
Comments
dzonelurker replied ago:
Never, never, never use silly headlines for interesting submissions (or at least less often :-)
signal9 replied ago:
keep in mind sometimes "too object oriented" can be a bad thing.
nightwind replied ago:
voted up for "SCHWEINEBACKE". At least I'm not the only one including little insults into test data. (Which will then somehow find their way into production systems *sigh*)
Gregg Bolinger replied ago:
Voted down for everything about the post. :)
danielstoner replied ago:
Sometimes there are good ideas emerging from real life situations. They have a spirit, a purpose, a meaning, all related to the context they were born in... And then, some time after that, somebody who doesn't understand the concept or doesn't know anything about the original context but likes the idea for some reason decides to transform it into a DOGMA... and then people who don't obey are punished or, in our case, they miss an interview for arbitrary reasons.
There is a time and place for almost any idea, the context matters most. While I don't fully disagree with the post, the dogmatic tone and the interview references make me vote this post down.
Tantalus replied ago:
Seems like too much work to give Java named argument parameters, which seems to be what he's really after.
wwheeler replied ago:
Voted down because it's a textbook example of overengineering. I'm really supposed to create a FirstName object to wrap a String? Using a variable called firstName isn't enough? If a developer is dumb enough to screw that one up, then he's dumb enough to put a last name in a FirstName object. :-/
tos replied ago:
JavaDoc is out of fashion now? voted down.
Voters For This Link (27)
Voters Against This Link (14)