So you’ve tried to increase iOS unit testing in your organization.

Maybe you tried to lead by example, hoping others on your team would follow suit. Or maybe you tried to increase your own testing.

Either way, your efforts fell flat. Your new emphasis on testing was barely noticed, and eventually forgotten. Leading by example is key to introducing a test-driven culture to your organization. But it’s no good if no one sees your example.

If only there were a way to bring your tests in from the shadows, placing them front & center.

There is. It’s no silver bullet, but it’ll help. And it’s easier than you may think. Continue Reading…

I have a confession to make. My code is clean. My email inboxes are nearly at zero. But my physical inbox, on my nightstand?

Oy vey. I don’t want to show you. Instead, here’s an image illustrating what my physical inbox feels like, when I stop to notice it:

It’s not like I mean to have a pile of clutter. But you know, it’s death by a thousand cuts. One item at a time, that corner of my life is becoming more cluttered.

As a protection mechanism, I’ve even stopped noticing the pile. But many of those items were put there by my wife, to make it clear that that item is my responsibility.

How about your source code? Continue Reading…

When you’re hiking and don’t know which way to go, what should you do? Stop. Get your bearings.

The same applies to Test Driven Development; sometimes you need to stop doing TDD, and get some answers.

Stop. Get your bearings. Spike Solution Techniques by Jon Reid

Those answers can come by switching from clean code to a style of quick-and-dirty hacking called a “spike solution.” I explained the basic idea in Drive a Spike Solution Through Your Question.

But what does it look like in practice? Continue Reading…

So you want to try Test Driven Development — great! But that requires expressing the intent of the code-to-be in automated tests. Where should you start if you don’t even know what the code should do? What should you do if you’re not confident about a particular approach?

You drive a spike through it!

To start my “Marvel Browser” TDD sample app, I want to begin by making a network call to the Marvel API. If I knew what I was doing, I would start the 3-step “TDD waltz” of writing a single failing test, then writing the simplest code that passes, then refactoring.

But there are two roadblocks keeping me from writing my first test: Continue Reading…

Wow. I could never have imagined how 2014 would play out for Quality Coding. Check out this collage:

2014

Can you find yourself? Lower-right photo shared by @VictorPimentel

There are many people I want to thank, and I’m excited about what lies ahead for this blog.
Continue Reading…

What if there were a way to get feedback on your code every time you compiled?

This Is Spinal Tap: “These go to eleven.”

As developers, we depend on feedback to tell us how good our code is. That’s why I’m passionate about unit tests and TDD: they give me feedback quickly, and the feedback is so good that I’ve come to depend on it. Unit tests are faster than manual testing, and faster than acceptance testing. But there are forms of feedback that are faster still…

I’ve seen crashers ship which could have been prevented altogether, simply by enabling more compiler warnings. The sooner you detect a problem, the cheaper it is to find and fix. So let’s all dial up our Xcode warnings to catch more problems at compile time. …But how high should the warning settings be? Continue Reading…

It’s one thing to say, “Do test driven development.” But practicing TDD requires a set of tricks — you need techniques to enable test driven development in your particular environment. It’s these techniques which I hope to pass on to you through a case study of building an iOS TDD sample app.

The TDD sample app will yield treasures of how-to examples

Treasure Chest” by Tom Garnett, used under CC BY 2.0

I’ve accumulated a treasure chest of TDD ideas over the years. These ideas are often not my own, but are other people’s ideas which I collect and curate. Some are about object-oriented design. Some are about working in Xcode and Objective-C. And some are particular to iOS development. I’ve collected many, and continue to gather new ones.

I’m building this TDD sample app so that you and I can browse through this treasure chest together. You may have tried test driven development and given up on it. Or maybe you’re still trying, but finding it frustratingly slow. The ideas we will explore together will help you break through to make headway in your TDD journey, so that you can experience the freedom and ease that comes from automated testing and clean code. Continue Reading…

6 Simple Git Power Tools

November 10, 2014 — 7 Comments

What’s a technical skill that will increase your effectiveness, but isn’t programming? How about: being efficient your source control system’s command-line interface? Even though I’ve used Git for a while, there are some things I’ve picked only recently that have made me more efficient.

table saw

saw” by Shannon Kokosa, used under CC BY-NC-ND 2.0

Did you ever have a time when you were using a hammer, slowly driving in one nail at a time? Then along comes someone with a nail gun and BAM BAM BAM, they’re done! …That’s what comes with using a more powerful tool. We use source control systems every day, yet many of us slowly click on things in a graphical UI, or slowly type out commands in their entirety.

The more you equip yourself with good tools and learn to use them well, the better you’ll be able to stay “in the flow” of development. For example, time spent learning keyboard shortcuts for Xcode quickly pays off. In the same way, the better you can use Git (or whatever you use for source control), the more it gets out of your way, letting you concentrate on the actual coding.

So I want to show you 5 6 simple things you can use to improve your Git workflow — a set of Git power tools. These tools generally involve one-time setup (except for one that is a fun, game-like tutorial). Put these tools to use, and you’ll find you can get more done, more quickly. Continue Reading…

The results of my reader survey are in. The #1 request? Case studies of unit testing, with more complex examples. And that got me thinking about the next major direction to take this blog.

When I was first learning Test Driven Development, I didn’t really have any examples to look at. All I had were descriptions of TDD. I stubbornly believed that these descriptions showed a more effective way of programming, so I fought my way there through the School of Hard Knocks.

But you shouldn’t have to do the same. Continue Reading…

I want to make my blog better and more relevant to your needs and interests. To do that, I need to know more about YOU. As a result, I have created my first-ever Reader Survey.

2014-survey

Would you please take a few minutes to fill out the survey? By doing so, you will ultimately be helping yourself. Why? Because you will be helping me make my content even more helpful and relevant to you.

Your input is important to me. The survey is easy to fill out. It’s completely anonymous. And it will only take five minutes of your time.

Thanks in advance for your help.