Garry Pilkington


Application Developer
Liverpool, UK

September 2008 - Posts

My notes on becoming a better developer

Following on from Justin Etheredge post about becoming a better developer, I would just like to add my nuggets of info.

I find that it is very easy to get swamped by the amount of info out there just on .net. I am currently following three simple practices at the moment; set clear goals, refine a topic scope, and time management.

Set clear goals: Have a six month plan with some simple goals to achieve by the end of it. Don't choose too much to do, you will just be overwhelmed. Also don't choose too little or you could find yourself getting bored reading and practicing the same subject matter.

Refine a topic scope: Ok I don't know what to call this advice, so I will explain what I do. As part of my RSS aggregation, I have a separate subsection in my reader (I use WizzRSS) that is mapped to feeds from services such as DotNetKicks and now StackOverflow as well. So for example one of my goals at the moment is to study agile methodology and design patterns, I will have feeds set up for unit testing, singleton pettern, facade pattern, etc. This way I can concentrate on a sub topic of one of my goals without expanding out and getting lost in information overload.

Time management: I use to find it so easy to get caught in the trap of spending hours reading blogs, going from link to link sometimes ending up reading about a subject that has absolutely nothing to do with development and the task at hand. What I do now is limit myself to a max of 30 minutes in the morning and 30 in the afternoon to read the posts I am most interested in. Link collections such as Jason Haley, Chris Alcock, Alvin Ashcroft and Steve Pietrek help out a great deal. That way you can quickly cover anything new in the .net world. If I find I am running out of time or I am reading a post that is just too good to leave, then I will drop it in to Evernote for reading at a later date.

Something I do want to try early next year is to look at other peoples code. Download an open source project and open it up and see how it works. This is similar to what Scott Hanselman is doing with his Weekly Source Code.

Retrofitting Unit Tests

This is a post that I had written a while back and never committed to it, I think it's because the title has the potential to kick up a storm. Well I have been reading the new http://stackoverflow.com web site for the past couple of hours (I know I should be doing some real work, but I would put it down to research). What a brilliant site, well done guys. Anyway the census I have come to is that re unit tests:

"Start afresh. Only think about writing tests when you are writing new code. This can be re-working of old code, or a completely new feature." link

Well I am going through a refactoring period at the moment before the next big project kicks off. Following Martin Fowlers advice on not having to do large spells of it, but just a little here and there, even after a week the code base is already looking sweeter. It is always amazing to look over old code, I have come across several methods which are doing more than one thing so extracting methods and introducing simple unit test where I think they are needed. As I am doing this I have come across a few tools which can help in adding unit tests to your code. One of the tools which helps do just that is NUnitGenAddIn. It is very simple to use as it adds a context menu to Visual Studio allowing you to generate a unit test for the method selected. There are a few other unit test generators out there, some of which I have come across are-:

Kellerman Nunit Test Generator
Edwinyeah TestGen.Net
Novell NUnitGen AddIn 
 

There is also the Pex Automated Exploratory Testing for .NET from Microsoft, but I haven't had a chance to look at this yet. Has anybody had experience with automated exploratory testing?

References:

http://stackoverflow.com/questions/62625/how-do-you-know-what-to-test-when-writing-unit-tests

http://codebetter.com/blogs/jeremy.miller/archive/2006/06/27/146899.aspx

http://geekswithblogs.net/chriscanal/archive/2008/05/09/test-first-or-is-that-new-legacy-code-you-just.aspx

More Posts