ploeh blog

Mark Seemann's discontinued .NET blog.

Blog - About

About ploeh blog

Mark Seemann was a software development engineer working for Microsoft in Copenhagen, Denmark. This was his (professional) blog. Please visit the current ploeh blog instead.

All postings are provided "AS IS" with no warranties, and confer no rights. Any opinions expressed in this blog are solely those of the author and not official positions of Microsoft Corporation.

  • ploeh blog

    Generating NotImplementedException Instead Of Exception

    • 0 Comments
    Ever since I started using Visual Studio 2005, I've been enjoying its refactoring features, but it has always been bugging me that when you generate a new method stub or implement an interface or abstract class, the auto-generated method throws System...
  • ploeh blog

    Console Unit Testing

    • 6 Comments
    In many scenarios, console applications are very useful, but if you have a console application of intermediate complexity, you should obviously unit test it like all the other code you write - right? If you have a console application as an administration...
  • ploeh blog

    Speaking at .NET Days 2006

    • 0 Comments
    The week after speaking at TechEd , I'll be giving a talk at .NET Days 2006 in Århus. In this talk , I'll be talking a bit about data access component testing. In my terminology , these are not unit tests, but integration tests, but that does not mean...
  • ploeh blog

    Bugs On Purpose

    • 0 Comments
    The Ative guys has a blog with a lot of insightful development project gotchas. This one , in particular, made me chuckle. Although I've never had to introduce bugs on purpose into a system, I think this is is a very elegant solution to the described...
  • ploeh blog

    Test-Driven Development With Test Lists

    • 3 Comments
    For most of the time, I write code using the test-driven development methodology. This means that I write a bit of code, run a suite of tests, write a bit more code, run some more tests, etc. For this reason, I need unit testing to be an integrated part...
  • ploeh blog

    Test Types

    • 12 Comments
    The recent discussion spawned by my former post has prompted me to write this entry about test types. There's not a single clear definition of what a unit test is, so sometimes people approach me with unit testing challenges that don't really relate to...
  • ploeh blog

    Volatile Dependencies

    • 5 Comments
    Unit testing is all about testing your code in isolation from its dependencies. Why is it important to isolate your code from its dependencies? There may be several reasons: A dependency introduces a requirement to set up and configure the environment...
  • ploeh blog

    Speaking At TechEd, Barcelona

    • 7 Comments
    TechEd Developers 2006 is in Barcelona in November, and I have had the honor of being invited to deliver a talk on unit testing best practices using Visual Studio 2005 Team System. Since breakout sessions at Microsoft conferences are always one hour and...
  • ploeh blog

    How To Dispose Members From Forms

    • 19 Comments
    When you create a new Form (or UserControl for that matter), Visual Studio creates it as a partial class, with the designer-generated code going into the *.Designer.cs file. One other piece of code that also goes into the designer code is an override...
  • ploeh blog

    Debugging When Property Reads Have Side Effects

    • 2 Comments
    The last couple of days, I've been working with some code where there was a side effect when a particular property was read. This made it more cumbersome to debug the code, until a very simple solution dawned on me. It's so stupidly simple that I suspect...
  • ploeh blog

    IComparable Implies Transitivity

    • 2 Comments
    Lately, I've been doing comparisons of DateTimes and TimeSpans, and I've been sorely missing functionality for working with ranges, selecting the minimum and maximum, etc. Since both types implement IComparable<T>, I got to think about if I should...
  • ploeh blog

    Cleaning Away The TestResults Folder

    • 4 Comments
    When I write code, I usually use the test-driven development approach, which means that I execute a suite of unit tests very often. In Visual Studio 2005, all artifacts of a test run gets copied to a folder beneath the TestResults folder, which is usually...
  • ploeh blog

    Extra-Sensory Perception?

    • 1 Comments
    My colleague Michel Baladi has just declared himself not an architect , and I must admit I have the urge to follow him. Although I can't claim Michel's impressive record of more than 20 years in the software business (can this really be true? He doesn...
  • ploeh blog

    Filtering Properties From Methods With Reflection

    • 0 Comments
    Last weekend, as I was polishing off Service Locator 2 , I was reminded how Reflection returns properties as methods, as well as as properties. Take this simple class as an example: public class MyClass { private string myText_; public string MyText...
  • ploeh blog

    Bordecal.ImportsSorter

    • 1 Comments
    Being the somewhat anal-retentive person that I am, I have always found it important to have all my using statements in an ordered sequence, and finally seem to have settled on plain alphabetical sorting. A manual approach to this worked fine for me...
  • ploeh blog

    Compiler Warnings, XML Comments, And Code Analysis

    • 3 Comments
    In Visual Studio, missing XML comments and code analysis violations generate compiler warnings. In the beginning of a development project, XML comments are typically not written, and code analysis violations may not yet have been taken care of. This causes...
  • ploeh blog

    Application Block MSDN Article

    • 0 Comments
    My new MSDN Magazine article Patterns & Practices: Speed Development With Custom Application Blocks For Enterprise Library is now online on the magazine web site. It appears in the July 2006 issue and demonstrates how to create a custom application...
  • ploeh blog

    Unit Testing A CAB Controller

    • 8 Comments
    In my previous post I demonstrated how to create an application based on the Composite UI Application Block (CAB) while truly separating Views from Controllers by placing them in separate assemblies. My main motivation for separating these application...
  • ploeh blog

    Cutting CAB The Other Way

    • 1 Comments
    The Composite UI Application Block (CAB) is a pretty nice piece of technology that allows you to separate user interface code from user interface process code, following some variant of the Model View Controller (MVC) pattern. The QuickStarts that ship...
  • ploeh blog

    Unit Test Your Enterprise Library Logging Logic

    • 17 Comments
    Most enterprise applications need to perform logging in some form or other, and the Enterprise Library Logging Application Block provides an excellent platform for implementation. With the Logging Application Block (henceforth LAB) you don't have to think...
  • ploeh blog

    A Faster TestTypeResolutionService

    • 3 Comments
    In February, I wrote about unit testing CodeDomSerializers , but although it was a good initial attempt, there was room for improvement (as I also described in the article). Back then, my main priority was just to get my unit tests working, so other issues...
  • ploeh blog

    astype Code Snippet

    • 4 Comments
    So, a couple of days ago I discovered just how easy it is to create code snippets for Visual Studio 2005, and this apparently put me into snippet mode. My first attempt at code snippets unintentionally caught a bit of flak, so I hope this second one is...
  • ploeh blog

    onevent Code Snippet

    • 10 Comments
    When raising events, the .NET framework design guidelines recommend that this is done from a protected virtual method named On<EventName> (unless the class is sealed or the event is static, etc.). This leads to a recurring pattern of similarly looking...
  • ploeh blog

    Coding Styles

    • 2 Comments
    From time to time, people ask me about coding styles; if they have seen some of my code, many are curious about my use of post-fixed underscores in private member names. Is this a new Microsoft standard? No. It is my own, private coding convention...
  • ploeh blog

    Michel Baladi Has a Blog

    • 0 Comments
    My former Microsoft Consulting collegue Michel Baladi now has a blog at http://blogs.msdn.com/baladi . Michel is still a Microsoftie, but he now works with ISVs from Europe and beyond in the Microsoft Technology Centre in Vedbæk, Denmark. Michel and...
Page 5 of 6 (132 items) «23456