Background Image
Table of Contents Table of Contents
Previous Page  77 / 478 Next Page
Information
Show Menu
Previous Page 77 / 478 Next Page
Page Background

This way of looking at things is sometimes called “Double-Loop TDD”. One of my

eminent tech reviewers, Emily Bache, wrote

a blog post

on the topic, which I recommend

for a different perspective.

We’ll explore all of the different parts of this workflow in more detail over the coming

chapters.

How to “Check” Your Code, or Skip Ahead (If You Must)

All of the code examples I’ve used in the book are available in

my repo

on GitHub. So,

if you ever want to compare your code against mine, you can take a look at it there.

Each chapter has its own branch following the convention

chapter_XX

:

• Chapter 3:

https://github.com/hjwp/book-example/tree/chapter_03

• Chapter 4:

https://github.com/hjwp/book-example/tree/chapter_04

• Chapter 5:

https://github.com/hjwp/book-example/tree/chapter_05

• Etc.

Be aware that each branch contains all of the commits for that chapter, so its state rep‐

resents the code at the

end

of the chapter.

Using Git to check your progress

If you feel like developing your Git-Fu a little further, you can add my repo as a

remote

:

git remote add harry

https://github.com/hjwp/book-example.git

git fetch harry

And then, to check your difference from the

end

of

Chapter 4

:

git diff harry/chapter_04

Git can handle multiple remotes, so you can still do this even if you’re already pushing

your code up to GitHub or Bitbucket.

Be aware that the precise order of, say,methods in a classmay differ between your version

and mine. It may make diffs hard to read.

Recap: The TDD Process

|

49