Friday, June 26, 2009

Agile family values

The best thoughts taken from the last meeting of Toronto Agile User Group (heard or taken from the air):

In reality client doesn’t need to spend less money – he needs to spend it wisely.

In reality managers don’t need to ship software faster – they need to ship it predictably.

It is all about honesty and trust. Honesty to others and to yourselves: to be ready to admit that everything else is just smoke and mirrors. And to trust others that you can say it out loud without igniting political wars.

Monday, June 01, 2009

Applying Fluent Interface. Part II – fluent validation.

In of the podcasts on Dimecast.Net Derik Whittaker has shown very smart way to address object validation with Fluent interface.

First I couldn’t help myself but notice that “Painfulway Validation” could be replaced with a yield constructs (picked up from ScottGu’s tutorial):

public static IEnumerable<string> Validate (HostEntry hostEntry)
if (string.isNullOrEmpty(hostEntry.FirstName))
yield return "First Name is null";
if (string.isNullOrEmpty(hostEntry.LastName))
yield return "Last Name is null";

Maybe it is still painful to read but obviously less verbose. But anyway that construct is still to be replaced by Derek’s smart implementation.

© 2008-2013 Michael Goldobin. All rights reserved