As I sat in my living room reflecting on the past three days instead of my latest blog post topic I came to the realization that the last three days could easily be a relatable topic for almost anyone. In the past three days I have loaded and unloaded a 26 foot moving truck, picked up a new puppy that has not stopped barking since we brought him home, unpacked half of our belongings, flown from Cincinnati, Ohio to San Antonio, Texas with my wife for a “weekend getaway” and flown back to Cincinnati. In all of the chaos that surrounded the weekend I learned a few things about myself along the way. We always like to do takeaways and action items when we have meetings at work so I will present mine from the last few days.
I started including unit testing as part of my development routine four years ago. Like a lot of developers, I struggled at first to know what to test and how to make my code more testable. In the .NET space the common approach is to use a lot of interfaces and dependency injection to help keep your code loosely coupled and easier to test.
While developing SharePoint 2010 solutions I am constantly going through the ULS logs to find out what happened when an error occurs. I usually use a tool like ULSViewer to wade through the logs and find my specific correlation id. Then figure out what happened. I thought to myself, there must be a better way! So I tossed around a couple of ideas about creating a web part that would show the log items that had that the correlation id, but that still seemed too cumbersome. What I really needed was to have it right on the error page.