In 1993, Derek Jeter committed 56 errors playing short for the Single-A Greensboro Hornets. With each error, though, he had an opportunity to learn. Over time, he improved his footwork, he settled down, settled in, and he got a better feel for it all as he worked with Brian Butterfield.
When it comes to coding, you’re going to make errors. A lot of errors. Unfortunately, the computer is not a home scorer who’s going to let one slide once in a while. If you type a “;” instead of “:” that’s an error. If you spelled “player" correctly on one line and then spelled it “playerr” on another line it’s not going to understand and cover for you. It’s going to throw an error the way Jeter used to overthrow his first baseman.
With practice, you’ll get a better feel for what throws an error. Just know that a high percentage of the errors that pop up early on will be nothing more than miscues (throwing before you have the ball, picking up your glove from the infield dirt too soon, etc). They’ll be spelling mistakes, forgetting to type something altogether, making something lower-case that should be upper-case (or vice versa), making something plural when it should be singular (or vice versa), putting things in the wrong order or in the wrong file altogether.
It happens to all of us.
Blaming the computer is about as useful a blaming your glove after booting a routine grounder.
The good news is errors appear in bright red print in Xcode and they give you a general idea of what went wrong and where in the code the problem might have occurred. Here's an error I made the other day.
Are these pointers helpful? You bet. Do they point exactly to the error and tell you clearly how to fix it? Nope.
Remember those vague words of instruction from the dugout, or worse, the stands? “Throw strikes!” “Keep your eye on the ball!” “Be a hitter!”
Well, no shit. Error notes aren’t going to cheerlead for you, but they may give you similarly vague pointers to fix the error. It then becomes trial and error as you tweak different parts of code to make whatever you’ve written run.
If you still come up empty, there are other ways to correct or cut down on your mistakes. We’ll get to those in the next post.
If you’re a baseball fan you know that hall of fame hitters get out 70% of the time.
Over the course of 162 games a year, year after year, that’s a lot of failure. Bring that patience with and tolerance for failure with you to coding. It will keep you sane.
*Thank you, baseball-reference-com, for the data and the pic.
![]() |
All these dudes failed over 64% of the time. Then they dug in again. |
Over the course of 162 games a year, year after year, that’s a lot of failure. Bring that patience with and tolerance for failure with you to coding. It will keep you sane.
*Thank you, baseball-reference-com, for the data and the pic.
No comments:
Post a Comment