We have reached the end of the exercise – Nine Steps to Better Software Design, presented at chapter Object Calisthenics by Jeff Bay in The ThoughtWorks Anthology book from the Pragmatic Programmers. Eight of these nine rules are simply ways to visualize and implement the Holy Grail of object-oriented programming—the encapsulation of data. In addition, […]

From the series about the rules of thumb, presented at chapter Object Calisthenics by Jeff Bay in The ThoughtWorks Anthology book from the Pragmatic Programmers (click here to see the the previous rules). The rule The last sentence of the previous rule leads almost directly to this rule.If your objects are now encapsulating the appropriate […]

From the series about the rules of thumb, presented at chapter Object Calisthenics by Jeff Bay in The ThoughtWorks Anthology book from the Pragmatic Programmers (click here to see the the previous rules). The rule The application of this rule is simple: any class that contains a collection should contain no other member variables. Each […]

From the series about the rules of thumb, presented at chapter Object Calisthenics by Jeff Bay in The ThoughtWorks Anthology book from the Pragmatic Programmers (click here to see the the previous rules). The rule Most classes should simply be responsible for handling a single state variable, but a few will require two. Adding a […]

From the series about the rules of thumb, presented at chapter Object Calisthenics by Jeff Bay in The ThoughtWorks Anthology book from the Pragmatic Programmers (click here to see the the previous rules). Keeping All Entities Small This means no class that’s more than fifty lines and no package that’s more than ten files.Classes of […]

From the series about the rules of thumb, presented at chapter Object Calisthenics by Jeff Bay in The ThoughtWorks Anthology book from the Pragmatic Programmers (click here to see the the previous rules). It’s often tempting to abbreviate in the names of classes, methods, or variables. Resist the temptation. Abbreviations can be confusing, and they […]

Hey! I’m alive! ;-)Just too busy, studing for SCJP (6). Wait for news, soon. But for now, let’s continue seeing the rules of thumb, presented at chapter Object Calisthenics by Jeff Bay. If you have missed one of the passed rules, just take a look in older posts at my blog archive. Talking about the […]

Continuing the sequence of posts about the “Nine Steps to Better Software Design” exercise proposed in The ThoughtWorks Anthology book. This one is very easy and simple. The intent here is to wrap all primitive values (including a simple String value) into small little objects. An primitive value like an int, is just a scalar […]

As Jeff Bay wrote: “Every programmer understands the if/else construct.” This is the simplest conditional logic, avalilable in nearly every programming language. But it also make possible to turns your code into a nasty nested conditional logic that’s impossible to follow or very dificult to read, understand and mantain. Conditionals are also a frequent source […]

In a previous entry, I’ve written about an exercice based on “rules of tumb”, proposed by Jeff Bay. Here is the first rule. Have you ever encountered a large amount of lines all together into a single method, and started wondering “oh hell, where I start…” ? Please! Don’t lie for your self conscience! So, […]