DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Growing Object-Oriented Software, Guided by Tests

Growing Object-Oriented Software, Guided by Tests

Misko Hevery user avatar by
Misko Hevery
·
Jan. 07, 10 · Java Zone · Interview
Like (0)
Save
Tweet
5.15K Views

Join the DZone community and get the full member experience.

Join For Free

recently i have came across an excellent book on how to develop code with testing in mind, and i wanted to share it with you. the book is called growing object-oriented software, guided by tests and is written by steve freeman and nat pryce.

the book starts right at the beggining as to why we want to develop test first and covers advanced topics such as testing persistance, threads, and asynchronous code. i particulary like the style with which the book delivers the message. they start by building a simple application and add new requirements to it, morphing the codebase in the process. as they do so they introduce new classes and walk the reader through the thought process considering alternatives finally choosing a solution. this gives the reader a good understanding as to what to think about when looking at code. of course all of these changes are driven by tests, and a lot of discussion is spent on explaining why a test was written in a particular way and how to refactor it as it grows with the applications, so that tests do not become a liability.

reading the book i sometimes felt that i was listening to myself, especially when the authors warned about global state, singletons, overusing mocks, and doing work in constructors among other things. but unlike myself, who draws sharp lines between right and wrong, the authors did a good job of presenting things on the gray scale of benefits and drawbacks. the book shows what a typical code most people will write, and then show how tests point a way towards refactoring.

if you are newbie, or an intermediate to developing with tests than this book is a must for your library!

from http://misko.hevery.com

Testing Software

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Comparing Distributed Databases
  • Instancio: Test Data Generator for Java (Part 2)
  • An Overview of Key Components of a Data Pipeline
  • Ultra-Fast Microservices: When Microstream Meets Payara

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo