«« Next » « Previous
«« Next » « Previous

Link Details

You have the power. Login and vote now.
Link 78902 thumbnail

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.
  • 27
  • 14
  • 2002
  • 1060

Comments

Add your comment
User 236137 avatar

dzonelurker replied ago:

1 votes Vote down Vote up Reply

Never, never, never use silly headlines for interesting submissions (or at least less often :-)

User 275343 avatar

signal9 replied ago:

3 votes Vote down Vote up Reply

keep in mind sometimes "too object oriented" can be a bad thing.

User 201914 avatar

nightwind replied ago:

0 votes Vote down Vote up Reply

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*)


User 152955 avatar

Gregg Bolinger replied ago:

0 votes Vote down Vote up Reply

Voted down for everything about the post. :)

User 283759 avatar

danielstoner replied ago:

-1 votes Vote down Vote up Reply

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.

User 282283 avatar

Tantalus replied ago:

0 votes Vote down Vote up Reply

Seems like too much work to give Java named argument parameters, which seems to be what he's really after.

User 276060 avatar

wwheeler replied ago:

0 votes Vote down Vote up Reply

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. :-/

User 272861 avatar

tos replied ago:

0 votes Vote down Vote up Reply

JavaDoc is out of fashion now? voted down.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.