• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How to Design For Testability

 
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I noticed a curious thing.

Reading and watching other really good material on how to make your designs easily testable (and other topics that overlapped with this goal) kept coming back to  Miško Hevery.

They would say "There's great reasons for doing it this way, this isn't the place to talk about why if you don't know, go watch or read  Miško Hevery."

I feel like they were right.

Critics mostly say his stuff is obvious, but his target audience is beginners and intermediate designers, as well as those who have been doing things wrong from a testability (and probably reusability and maintenance perspective to for that matter) for so long that they have stopped thinking about it.

I gave someone a link somewhere to one piece, and one can link-surf from there, but as I was following them and closing them I decided to place them all here, because it is, in my opinion, such a good place to pick up a lot of good insight and good habits.

So here is a chronological dump of links to his site, there's many more pages of good stuff there, but these are the ones I left open:

http://misko.hevery.com/2008/07/24/how-to-write-3v1l-untestable-code/
http://misko.hevery.com/2008/07/30/top-10-things-which-make-your-code-hard-to-test/
http://misko.hevery.com/2008/08/21/where-have-all-the-singletons-gone/
http://misko.hevery.com/2008/08/25/root-cause-of-singletons/
http://misko.hevery.com/2008/08/29/my-main-method-is-better-than-yours/
http://misko.hevery.com/2008/09/10/where-have-all-the-new-operators-gone/
http://misko.hevery.com/2008/09/24/application-wiring-on-auto-pilot/
http://misko.hevery.com/2008/09/30/to-new-or-not-to-new/
http://misko.hevery.com/2008/10/21/dependency-injection-myth-reference-passing/
http://misko.hevery.com/2008/10/27/pass-around-ginormous-context-objects/
http://misko.hevery.com/2008/11/17/unified-theory-of-bugs/
http://misko.hevery.com/2008/12/15/static-methods-are-death-to-testability/
http://misko.hevery.com/2009/07/31/how-to-think-about-oo/
http://misko.hevery.com/2009/01/14/when-to-use-dependency-injection/

Maybe these are all summed up here?  I am not sure yet:
http://misko.hevery.com/code-reviewers-guide/

I have spent a LOT of time working with code that violated most of these things.  A LOT.
The results could be described in the words of the late Warren Zevon "Ain't That Pretty at All"!
 
Jesse Silverman
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For those who are fond of Videos, he talks about all of these things in this playlist:
https://www.youtube.com/playlist?list=PL-XjMWIS3ziofMEBJwmQkkVOsplB_wSdZ

I actually started there, and then went to reading his blog when even more sources I was consuming referred to it...
 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic