Would you like to see this page in English? Click here.

 

ou
Ouvrez une session pour activer Commander en 1-Click.
 
 
D'autres produits offerts
25 neufs & d'occasion à partir de CDN$ 28.56

Vous en avez un à vendre? Vendez les vôtres ici
 
   
Test Driven Development: By Example
 
 

Test Driven Development: By Example (Paperback)

de Kent Beck (Author)
4.3étoiles sur 5  Voir tous les commentaires (17 évaluations de client)
Prix éditeur: CDN$ 59.99
Price: CDN$ 47.99 & Livraison super-économique GRATUITE pour cet article. Détails
Vous économisez : CDN$ 12.00 (20%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
En stock.
Vendu et expédié par Amazon.ca.

19 neufs à partir de CDN$ 28.56 6 d'occasion à partir de CDN$ 28.59

Produits fréquemment achetés ensemble

Les clients achètent cet article avec Refactoring: Improving the Design of Existing Code de Martin Fowler

Test Driven Development: By Example + Refactoring: Improving the Design of Existing Code
  • Cet article : Test Driven Development: By Example de Kent Beck

    En stock.
    Vendu et expédié par Amazon.ca.
    Livraison super-économique GRATUITE pour cet article. Détails

  • Refactoring: Improving the Design of Existing Code de Martin Fowler

    En stock.
    Vendu et expédié par Amazon.ca.
    Livraison super-économique GRATUITE pour cet article. Détails


Les clients qui ont acheté cet article ont aussi acheté

Refactoring: Improving the Design of Existing Code

Refactoring: Improving the Design of Existing Code

de Martin Fowler
4.6étoiles sur 5 (95)  CDN$ 62.39
Extreme Programming Explained: Embrace Change

Extreme Programming Explained: Embrace Change

de Kent Beck
3.9étoiles sur 5 (109)  CDN$ 41.59
xUnit Test Patterns: Refactoring Test Code

xUnit Test Patterns: Refactoring Test Code

de Gerard Meszaros
5.0étoiles sur 5 (2)  CDN$ 57.59
Working Effectively with Legacy Code

Working Effectively with Legacy Code

de Michael Feathers
5.0étoiles sur 5 (1)  CDN$ 57.59
Refactoring to Patterns

Refactoring to Patterns

de Joshua Kerievsky
5.0étoiles sur 5 (1)  CDN$ 62.39
Découvrez des articles similaires

Les détails du produit


Descriptions du produit

Product Description

Quite simply, test-driven development is meant to eliminate fear in application development. While some fear is healthy (often viewed as a conscience that tells programmers to "be careful!"), the author believes that byproducts of fear include tentative, grumpy, and uncommunicative programmers who are unable to absorb constructive criticism. When programming teams buy into TDD, they immediately see positive results. They eliminate the fear involved in their jobs, and are better equipped to tackle the difficult challenges that face them. TDD eliminates tentative traits, it teaches programmers to communicate, and it encourages team members to seek out criticism However, even the author admits that grumpiness must be worked out individually! In short, the premise behind TDD is that code should be continually tested and refactored. Kent Beck teaches programmers by example, so they can painlessly and dramatically increase the quality of their work.

From the Inside Flap

Clean code that works, in Ron Jeffries' pithy phrase, is the goal of Test-Driven Development (TDD). Clean code that works is a worthwhile goal for a whole bunch of reasons.

  • It is a predictable way to develop. You know when you are finished, without having to worry about a long bug trail.
  • It gives you a chance to learn all of the lessons that the code has to teach you. If you only slap together the first thing you think of, then you never have time to think of a second, better thing.
  • It improves the lives of the users of your software.
  • It lets your teammates count on you, and you on them.
  • It feels good to write it.
  • But how do we get to clean code that works? Many forces drive us away from clean code, and even from code that works. Without taking too much counsel of our fears, here's what we do: we drive development with automated tests, a style of development called Test-Driven Development (TDD). In Test-Driven Development, we

  • Write new code only if an automated test has failed
  • Eliminate duplication
  • These are two simple rules, but they generate complex individual and group behavior with technical implications such as the following.

  • We must design organically, with running code providing feedback between decisions.
  • We must write our own tests, because we can't wait 20 times per day for someone else to write a test.
  • Our development environment must provide rapid response to small changes.
  • Our designs must consist of many highly cohesive, loosely coupled components, just to make testing easy.
  • The two rules imply an order to the tasks of programming.

  • Red--Write a little test that doesn't work, and perhaps doesn't even compile at first.
  • Green--Make the test work quickly, committing whatever sins necessary in the process.
  • Refactor--Eliminate all of the duplication created in merely getting the test to work.
  • Red/green/refactor--the TDD mantra.

    Assuming for the moment that such a programming style is possible, it further might be possible to dramatically reduce the defect density of code and make the subject of work crystal clear to all involved. If so, then writing only that code which is demanded by failing tests also has social implications.

  • If the defect density can be reduced enough, then quality assurance (QA) can shift from reactive work to proactive work.
  • If the number of nasty surprises can be reduced enough, then project managers can estimate accurately enough to involve real customers in daily development.
  • If the topics of technical conversations can be made clear enough, then software engineers can work in minute-by-minute collaboration instead of daily or weekly collaboration.
  • Again, if the defect density can be reduced enough, then we can have shippable software with new functionality every day, leading to new business relationships with customers.
  • So the concept is simple, but what's my motivation? Why would a software engineer take on the additional work of writing automated tests? Why would a software engineer work in tiny little steps when his or her mind is capable of great soaring swoops of design? Courage.

    Courage

    Test-driven development is a way of managing fear during programming. I don't mean fear in a bad way--pow widdle prwogwammew needs a pacifiew-but fear in the legitimate, this-is-a-hard-problem-and-I-can't-see-the-end-from-the-beginning sense. If pain is nature's way of saying "Stop!" then fear is nature's way of saying "Be careful." Being careful is good, but fear has a host of other effects.

  • Fear makes you tentative.
  • Fear makes you want to communicate less.
  • Fear makes you shy away from feedback.
  • Fear makes you grumpy.
  • None of these effects are helpful when programming, especially when programming something hard. So the question becomes how we face a difficult situation and,

  • Instead of being tentative, begin learning concretely as quickly as possible.
  • Instead of clamming up, communicate more clearly.
  • Instead of avoiding feedback, search out helpful, concrete feedback.
  • (You'll have to work on grumpiness on your own.)
  • Imagine programming as turning a crank to pull a bucket of water from a well. When the bucket is small, a free-spinning crank is fine. When the bucket is big and full of water, you're going to get tired before the bucket is all the way up. You need a ratchet mechanism to enable you to rest between bouts of cranking. The heavier the bucket, the closer the teeth need to be on the ratchet.

    The tests in test-driven development are the teeth of the ratchet. Once we get one test working, we know it is working, now and forever. We are one step closer to having everything working than we were when the test was broken. Now we get the next one working, and the next, and the next. By analogy, the tougher the programming problem, the less ground that each test should cover.

    Readers of my book Extreme Programming Explained will notice a difference in tone between Extreme Programming (XP) and TDD. TDD isn't an absolute the way that XP is. XP says, "Here are things you must be able to do to be prepared to evolve further." TDD is a little fuzzier. TDD is an awareness of the gap between decision and feedback during programming, and techniques to control that gap. "What if I do a paper design for a week, then test-drive the code? Is that TDD?" Sure, it's TDD. You were aware of the gap between decision and feedback, and you controlled the gap deliberately.

    That said, most people who learn TDD find that their programming practice changed for good. Test Infected is the phrase Erich Gamma coined to describe this shift. You might find yourself writing more tests earlier, and working in smaller steps than you ever dreamed would be sensible. On the other hand, some software engineers learn TDD and then revert to their earlier practices, reserving TDD for special occasions when ordinary programming isn't making progress.

    There certainly are programming tasks that can't be driven solely by tests (or at least, not yet). Security software and concurrency, for example, are two topics where TDD is insufficient to mechanically demonstrate that the goals of the software have been met. Although it's true that security relies on essentially defect-free code, it also relies on human judgment about the methods used to secure the software. Subtle concurrency problems can't be reliably duplicated by running the code.

    Once you are finished reading this book, you should be ready to

  • Start simply
  • Write automated tests
  • Refactor to add design decisions one at a time
  • This book is organized in three parts.

  • Part I, The Money Example--An example of typical model code written using TDD. The example is one I got from Ward Cunningham years ago and have used many times since: multi-currency arithmetic. This example will enable you to learn to write tests before code and grow a design organically.
  • Part II, The xUnit Example--An example of testing more complicated logic, including reflection and exceptions, by developing a framework for automated testing. This example also will introduce you to the xUnit architecture that is at the heart of many programmer-oriented testing tools. In the second example, you will learn to work in even smaller steps than in the first example, including the kind of self-referential hoo-ha beloved of computer scientists.
  • Part III, Patterns for Test-Driven Development--Included are patterns for deciding what tests to write, how to write tests using xUnit, and a greatest-hits selection of the design patterns and refactorings used in the examples.
  • I wrote the examples imagining a pair programming session. If you like looking at the map before wandering around, then you may want to go straight to the patterns in Part III and use the examples as illustrations. If you prefer just wandering around and then looking at the map to see where you've been, then try reading through the examples, referring to the patterns when you want more detail about a technique, and using the patterns as a reference. Several reviewers of this book commented they got the most out of the examples when they started up a programming environment, entered the code, and ran the tests as they read.

    A note about the examples. Both of the examples, multi-currency calculation and a testing framework, appear simple. There are (and I have seen) complicated, ugly, messy ways of solving the same problems. I could have chosen one of those complicated, ugly, messy solutions, to give the book an air of "reality." However, my goal, and I hope your goal, is to write clean code that works. Before teeing off on the examples as being too simple, spend 15 seconds imagining a programming world in which all code was this clear and direct, where there were no complicated solutions, only apparently complicated problems begging for careful thought. TDD can help you to lead yourself to exactly that careful thought.



    0321146530P10172002

    Dans ce livre (les détails)
    Parcourir les pages échantillon
    Plat recto | Extrait | Plat verso
    Cherchez à l'intérieur de ce livre:

    Mots-clés associés par les clients à ce produit

     (De quoi s'agit-il ?)
    Cliquez sur un mot-clé pour trouver les produits, discussions et clients qui y sont associés.
     
    (1)

    Vos mots-clés : Ajouter votre premier mot-clé
     

    What Do Customers Ultimately Buy After Viewing This Item?

    Test Driven Development: By Example
    77% buy the item featured on this page:
    Test Driven Development: By Example 4.3étoiles sur 5 (17)
    CDN$ 47.99
    Refactoring: Improving the Design of Existing Code
    6% buy
    Refactoring: Improving the Design of Existing Code 4.6étoiles sur 5 (95)
    CDN$ 62.39
    The Art of Unit Testing: With Examples in .Net
    6% buy
    The Art of Unit Testing: With Examples in .Net 4.3étoiles sur 5 (3)
    CDN$ 26.30
    xUnit Test Patterns: Refactoring Test Code
    6% buy
    xUnit Test Patterns: Refactoring Test Code 5.0étoiles sur 5 (2)
    CDN$ 57.59

     

    L'avis des consommateurs

    17 évaluations
    5 étoiles:
     (9)
    4 étoiles:
     (5)
    3 étoiles:
     (2)
    2 étoiles:
     (1)
    1 étoiles:    (0)
     
     
     
     
     
    Évaluation du client type
    4.3étoiles sur 5 (17 évaluations de client)
     
     
     
     
    Partagez votre opinion avec les autres clients:
    Commentaires client les plus utiles

     
    4 internautes sur 4 ont trouvé ce commentaire utile :
    5.0étoiles sur 5 A Great Experience, Sep 12 2003
    Par S. Duan "wolfdancer" (Bay Area, CA United States) - Voir tous mes commentaires
    (REAL NAME)   
    This is the most interesting book that I have read. During the first 20 pages, I dispise it. After 20 pages, I get it. After part I, I love it. At part III, I worship it!

    The book start with example that involves teeny, weeny steps of test driven development that made me think this is really for people who don't know how to write test. And I consider myself to be a fully test-infected developer -- well, until I finally understand the idea that Kent is trying to convey here. It shows not only how to create a test case for a class, but also how to use test as the driving tool to assist refactoring for a better cleaner code. Becaus the way of development process is so much different from the normally way (well, depends on what you think is normally, isn't it), Kent carefully makes sure that the user doesn't get ahead of himself or herself. With little jokes here and little comments there, it really feels like being pair-programming with an XP mentor (it does, because I have been pair-programming with an XP mentor), who paitiently explains everything that is going on in his or her mind.

    The second part of the book is also very unique. It goes through a process of using TDD to write a unit test framework. It shows, nicely, how to do TDD before the testing framework is in place, thus really tells what is the heart of TDD, and teaches a great lesson that TDD is not just writing test cases, but also a revolutionary development process.

    The third part summrized patterns used in TDD, need I say more?

    Aidez d'autres clients à trouver les commentaires les plus utiles  
    Ce commentaire vous a-t-il été utile ? Oui Non


     
    3 internautes sur 3 ont trouvé ce commentaire utile :
    3.0étoiles sur 5 A decent introduciton, Mars 12 2004
    Par Jason Menard - Voir tous mes commentaires
    (REAL NAME)   
    This Kent Beck title is an introduction to the world of Test-Driven Development (TDD). The book teaches the concepts of TDD by working through two complete sample projects. Along the way, Beck gives the reader valuable insight into the thought process and techniques behind successful test-driven development. When the reader has finished working through these sample projects, he should know enough about TDD to get started working on a TDD project.

    The book is divided into three sections. The first two sections are each walkthroughs of the aforementioned sample projects using TDD. The third section is a collection of notes and useful tips to try to get the most out of TDD. If you've ever read anything from Beck, then you should be familiar with his style. If you haven't, Beck is an engaging enough writer, and the text flows smoothly and is fairly pleasant to read.

    It would help to be familiar with some member of the xUnit family prior to reading this book. Beck uses Java and JUnit for the first section, but never really goes into discussing the JUnit API. Readers unfamiliar with xUnit may have no idea how to proceed with writing their own tests using one of these frameworks. True the API is simple enough that its functions may be ascertained simply by reading the code, but this is no reason not to provide explanation. The second sample project is an actual implementation of xUnit, so a bit more information may be gleaned here. Beck made the curious decision to use Python as the language of implementation for the second project, although he does provide explanation of the language's fundamentals. Finally, none of the sample projects are really complicated enough to do more than get us going on the path of TDD. There will still be many hurdles to climb when working on a real-world project.

    If you are seeking a basic introduction to test-driven development, then you might enjoy this title. If you are a Java developer interested in exploring TDD more in-depth, there are better books out there.

    Aidez d'autres clients à trouver les commentaires les plus utiles  
    Ce commentaire vous a-t-il été utile ? Oui Non


     
    5.0étoiles sur 5 Excellent book for starting TDD, Avril 27 2009
    Par Maxime Rouiller (Montreal,Canada) - Voir tous mes commentaires
    (REAL NAME)   
    I like the way Kent Beck is doing is narrative inside the book. Of course it's less formal... but it's more comprehensive when you start. I love the way he infer some deeper knowledge of what you need to do. Dot not think of how a system should be designed but how you would like to execute it.

    Excellent book. If you are starting TDD, it's must buy.
    Aidez d'autres clients à trouver les commentaires les plus utiles  
    Ce commentaire vous a-t-il été utile ? Oui Non

    Partagez votre opinion avec les autres clients: Créer votre propre commentaire
     
     
    Commentaires client les plus récents

    5.0étoiles sur 5 From a Software Tester's Perspective
    I enjoyed reading this book, however I must advise that non-coders will probably have difficulty in staying with it. I don't mean that as a put-down of any kind. Read more
    Publié le Avril 6 2004 par Randy Rice

    5.0étoiles sur 5 Should you buy it? Yes!
    This book does a remarkable job of covering the philosophy behind good unit tests and frequent automated builds. The author is very forward thinking in the ideas presented. Read more
    Publié le Janv. 18 2004

    4.0étoiles sur 5 Good introduction, but light on real-world development
    If you've never done or are curious about TDD, this is a great book to carefully walk you through learning how and why to do it. Read more
    Publié le Nov. 28 2003 par Lars Bergstrom

    5.0étoiles sur 5 Helpful, Simple and Brief
    I bought this book for two reasons: it teaches TDD and it's spine has the thickness of a deck of cards. Read more
    Publié le Sep 8 2003

    3.0étoiles sur 5 Stops where it gets interesting
    I like the way Kent Beck writes his books. And it's sometimes thrilling to read his strange ideas. Having seen so many projects skip unit testing completely the idea of writing... Read more
    Publié le Jui 13 2003 par Frank M.

    5.0étoiles sur 5 So simple to do-- write better code
    This book has nothing in it that you don't know you should be doing. You know you should test your code. You know that you should make sure changes don't break things. Read more
    Publié le Mai 8 2003 par Scott

    5.0étoiles sur 5 Allows you to judge TDD for yourself
    Let me say first off that I agree with much that Kent Beck has to say: 1. Testing should be done along with the coding. 2. Read more
    Publié le Avril 17 2003 par Martin P. Cohen

    4.0étoiles sur 5 Fun to read and interactive
    Test-Driven Development is one of the few technical books that I have gotten a great deal of pleasure out of reading. Read more
    Publié le Fév 14 2003 par Nicholas Roeder

    5.0étoiles sur 5 Fail, Run, Run Clean
    The are a small number of writers who can teach programming skills effectively. Kent Beck is one of them. Read more
    Publié le Fév 4 2003 par Thomas Koenig

    5.0étoiles sur 5 helpful for cross-platform coding too
    It's about time that someone wrote this book. Some programmers have been doing test-driven-development since the earliest days of our profession, and the rest of us have been... Read more
    Publié le Janv. 6 2003 par C. K. Ray

    Rechercher uniquement sur les commentaires portant sur ce produit



    Listmania!


    Cherchez des articles semblables par catégorie


    Chercher des articles semblables par sujet


    Commentaires

    Souhaitez-vous compléter ou améliorer les informations sur ce produit ? Ou faire modifier les images?

    Votre historique récent

     (En savoir plus)

    Après avoir visualisé des pages détaillées produit ou des résultats de recherche, regardez ici pour trouver une façon simple de poursuivre votre navigation sur des pages qui vous intéressent.