15 Rules to Better Code
August 30, 2005 on 9:25 pm | In 31 Days to a Better Blog, Geek |Well, I was at TechEd today, and quite by accident ended up in Adam Cogan’s session on 15 Rules to Better Code & Tools to Keep Your Code Healthy.
disclaimer: this is all typed up from hurried and garbled notes taken during the session!
Adam Cogan is Chief Architect at SSW in Sydney, Australia.
The session was mainly about erradicating bugs from your code and achieving consistency throughout your business.
Adam explained that erradicating bugs could be achieved through the use of Test Driven Development and Unit Testing. He also talked about integrating NUnit and respective Unit Tests into the release of your products for users to run when everything goes wrong on their machine when it works on yours.
Unit Testing is especially useful when an application has dependencies and operates under the .Net JIT compiler, for fragile code such as regular expressions, and for difficult to spot bugs like rounding and arithmatic.
Areas which Adam talked about applying Unit Testing to were MS Access, SQL Reporting Services, and Javascript (JSUnit).
He also mentioned that it can be very useful when testing database schemas and for reconciling databases - ie. when a client has fiddled with the backend db of your product, thus rendering the application useless or ineffective, and is blaming your coding for the problems. Running the reconcile test will show that the DB has been tampered with - subsequently absolving you of any responsibility - Brilliant!
Adam then went on to talk about MS FxCop and how it can be used to scan for inconsistencies in yours and your colleagues coding methods - and also about a tool that SSW has produced called SSW Code Auditor - which analyses for inconsistencies by applying a series of configurable rules to scan your code files with regular expressions. This can pick out such inconsistencies like buttons being different sizes and Check Boxes not having mnemonics.
He also raved about how good JetBrains Resharper is - which is not exactly difficult since it is a superb coding tool - and their dotTrace Profiler tool for performance tuning your .Net applications.
Finaly, Adam talked about the importance of not breaking the build on the build server - i.e. always test changes before checking in, and don’t check in if tests don’t work.
And that was about it really. Obviously it was much better being there than reading about it from my brief notes. If this sort of stuff interests you then I suggest you read some of the articles on the SSW website.
Also, if you ever have the good fortune to meet Adam, be sure to get him to tell you the story of the laser treatment he had done on his eyes during a trip to Brazil.
Related Posts:
GoDaddy Again
GoDaddy
Chitika eMiniMalls
Performancing Metrics
Adsense Tweaks
2 Comments »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^









>>>>Adam Coogan
It is “Adam Cogan”, yes I have seen him in Malaysia, he is very good.
>>>>on the SWW website.
Is is the “SSW” website
Comment by Far East — October 5, 2005 #
Thanks for letting me know *embarrassed* - I’ve made the changes to the text.
Comment by Dominic — October 5, 2005 #