Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Entries

photo

From Lotus Sandbox -...

Blog:  JEC's Blog
Dale Cole
Updated 
No Ratings 0     No Comments 0
photo

Fun with ... garbage...

Blog:  Jan Schulz
Jan Schulz
Updated 
No Ratings 0     No Comments 0
photo

classy

Blog:  Yellow is the...
Tim Tripcony
Updated 
No Ratings 0     Comments 6
photo

Building "Composite"...

Blog:  .Domino Frame...
Peter Presnell
Updated 
No Ratings 0     Comments 3
photo

Adding Abstract Clas...

Blog:  .Domino Frame...
Peter Presnell
Updated 
No Ratings 0     Comments 1

Jan Schulz

Blog Authors:  Jan Schulz  

Previous |  Main  | Next

testable code = better code?

Jan Schulz  |     |  Tags:  unittest design pattern oop  |  Comments (0)
After my entry about event delegation, I went out and refreshed my memory about Design Pattern (The GOF book was the first - and up to now my only - book about programming. Hey, It's just a hobby for me :-). I also found the Google Testing Blog. Especially one of the entries was very interesting: writing testable code. Here are my Top7 from that entry:
  1. Don't mix object graph construction with application logic
  2. Ask for things, Don't look for things (aka Dependency Injection / Law of Demeter)
  3. Don't do work in constructor
  4. Favor composition over inheritance
  5. Favor polymorphism over conditionals
  6. Don't mix Service Objects with Value Objects
  7. Mixing of Concerns
So even if I don't plan on writing unittests (lsUnit and lsMock anyone?) I found the recomendations quite usefull and will try to follow them in my programming.

Comments

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.