Re: Literate style, making code more readable or going overboard?

George Dinwiddie <[email protected]> Wed, 10 Feb 2010 08:16:31 -0500
Newsgroups gmane.comp.programming.refactoring
Organization iDIA Computing, LLC
Message-ID <[email protected]>
Olof Bjarnason wrote:
>> I find this to be as readable, and less error prone. (What if someone
>> forgot about the method and the need to make both checks?) With
>> collections, the Null Object Pattern is free--you just return an empty
>> collection.
>>
> 
> To continue on that line of thinking, what is the operation contained within
> the block..? Maybe it should be an operation inside the adminUsers object?
> 
> adminUsers.ApplyOperation()
> 
> Then we avoid the 'if' altogether.

I like that, Olof.

  - George

-- 
  ----------------------------------------------------------------------
   * George Dinwiddie *                      http://blog.gdinwiddie.com
   Software Development                    http://www.idiacomputing.com
   Consultant and Coach                    http://www.agilemaryland.org
  ----------------------------------------------------------------------



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/refactoring/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/refactoring/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/