Link Details

Link 123015 thumbnail
User 111696 avatar

By bloid
via weblogs.java.net
Published: Oct 04 2008 / 17:03

There's no shortcut to experience. Writing good object oriented code takes experience, but here are three practices to help you get off on the right foot day one with even the grumpiest of gray beards:
  • 8
  • 2
  • 1428
  • 556

Comments

Add your comment
User 285418 avatar

Motion Control replied ago:

0 votes Vote down Vote up Reply

"Write All Your Code Using TDD"

FAIL!

User 203717 avatar

chudak replied ago:

0 votes Vote down Vote up Reply

Blindly following the "ask don't tell" axiom leads to lack of coherence in your example mobile class. Now your mobile class needs to know how to send a text message, alert (whatever that means), notify it's location, etc. This is as bad or worse than the "If" statements you describe. In fact, in EITHER case, I'd say that your design is flawed. Neither solution solves the design problem.

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.

Voters For This Link (8)



Voters Against This Link (2)