Blog Stats
  • Posts - 14
  • Articles - 0
  • Comments - 7
  • Trackbacks - 0

 

Thursday, January 10, 2008

Framework Blues

Being an ultra-introvert, it always freaks me out when a comment I make brings me out from under the radar.

I posted on the alt.net list to a thread concerning the pro's and cons.  Jeremy Miller posted an opinion on my comment, and I followed up with a comment on the post.

As a reflection on all that,  I'd like to say that I think that in priciple I'm inclined to agree with Jeremy.  In practice, I'm stuck with the Framework that led to the post.

I believe that my ideas of what a 'Framework' should be is changing.  Jeremy talks about code generation and the templates and IDE productivity stuff, but I think that I'm going a different route myself, although it wouldn't be the first time I was wrong.

What I've been currently trying to do, with the help of the language enhancements (anonymous delegates, generics, lambda expressions, etc.) is get libraries of limited scope reusable objects that can be modified through the use of generics and delegates to perform instance specific work.

What I am working on right now involves a ton of reuse,  many of our systems are basically made up of building blocks that are identical in specification.  Our framework involved creating blocks of reusable objects, along with the rules of validation, that could be dropped into place.

For the first round of systems (which were almost identical), this worked very well; however, as more less similar systems were included, the framework started to show strain.  My original point was that the framework would have been able to be adapted or evolved into a better form, except that the development contracts were written in such a way as to preclude any further development on the system in question (a bad choice by program management).  Once we finally got the money in place to make updates to the framework, the enhancements are stretching the capabilities of the framework.

One of the biggest issues I've had recently was to try to convince a team not to use the system for a project that didn't fit well with the design intent with the framework, and they suffered exactly the fate that Jeremy mentions in his post and would have been better off starting from scratch.

Tuesday, October 30, 2007

A missing piece to CMMI

I've been working in organizations that adhere to some level of the CMMI for some time now.  And we are trying to fit what we can of agile programming into our process, and hopefully are achieving better results while still keeping the structure required of our contracts.

 

A long time ago I ran across this article which discusses some of the levels of process that are often encountered in the wild, but rarely discussed by SEI.

 

So here's the The Capability Im-Maturity Model (CIMM) as envisioned by Capt. Tom Shorsch USAF.

Wednesday, October 24, 2007

Work Life Balance

Chris Sells has been writing on working at home, and Scott Hanselman has as well.

As for myself, my employer frowns on working at home, although I am on a laptop, and we do have a VPN.  Several times I have gotten permission to work from home simply so I can focus on one project at a time and actually accomplish things.

My normal course of action is to keep accepting small tasks that 'should be done easily' and then have them pile up as the daily fires appear and consume my time.

Ultimately, my to do list threatens to suck my computer into the void due to its massive gravitational weight and I have to blow everyone off and get the plate clean again.

I'm not sure if working full time from home would work from me,  I certainly doubt my employer would buy into it.  But currently, I'm sitting at the office trying to play the same game of catch-up.  It's 10pm and I'd rather be home to do this work.

Jeff Answers My Unit Test Question

Earlier Jeff Brown posted some comments on some new features of MbUnit v3, which I responded to by how to answer the NUnit critics concerning isolation of test fixtures.

Jeff responded with what I think is a pretty good answer.  I'll have to think it through for a bit.

I believe that my original question was not so much a question of the validity of the approaches, but that after reading the book, I found that I had not considered the original issue of isolation via new test fixture classes.

I started with NUnit as my first experience and not JUnit, so the set and tear down mechanisms were just 'what was' rather than what should be.

As I've said in my other posts,  I am often constrained by decisions made from outside my organization and the choice of unit testing framework is no different so having the best arsenal of responses to the unavoidable battles for these types of choices is a good thing.



Friday, October 19, 2007

Extension Methods and Dictionaries

I have started looking at improvements to the NMock2 code with respect to writing a branch of the code in .NET 3.5.

The availability of extension methods in C# 3.0 have solved a common code issue of mine where I want to use Dictionary.TryGetValue to see if there is a value in a dictionary for a given key and create a default if not.  Which leads to the following code.

public static class ExtensionMethods
{
    public static U SafeGetValue<T,U>(this Dictionary<T,U> dictionary, T key)
      where U:new()
    {
        U value;
        if (!dictionary.TryGetValue(key, out value))
        {
            dictionary[key] = value = new U();
        }
        return value;
    }

    public delegate U NewInstance<U>();

    public static U SafeGetValue<T, U>(this Dictionary<T, U> dictionary, T key, NewInstance<U> newInstance)
    {
        U value;
        if (!dictionary.TryGetValue(key, out value))
        {
            dictionary[key] = value = newInstance();
        }
        return value;
    }
}

Thursday, September 20, 2007

Getting Mono To Compile on old platforms

I'm currently involved in getting mono to compile on Solaris 9, Solaris 2.5 and DEC Tru64 Unix.  I'll be posting more about my experiences with this.  Hopefully I can get it to work, because the projects I'm working on would be much better done in a cross-platform managed environment than having to worry about the details of C++ compatibility.  If anyone has any experience here, I'd appreciate pointers.

Wednesday, September 12, 2007

Why half implementations of TDD don't work

Currently I'm in the process of reviewing some code that was written and then had MbUnit tests written to back flush the requirements.  Since I'm part of a more traditional shop, the code has already been peer reviewed.  The tests, of course, revealed errors in the code that weren't caught as a part of the peer review; so the code was corrected and re-reviewed.  Of course, when the tests were reviewed, the tests were found to have errors, which precipitated further changes.

I addressed the approach we are using to fix this effect (although the fix won't be perfect due to the limitations of our process) in the post How to make the most of traditional peer reviews.

Thursday, September 06, 2007

Infragistics Pain

It is entirely possible for something to have too many features.

In response to a question from a co-worker, we spent approximately 2 hours digging through the options and model structure of the Infragistics UltraGrid control to discover the way to get the bound rectangle of a row for a drag operation.

While I get the desire for everything to be super customizable, at some point it seems like overkill.

Thursday, August 23, 2007

Debugging Visual Basic 6 code through Visual Studio 2005

Today I had an issue where an application that as a mixture of .NET, VB6 and C++ code needed to be debugged.  Since the component that I needed to look at was in the VB 6 portion, I attempted to debug from VB6 only to be met with a variety of bizarre errors.

I don't have visibility into the rest of the application, so I continued with the .NET 2005 debugging session, which executed correctly, and noticed that I could set a breakpoint in the VB 6 code when the unmanaged debugging support was turned on.

The debugger visualizations are not quite correct, the .NET objects were showing up a <void>, but I was surprised to see that you could do this at all.  I was able to trace through to the source of the error and move on.

Wednesday, August 22, 2007

BindFailures MDA in VS 2005

While debugging a COM Interop error I came across the fact that Binding Failures can now be trapped in the IDE using the BindingFailurse MDA (Managed Debugging Assistant).  Up until today, I'd still been using the FUSLOGVW utility to track down binding failures.

 

 

Copyright © Steven Mitcham