In this Learn Series I am going to write about the Sprout Method which is in the book “Working Effectively with Legacy Code by Michael Feathers“, all I have to say is what a great book if you don’t have it, you should pick it up asap. Sprout Method is a technique that one can […]
Archive: August 2009
Null Pattern Last time I blogged about “Learn the Null Pattern“, but I forgot to mention one thing about the Null Pattern. That is you have to be mindful of it. For example
1 2 3 4 5 6 |
foreach(var id in IDList) { var employee = db.GetEmployee(id); salary = db.CalculateSalary(id); employee.Pay(salary); } |
The code looks okay but what if the GetEmployee method actually returns a NullEmployee? Well that would still be okay, since […]
So there is this character (antagonist) in this TV series “Heroes”, and his name is Sylar People might also know him from the new Star Trek movie, where he plays the young Spock. Anyways, back to the Sylar character, in the show he plays a serial killer who kills people with ability (e.g flying, shooting […]