Long methods are evil on several grounds:Often programmers ask, how "long" is a long method? A method is too long if
- They're hard to understand
- They're hard to change
- They're hard to reuse
- They're hard to test
- They have low cohesion
- They may have high coupling
- They ten to be overly complex
- you have to scroll down to look at the complete method
- it takes several minutes to understand
- you can't easily write an automated test for it
- you can't state the one prominent purpose for the method
Sunday, August 16, 2009
Oh no, a long method... again...
Wednesday, August 12, 2009
Stop writing bugs...
Wednesday, May 20, 2009
New book! The art of unit testing
Hi, I just read the post from Roy Osherove where he anounces that his book "The art of UNit testing" is published and you can purchase it on PDF or print book.
He says that he wished he could haave had this book when he started writing his firts tests. When Roy published his first chapter on PDF for free I gladly downloaded it and have used it to start teaching developers on what unit testing is. So, I am sure his book is really useful for anyone who likes unit tests or works with Test Driven Development.
Wanna give it a try? I will!
Check this brief from http://www.manning.com/osherove/ where you can buy it:
Unit testing, done right, can mean the diff erence between a failed project and a successful one, between a maintainable code base and a code base that no one dares touch, and between getting home at 2 AM or getting home in time for dinner, even before a release deadline.
The Art of Unit Testing builds on top of what's already been written about this important topic. It guides you step by step from simple tests to tests that are maintainable, readable, and trustworthy. It covers advanced subjects like mocks, stubs, and frameworks such as Typemock Isolator and Rhino Mocks. And you'll learn about advanced test patterns and organization, working with legacy code and even untestable code. The book discusses tools you need when testing databases and other technologies. It's written for .NET developers but others will also benefit from this book.
Tuesday, January 13, 2009
Unit Testing in VB.NET – with Typemock Isolator (with a free license offer)
Programming Visual Basic applications?
Typemock have released a new version of their unit testing tool, Typemock Isolator 5.2.
This version includes a new friendly VB.NET API which makes Isolator the best Isolation tool for unit testing A Visual Basic (VB) .NET application.
Isolator now allows unit testing in VB or C# for many ‘hard to test’ technologies such asSharePoint, ASP.NET MVC, partial support for Silverlight, WPF, LINQ, WF, Entity Framework, WCF unit testing and more.
Note that the first 25 bloggers who blog this text in their blog and tell us about it, will get a Free Full Isolator license (worth $139). If you post this in a VB.NET dedicated blog, you'll get a license automatically (even if more than 25 submit) during the first week of this announcement.
Go ahead, click the following link for more information on how to get your free license.
_

