Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Derik Whittaker

Thoughts on Software Development, .Net, OOP, Design Patterns and all things cool



Great code comments I stumbled across.

Today I was looking at some .Net 3.5 source code and ran into these great comments. 

      //ok, this is a hairy, dirty, and nasty piece of code
      //the alternatives are substantially worse than this though
      //i.e. when you do your own provider, LINQ assumes that
      //you are going to implement your own expression tree visitor and
      //do it all yourself.  Frankly, I still have xmas shopping to do
      //and I really don't want us to be foobared when we get
      //even more extension methods added to LINQ
      //therefore, we are pulling execute based on taking the calling the standard execute on
      //enumerable, but using our own class
      //

This is great because it is truthful and explains the exact intent or thought process of the developer.

//pray.  If something is going to break, it will do so here
return genericMethodInfo.Invoke(null, paramList.ToArray());

We have all put comments in here

I know this post was kinda pointless, but thought it would cause some to smile

Till next time,



Comments

Daniel Patterson said:

"I still have xmas shopping to do" - priceless.  

# April 6, 2008 6:14 PM

Derik Whittaker said:

@Daniel,

Yes, that is a great comment.  And because I know the author of that, it is even better :)

# April 6, 2008 6:20 PM

PartialClass said:

:)

I always like such programmatic fun

# April 15, 2008 6:05 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Derik Whittaker

Derik is a .Net Developer/Architect specializing in WinForms working out the northern suburbs of Chicago. He is also believer and advocate for Agile development including SCRUM, TDD, CI, etc.

When Derik is not writing code he can be found spending time with his wife and young son, climbing on his bouldering wall, watching sports (mostly baseball), and generally vegging out. Check out Devlicio.us!

Our Sponsors

Proudly Partnered With


This Blog

Syndication

News