Welcome!

Where Continuous Integration and Deployment has its home.

Manuel Weiss

Subscribe to Manuel Weiss: eMailAlertsEmail Alerts
Get Manuel Weiss via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: Twitter on Ulitzer

Blog Feed Post

Perfecting OO’s Small Classes and Short Methods

Object-Oriented Programming

I recently stumbled upon Andrew Binstock’s great article about OO’s Small Classes and Short Methods in which he summarized Jeff Bay’s essay “Object Calistehnics”. Andrew is Editor-in-chief at Dr. Dobb’s and lead developer for Platypus, an OSS typsetting software. You can find Andrew on twitter.

If you want to improve your ability to write OO routines have a look at this exercise by Andrew.

A great exercise to improve Object Oriented Style Coding

  1. Use only one level of indentation per method.
  2. Don’t use the ‘else’ keyword.
  3. Wrap all primitives and strings.
  4. Use only one dot per line.
  5. Don’t abbreviate names.
  6. Keep entities small.
  7. Don’t use any classes with more than two instance variables.
  8. Use first-class collections.
  9. Don’t use setters, getters, or properties.

If you want to read a more in-depth article about this exercise I highly recommend you head over to Andrew’s original article.

Further Information

Read the original blog entry...

More Stories By Manuel Weiss

I am the cofounder of Codeship – a hosted Continuous Integration and Deployment platform for web applications. On the Codeship blog we love to write about Software Testing, Continuos Integration and Deployment. Also check out our weekly screencast series 'Testing Tuesday'!