Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

  • Refactoring: reduce variable scope

    In good code variables are used as short as possible. Often we can see code where variables are defined in wider scope than it is necessary. There are many examples about too wide scopes. One of fuzziest of them is variable that is defined in class scope but it used only by one method and this method uses this variable as local variable. But variable life time can also be reduced in local scope. To achieve this we use refactoring method called reduce variable scope.

  • Death March

    Death March book cover
    Ship it! A Practical Guide to Successful Software Projects
    This winter I read book Death March by Edward Yourdon. Death March is about death march projects and how to survive them. There are also chapters describing decisions that you should never make when managing death march project. And there are great tips that help you avoid bad mistakes in death march projects. The book describes also developers life in such projects and gives them some good advises how to stay alive.

  • Refactoring: parameterize constructor

    In legacy code you may find classes with constructor where some objects are created and initialized. These classes are not easily testable because they depend on other classes and therefore when you unit test these classes they may also throw exceptions of classes they depend on. In these cases we can use parameterize constructor refactoring.

  • Reading process output

    Here is my little example about how to catch run console program and catch the output. I used similar code to read the output of OpenSLL.

  • Ship it! A Practical Guide to Successful Software Projects

    Ship it! A Practical Guide to Successful Software Projects
    Ship it! A Practical Guide to Successful Software Projects
    I finished yesterday another great book: Ship it! A Practical Guide to Successful Software Projects from pragmatic series. This book is not theory book that leaves you with many questions and no idea how to move along. Instead, you get an good idea about how to develop software and manage software projects successfully.