Derik Whittaker



Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at
Talking Mocks at TriNug, what a great time, what a great group

Last night I had the opportunity to do my 'Taking your tests to the next level with Mocks' session to the TriNug user group.  I would first like to say thanks to Doug Wilson and his entire group.  They had a great turn out (45ish people) and they asked a ton of great questions.

To kick off the session I ask the same question I ask everything I give this session 'Who in here writes tests as part of their development routine?'.  The response I got did not surprise me, about 30% said they did.  I then asked those 30%, who using a mocking framework?  Again the response did not surprise me, only about 50%.

Of course with only 30% even saying they test, I had to ask why, why and why.  The responses I got I have heard before and thought I would share them

  • It is too hard to get started
    I have heard this one before, and I am not going to lie to you, writing tests is hard, it takes effort and time to learn how to do it.  But just ask yourself this.  When learning anything new is it easy?  Are you able to just pickup a new tool/technology and 'know it' or do you have to learn it?  My guess you have to learn it, testing/mocking is no different.
  • My client/company is not paying me to write tests
    Sorry, but this is one statement have to call BS on.  I immediately asked, is your company paying you to write shitty quality?  Or are they paying you to produce quality code?  If they are paying you to write shitty code, STOP reading now as I am done talking to you (ok, may be not, but really??? shitty code is what they want???).  If they are paying you to create quality code how can you insure it without tests?  My guess is that you have tests, but they just happen to be of the manual, error prone nature.
  • I do not have time
    Again, another one I call BS on.  I followed this up with 'let me guess, you have time to debug/bug hunt at the end right?'.  The key to testing is that it does take time (wow, that is honest) but it is either a pay me now, or pay me later scenario.  Either you take the time now to embed quality or you take the time later to duck-tap quality.  Your choice?

With this information in hand, I really attempted to drive home the values of both testing as well as using a mocking framework to remove dependencies.  I think towards the end of the night I had converted some people to 'believers' and hopefully they will either give testing a solid go (assuming they are not testing right now) or give using a mocking framework a go.

You can get any of my session information from Google code from this location

Till next time,

[----- Remember to check out DimeCasts.Net -----]

Posted 11-13-2008 6:36 AM by Derik Whittaker



Tim Barcz wrote re: Talking Mocks at TriNug, what a great time, what a great group
on 11-13-2008 10:17 AM

Promptly forwarded this on to several people I know....

The reasons for not testing are old and tired.

Andrew J. Leer wrote re: Talking Mocks at TriNug, what a great time, what a great group
on 11-13-2008 5:29 PM

I absolutely agree, but over here we have another reason...the compiler is so old we don't have a Unit Testing framework that will support it!

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Google Reader or Homepage Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of
Red-Gate Tools For SQL and .NET


SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
NHibernate Profiler
Balsamiq Mockups
JetBrains - ReSharper
Web Sequence Diagrams
Ducksboard<-- NEW Friend!


Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers


Community Server (Commercial Edition)