Ed Clarke’s In a Nutshell

And He Needs Help Getting Out

Archive for the ‘Uncategorized’ Category

Source Control Check-ins

Posted by edc73 on August 21, 2008

People I work with me are probably tired of me beating them up for not checking in code often enough.  I try to promote the idea that if it makes the product better or closer to completion, check it in.  It doesn’t have to perfect, or even testable to warrant a check-in.  Just don’t break the build or existing functionality.  With small check-ins, integration becomes less of an issue, and others can see what’s going on and where we’re heading.

Jeff Atwood does a good job of making the point here

Posted in Uncategorized | Leave a Comment »

Use of c# var – Lazy or Flexible?

Posted by edc73 on July 25, 2008

A code review today raised concerns about the use of var such as:

var results = new List<LabResultSummary>();

as opposed to

List<LabResultSummary> results = new List<LabResultSummary>();

Specifically, the question was “Why is type inference needed or even useful in the below? I gotta say, it smells of a lazy developer to me. :)

And then my response:

—————————————————————–

My first inclination to “var” was similar to yours, but I’ve converted.

1. For small methods (which all methods “should” be), what the variable is is obvious from how it’s instantiated (You can only use var when it’s instantiated in the same statement as it’s declaration)

2. It’s still strongly typed (it’s not a vb6 dim object/variant)

3. You can only use on private method variables, so no “leakage” of intent.

4. And damn, when I’m writing a lot of code that’s in flux, it’s saved me lots of work to just change the variable type. For example, refactor a method to return the interface instead of the concrete type. I don’t have to go and touch every single variable that ever called that function.

There’s probably others, but that’s off the top of my head. Again, when I first read about them, I got the “smell” too. But decided to give it a shot and have become a fan. Makes my coding agile :)

————————————————————

Thoughts?

Posted in Uncategorized | 1 Comment »

Unit Test Presentation

Posted by edc73 on July 8, 2008

Worked a good bit on my unit test presentation over the weekend. It’s amazing how little material can be covered in an hour. When I started this, I had all these ideas about what it could be, but reality set in pretty quick. Not just time constraints either. What initially seemed like simple refactorings got a lot more complicated once they go up on the screen.

On the positive side, PowerPoint is the first Office 2007 app that seems more intuitive than its predecessors. Most likely due to my lack of familiarity with its previous version.

Posted in Uncategorized | Leave a Comment »

Back again

Posted by edc73 on June 26, 2008

Giving the old blog another try. Intent here will be to mostly discuss software development topics, but I’m sure other stuff will creep in from time to time.

Posted in Uncategorized | Leave a Comment »