Next Scottish Developers event – 3rd August – not to be missed!

.ics calendar entry

Scottish Developers is proud to announce an August half day conference event not to be missed. The place to be is Edinburgh on the 3rd of August 2006 if you have an interest in debugging or code coverage…


13:45 Registration

14:00 Welcome & introductions

14:10 .NET debugging, tracing and instrumentation – Duncan Jones of Merrion Computing

15:40 Break – free beer and pizza anyone!

16:15 Code Coverage in .NET – Craig Murphy of Scottish Developers

18:00 Close (post event entertainment of our speakers in the traditional way)

.NET debugging, tracing and instrumentation

In this session we will walk through the built in capabilities of the .NET framework and other tools that provide debugging, tracing and instrumentation for .NET developers. Code examples (in VB.Net) will be included and there will be some statistical analysis on the costs of adding different levels of tracing to your application.”

+ The need for debugging, tracing and instrumentation
+ Using the Trace and Debug classes
+ Setting a trace level using a trace switch
+ Writing a custom trace listener
+ The built in .NET performance counters
+ Creating and using custom performance counters
+ The cost of different tracing and instrumentation levels

Duncan Jones is a Microsoft MVP in Visual Basic.NET and since 2001, the technical half of Merrion Computing Ltd, a company that provides printer monitoring solutions for Microsoft Windows based networks. He has been programming in Basic for over half of his life starting out on the Sinclair ZX-81 and BBC Micro and has used nearly every variant of Microsoft Visual Basic. He has been developing software commercially since graduating from Aston University in 1993 – originally in Birmingham, then Nottingham and for the last 8 years in sunny Dublin. He has published 19 article on Code Project and is currently traversing the North face of the Visual Basic .NET learning curve.

Outside of IT his interests are photography, single malt whisky and the never ending restoration of a 1971 Triumph GT6

Code Coverage in .NET

Testing code can be a laborious process that is repetitive in its nature. Empirical evidence confirms that most repetitive processes enjoy a lot of success, or coverage, during early iterations, but later iterations suffer from lower coverage as the tedium sets in. For that reason, we sought to automate the repetitive testing process, i.e. we wrote some code that could replace the repetitive process. The development community achieved this by the adoption of a testing framework that embraced Test-Driven Development (TDD) and testing tools such as NUnit.

The ethos behind TDD and NUnit is “write once, use often”, i.e. once a test has been written it can be used many times. Naturally, by embodying “tests” in code and by using a tool to run those tests, we find the repetitive nature of testing disappears and the process of testing actually beings to provide confidence boosts.

However, whilst adoption of TDD and NUnit provides major advances in the reduction of repetitive testing tasks, they do not help us ensure that the tests actually cover as much of the code-base as is possible/required. It is possible to write a collection of tests that only exercise 25% of the code-base, yet because the tests are successful (i.e. they pass), the developer’s confidence is so high, s/he fails to spot that there is still a lot of test code still to be written.

Code coverage, is not a new technique, the likes of Boris Bezier discussed it in 1990 and Tom McCabe wrote about it as far back as 1976. Today, we can use graphical tools to determine how much of our code is exercised, or covered during an execution cycle. Such tools help us identify which areas of our code have not been tested and can help us direct our effort. However, they do rely on some manual effort that is repetitive, i.e. a user/developer must walk through the application. Luckily, if we are practicing TDD, we have a set of automated tests that we can tap into thus alleviate this repetition.

Over the course of 90 minutes Craig will demonstrate four .net tools, NUnit, NCover, NCoverExplorer and TestDriven.Net. All of these tools and free and work with .net 1.1 and 2.0. A variety of IDEs are supported, include Visual Studio 2003 and Visual Studio 2005. He will explain the basics of TDD and code coverage and why they are both important skills and processes to include in your development/build process. Examples will be written in C# and Visual Studio 2005.

Craig Murphy is an author, developer, speaker, project manager, Microsoft MVP (Connected Systems) and is a Certified ScrumMaster. Commercially, Craig has been using Borland Delphi since 1998; today, he uses Visual Studio 2005 and C#. He regularly writes articles product/book reviews: The Delphi Magazine, International Developer, ASPToday and Computer Headline have published his work. Craig has written for virtually every Developers Group magazine issue since the year 2000! He specialises in all things related to .NET, C#, Borland Delphi, XML/Web Services, XSLT, Test-Driven Development, Extreme Programming, agile methods and Scrum. In his career to date, Craig has written cost estimating software for the oil and gas industry and asset valuation software for local councils and the Ministry of Defence. He has a day-job, a wife and a son.

Craig can be reached via his web site:

Microsoft Scotland
127 George Street, Edinburgh, EH2 4JN

More here: