O'Reilly logo

Xcode® 4 Unleashed, Second Edition by Frederic F. Anderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Active Debugging

In This Chapter

• Taking charge of debugging

• Setting breakpoints

• Stepping through a program

• Exploring behaviors and tabs

In passer-rating, you have a program that runs without crashing. This is an achievement, but a small one. Let’s explore it a little more and see if we can’t turn it into a program that works. This entails a small test and maybe some probing of the inner workings.

A Simple Test Case

Run passer-rating again. Give it the old data set if you like, for a short, mediocre game; but also try a rating for a quarterback who didn’t play at all:

passer-rating on 2011-12-03 18:45:13 -0500comps, atts, yards, TDs, INTs: 10 20 85 1 0Rating = 78.1comps, atts, yards, TDs, INTs: 0 0 0 0 0Rating = nan

Hmm. Not ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required