Ted Roche wrote:
> On 6/1/07, Dave Crozier <[EMAIL PROTECTED]> wrote:
>   
>> An interesting discussion on the benefits of writing as little code as
>> possible. Also, the comments make good reading.
>>     
>
> I think the original poster missed the mark.
>
> if (s == String.Empty)
> if (s == "")
>
> ".. It seems obvious to me that the latter case is better because it's
> just plain smaller..."
>
> And how would you compare this to code that checks to see if s is the
> single character double-quote by wrapping that literal in single quote
> characters. Or a single space (i.e., s ==SPACE(1)) The first example
> is explicit, it might even be Unicode-compatible, and it is easier for
> the programmer to read. To heck with what's easier for the computer,
> buy more hardware, but the time and cost of a programmer maintaining
> and understanding code is the expensive part of the system. Brevity at
> the expense of understandability is a false savings.
>
>   

Well said, Ted.  Computers can crunch a ton of stuff, and especially 
with today's remarkable processing power, the guy is perhaps focused on 
the wrong aspect.  My POV:  Always write code that others can maintain, 
because even if that's you, you don't want to be cursing it (or 
yourself) years down the line when things need to change.

-- 
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to