DCSIMG
Beauty is in the eye of the beholder - .NET Geek

.NET Geek

"It is upon the Trunk that a gentleman works" - Confucius

Beauty is in the eye of the beholder

In the last edition of Visual Studio Magazine, a reader-mail entry stated that he preferred VB.Net over C# because C# is ugly. Without entering that discussion, I find C# pretty at times. That reminded me of a an episode from high school. Our math teacher was ill and none of the regular replacement teachers were available. Instead we got a math professor from a university who stepped on late notice. I don’t remember much, but one thing got burnt into my memory. During that class she stood by the blackboard and scribbled something that at the time looked gibberish to me. For a few minutes she stood there with her back to the pupils. When she finally turned to us, she gazed towards us, back to the  blackboard and then to us again. She said with a passionate voice: “Can you see the beauty?”

I couldn’t, and for years I didn’t even understand what can be beautiful in numbers or in source code.

This morning when the kids were still asleep I needed to compare two parse results and see if they differ.

private bool IdentifiersChanged(IEnumerable<ScopeIdentifier> parseResult)

{

    if (_scopeIdentifiers == null)

        return true;

    var firstModification = parseResult

             .Except(_scopeIdentifiers, new ScopeIdentifierComparer())

             .FirstOrDefault();

    return (firstModification != null);

}

Can you see the beauty?

Posted: Nov 28 2008, 04:23 AM by Kim | with 2 comment(s)
תגים:, ,

Comments

Eran Kampf said:

?!@

"from item in parseResult select item" is EXACTLY like saying "parseResult"

# November 28, 2008 3:25 PM

Kim said:

?!@, ???

Thanks, much better.

# November 29, 2008 11:11 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: