Altconf ray cover?fm=jpg&fl=progressive&q=75&w=300

Overloading Comparison

As developers, we constantly compare ourselves to others — more knowledgeable developers, more popular apps, more lucrative businesses — and this can cause us to be unhappy and unproductive. Join Ray Wenderlich as he shares the story of his battle with comparison, and how you can overload comparison with a more positive alternative!

Best Body on the Beach — A Story (0:00)

If you’re here for a technical talk on overloading the comparison operator, you’re in the wrong place. There’s a tutorial for that. This is something completely different, and it all begins with a story.

When I was young, my family and I always liked to go to Ocean City for the summer. Every year, they had this contest called the “Best Body on the Beach”. Basically, they would get men and women up on the stage, and everybody would cheer for whoever they thought had the best looking body. It turns out, in addition to having a contest for adults, they also had a contest for little kids. When my mom and dad found out about this, they knew they had to enter my little sister into this contest — she was born for this. She was the type of girl that always loved playing dress up, being the center of attention, and posing for pictures. So when my mom and dad told her that they were going to enter her into this contest, she leaped up with excitement and started dancing around the room, practicing her catwalk.

Meanwhile, myself, being more of a nerdy little kid, was scrunched up in the corner reading a comic book at the time. I looked over there and I see my little sister getting all this attention and dancing around the room for my mom and dad, and I started to get a little bit jealous. So I raised my hand and I squeaked, “Hey Mom and Dad, what about me? Can I enter this contest, too?” I still remember my parents’ laughter to this day. You see, I don’t have a beach body today, and I certainly didn’t have one back then. Plus, I was super shy, pale, and the kind of kid that just liked to stay indoors all day playing video games. My mom and dad looked at me, and they said, “Ray, honey, I don’t really know if it’s the best contest for you. Maybe we could find you a nice video game contest sometime.” But I would not be deterred. If my sister was going to be in this contest, then by George, I wanted to be in this contest too.

A few days later, we’re up on stage at the “Best Body in the Beach” competition. They bring all the little girls up on stage first. My mom and dad were at the edge of their beach chairs, because they can’t wait for my sister to grab that spotlight that she so richly deserves. Except my sister gets up there and she freezes. She looks at the little girl on her right, and she thinks, “Wow, that girl can flip her hair so well, but I can’t do that because my hair is short.” She looks at the little girl on her left, and she thinks, “Wow, that girl has such amazing dance moves, but they’re so much better than mine.” Then she starts losing some self-esteem and gets to the point where all she can do is look at the little girl on her right and look at the little girl on her left, and mimic what they’re doing. My mom and dad looked at each other and they sighed, and they said, “Well, I guess there goes our dreams of being Best Body on the Beach parents.”

But my parents forgot about me. They bring the little boys up next. And I go strutting along with them, thin as a toothpick, my pale skin blinding the eyes of all onlookers, and I start flexing. I give them the Superman. I give them the Hulk Smash. I even give them the Iron Man. I looked completely ridiculous, and everybody was laughing like crazy. But apparently it was memorable enough that I ended up winning the competition. As I stood up on stage to thunderous rounds of laughter and applause, (and maybe a little bit more laughter than applause), I started to wonder, how in the heck did I win this thing and not my sister? I realized it was because by comparing herself to other people, she became afraid to let out her amazing inner qualities. Whereas, I just gave it my best flex like nobody was watching.

Comparing Myself to Others (4:41)

As I stood up there on stage, I made a firm resolution. I vowed I would always stay this way. I would always set my own course, sail my own ship, and I would never compare myself to anybody else for the rest of my life. You might be able to guess how long that lasted. Sadly, the older I got, the more I found myself comparing myself to other people. When I was in school, I was always comparing myself to my fellow students to see who could get the best grades or get into the best college. After I graduated, I was comparing myself to my fellow coworkers to see who got the best promotions or responsibilities at work, or who was the funniest around the workplace.

Get more development news like this

Transitioning to Indie iPhone Development — A Comparison Nightmare (5:35)

However, it wasn’t until I quit my job in 2009 to become an indie iPhone developer that I started comparing myself to other people far more than I ever had before in my entire life. To understand why, take a look at this line of code.

let compareAmt = numPeers * numSkills * awarenessFactor

This is about one of the only lines of code you’re going to have in this talk. But you can see that the more peers that you have, and the more skills that you want to have, and the more awareness you have of what your peers are doing with those skills, the more you might compare yourself to other people.

When I became an indie iPhone developer, all three of these things increased at the same time. First, I had way more peers. At my old job, I was a medium-sized fish in a calm, tranquil little lake. There were about ten of us programmers in my office, and although there were others in the company, we didn’t care what they were doing — we were doing our own little thing. Those were my peers.

When I became an indie iPhone developer, suddenly, I was a small, teeny tiny little fish in this gigantic tumultuous city. And I worked on my own, right? So I didn’t have office mates or anything like that, so I considered my peers to be all the other indie iPhone developers out there in the world, and not to mention, anybody doing iPhone in general, even including people at small companies or even large companies. We go from 10 to 10,000.

Next, there are way more skills that I wanted to have. At my old job, all I needed to know was programming, and maybe a little bit of team lead stuff. As an indie iPhone developer, suddenly I needed to know everything. I need to know programming, I need to know design, I need to know marketing, I need to know business. Not many of us are great at all those skills simultaneously, including me. In fact, some of these things I’m downright terrible at, such as marketing. The thing was, though, I was trying to be good at all of these things. And when I inevitably wasn’t, I would feel bad about myself, especially when I compared myself to other people I saw out there who were amazing at those things.

The third and final thing that changed was that I had way more awareness of what my peers were doing with their skills. At my old job, I didn’t read blogs or go on social media; I was just in my own little bubble of me and everybody else in my office at work, doing our own things which was all that mattered to us. Yet when I became an indie iPhone developer, suddenly, social media became my lifeline to the world. I live in a small town in Virginia, and there aren’t a lot of iPhone developers around me. Social media became my way to meet other developers, to find out what’s going on in the iOS world, and to learn new things. That’s all great, but there’s also a bad side too: what I call the Twitter success parade. You go on and see all these people doing all these amazing things, and that can be sometimes demotivating when you’re just getting started trying to have your own first app working.

let compareAmt = tonsOfPeers * tonsOfSkills * tonsOfAwareness

Put these three things together: way more peers, way more skills that I wanted to have, way more awareness of what other people were doing with those skills, and you get a very large number. Logically, the more you are comparing yourself to other people, the greater amount of people you’re going to find who seem to be better than you in some way.

Myth of Comparison: Everyone’s a Rockstar Except You (8:56)

You all know what it’s like: you can’t load up Twitter without finding all these articles about startups that have been bought out for millions of dollars. There are people who released new apps that look absolutely amazing, or all these really cool designs that some talented designers have made on Dribbble. You hear about people like Matt Thompson, who must only sleep four hours a day because he’s created Alamofire, AFNetworking, NSHipster — a number of hugely popular open source libraries. You hear about people like Jeremy Olson, Juraj Hlavac, Loren Brichter, who have won Apple Design Awards for their amazing apps. You hear about people like Marco Arment, who have created and sold several successful businesses while running a hugely popular blog and podcast. Sometimes you look at all of these people doing all these amazing things, and wonder how come you never accomplished this much? “What’s wrong with me here?” This is where the trouble comes in.

My First App: Successful Yet Unsatisfying (10:01)

I remember when I started and I created my first game called Math Ninja, an educational game for kids. As I was working on this game, I was constantly comparing myself to all the other game developers out there. I couldn’t help but run across people on forums I was reading, or on Twitter, that seemed to be better programmers than me, better at business than me, better at marketing than me. Sometimes when I would compare myself to them, I would feel like a failure. But I kept working on the app. I got it out, and the app actually ended up doing fairly well for me. I was lucky enough to be toward the beginning of the App Store, and it got on the Top 25 educational games and consistently stayed there. I was earning enough money to make a living as an indie iPhone developer.

That should have been an accomplishment for me, something I should have been proud of. But I never felt that way. Because if I was in the Top 25 educational games, then I would be looking at whoever was number 10, or whoever was number 1. I would be comparing myself to them, and I would be feeling bad about this. Or, I would read about somebody else who had created a game that I thought was cooler technically or looked better, and I would feel bad about that. Comparison was robbing me of my achievement; comparison was making me feel miserable.

How I Initially Handled Misery by Comparison (11:18)

The only thing that kept me sane during this time was my wife, Vicki. Vicki and I have this tradition where every afternoon we go on a walk around our neighborhood and we just talk about various things. At this time of my life, it was usually me whining and complaining about everything under the sun. I would say, there are all these developers out there who know so much more than me, or they have more reviews on their apps than I do, or I’d be worrying if we were going to be able to continue making enough money to keep doing what we were doing as indie iPhone developers. Vicki would always cheer me up with what I call pep talks to keep me going. At least, until the next day, where I would compare myself to somebody else.

The other thing that kept me sane during this time was that I told myself, “Don’t worry, Ray, you’re just feeling bad because you’re just getting started out. As you get more experienced, as you get more successful, you are going to feel a lot better.” Let me tell you a dirty little secret. This feeling of comparison never goes away. It’s now five years after I started as an indie iPhone developer.

These days I spend most of my time on my website, It’s a pretty big website at this point, and we have over a hundred amazing authors and editors from around the world, many of whom who are here today. At this point, I know a lot more about iPhone development than I did back then. I’m better known in the iOS community, and our business is making more money. But there’re still many times where I compare myself to other people unfavorably. I look at other people and I think, “Wow, this person would be able to make such a better business decision than I would be able to. Or, this other person is smarter than me. Or, this other person works harder than me. Or, this person seems to have all the answers.”

And you know what? That’s true. There are lots of people who would be able to make better decisions than me, who are smarter than me, who work harder than me, and who do seem to have all the answers. And to this day, when I compare myself to them, I still feel like a failure. But wait a minute. Wasn’t this supposed to go away as I got more skills and I got more success? At what point do we stop feeling bad and start feeling awesome? I started to think about this, and I started to wonder if it wasn’t that I needed to get more skills or more success, but maybe it was a problem with my way of thinking that needed to change.

The Advice of the Smart Wife (14:23)

So, I talked to Vicki about this on one of our neighborhood walks. She thought about it, and told me something that really made a difference. She said, “Ray, listen, you’ve got to stop comparing yourself to other people out there. Especially to those number one apps that you’re always talking about.””

“You have to take stock every day of what is going on right in our lives.”

  • A smart wife

“We have a dream that’s coming true, little by little. We have each other. What more can you ask for?” I realized she was right. Why am I wasting all of my time and energy comparing myself to other people when there is so much that I have to be thankful for? I’m sure all of us can relate to that and feel the same way about your lives, of how much we have personally to be thankful for that the people we’re comparing ourselves to might not have in their lives.

The Mario Kart Analogy (15:21)

One thing that hasn’t changed, from when I was a little kid entering the “Best Body in the Beach” competition, to an indie iPhone developer, until now, is that I like to spend a lot of time indoors playing video games. Mario Kart 64 is one game that’s been particularly memorable for me. It is an incredibly fun game where you choose a character, and based on what character you choose, your kart has different strengths and weaknesses. Bowser, for instance, has the best top speed, and he is massively heavy, so if you bump into another kart, it will go flying off the track. However, he has very slow acceleration. Then there’s Toad, which doesn’t have as high of a top speed and is very light, but he can get up to speed very quickly.

And then, interestingly, there’s Mario’s kart. Mario’s kart isn’t the best at anything, he’s kind of average all around. Yet the combination of skills that Mario’s kart has makes him just as competitive as any of the other karts. Nevertheless, if you spend your time racing Mario Kart as Mario, wishing or thinking that you were Bowser, you’ll try to run into Donkey Kong and go flying off the track. If you spend your whole time wishing that you were another type of kart, you’ll probably lose the race.

Play to Your Strength (16:28)

Real life is just like this. All of us have our own unique array of strengths and weaknesses. There are some people, like myself, who majored in Computer Science, and find it easy to learn new programming languages, but we’re absolutely terrible at marketing. Then there are some people who can create amazing designs in Photoshop, make really neat animations, but don’t know a lot about programming. Then there are some people who know a little bit about programming, a little bit about marketing, and a little bit about business. All of these people can be absolutely successful, as long as they play to their strengths, and don’t waste time wishing they were somebody else.

For example, I could sit around and wish that I could survive on four hours of sleep at night, and that I never wasted any time playing video games. But, that’s just not me. I have to accept who I am and understand that although I have some weaknesses, I have some strengths too: I’m a pretty good developer, I’m a pretty good writer, and when I combine, I can make tutorials.

Keep Your Eyes on Your Road (17:30)

There are two differences between Mario Kart and real life. The first is that if you throw banana peels at cars in real life, you might get arrested. Just ask Remi Gaillard, who made a hilarious video trying it. The second difference is that in Mario Kart, we are all driving on the same track. We’re headed toward the same destination. But in real life, we’re all on completely different tracks that are personal to us. Some of us are driving in Bowser’s castle. Some of us are on the Rainbow Road. But most of us are just making it up as we go along.

For example, how do you think that I created Do you think I sat down one day writing my first tutorial with this plan of creating this massive tutorial empire? That’s not quite what happened. You see, I got into this because I like making apps, I liked making games, I was learning some things along the way, and so I thought I’d put up some tutorials. People seemed to like them, so I kept working on them. I was lucky enough to come across an amazing group of guys and gals who are teamed up, and made tutorials together. One of them suggested that we write a book, so we did that; somebody else suggested we make video tutorials, so we did that. And then somebody suggested that we make a conference, and although that took way more time than I ever imagined, we did that too, last spring with RWDevCon.

Others’ Accidental Success and Invisible Luck (19:07)

Absolutely none of this was planned. Some people who don’t know me any better think that I planned this all along to make this business and that I’m really smart for having done that, but it really wasn’t like that. It was a complete accident. I listened to a podcast recently on this topic of accidental success by David Smith, called Developing Perspective. If any of you are not subscribed to this podcast, I highly recommend it. David always has such amazing insights. But he was talking about this topic of accidental success as it related to one of his apps.

He had an app that had a tip jar in the app. Everyone would come up to him and say how smart it was that he put this tip jar into the app, because it was doing really well for him. But they didn’t know that it was a complete accident. He meant to enable iAds in his app, and that was the way it was going to earn money. But when he submitted it to iTunes, he forgot to check the check box. So it went out with no way to make money at all. And he was thought to himself, “Oh no, I just spent a lot of time working on this app and I’ve got to have some way to make money.”

He needed to release an update with some form of monetization. He didn’t want to put iAds in because he had a lot of customers who had it without ads, and they might be upset to have no ads one day and all of a sudden ads appearing. So then he came up with the idea of the tip jar. And my point is, if he had thought about checking that check box in the first place, then he never would have come up with the tip jar idea — it was an accidental success.

A lot of successes in life are just like this. It’s not fair for us to compare ourselves to other people because we only see the end destination. We don’t know about the accidents, the random luck that happened along the way, along with people’s unique advantages that people have had in their lives, or the years of hard work they might have put into something. Remember, we are all our own unique Mario Kart, with our own unique array of strengths and weaknesses, driving our own unique track. That track is a hell of a lot more winding, unconventional, and accidental then it looks like from the outside.

The Terrible Default Comparison Operator (21:15)

So… what now? We know that it doesn’t make sense for us to compare ourselves to other people, because we have so much we can be thankful for in our own lives. And, we know it’s not fair to compare ourselves to other people, because we don’t see the whole story; we only see the end destination, and we don’t know the road. What we need to do is overload the comparison operator, because the current implementation sucks. Here’s what it looks like for me:

fun < (my: SkillOrSuccess, their: SkillOrSuccess) -> Bool {
	// compare my to their
	// feel bad, curl up in bed
	return true

You have the operator, say less than (>). You have the left-hand side saying my skill’s a success, and you have the right-hand side saying someone else’s skill or success. You’re going to do the comparison. For me, the result is usually true, and then it even has this terrible side effect where it makes me feel bad and makes me just want to curl up in bed and give up, paralyzed, like my sister in the “Best Body in the Beach” contest.

Toastmasters International: Learning From Others Instead of Comparing (21:15)

We can certainly do better than that. What if we could overload the comparison operator to have a more positive result? To see what I mean, consider a story that happened to me fairly recently. About a year ago, I joined this club called Toastmasters International. A group of people get together and they practice their public speaking skills. I joined this club because we started making video tutorials on my website, and I suspected that I could get better at that kind of thing.

After attending the first couple meetings, I no longer suspected — I knew I could be a lot better, because I was terrible compared to everybody else in the club. Every single week Vicki and I would go to these meetings. And every single week, I would get in the car afterwards and I would be mad. I would say, Vicki, how come everybody else in this club is so good and I’m so terrible? I’ll never be as good as any of them. And Vicki would say, “Ray, chill out. It’s a good thing there are people in this club who are better than us. How else will we have people to learn from? Remember, we aren’t here to impress anyone…”

“We’re here to learn.”

That really stuck with me. Like a wise husband, I decided to listen to Vicki and put her advice to practice. Rather than comparing myself to everyone else in the club, I tried to focus on what I could learn from each speaker. I realized I didn’t need to be the best speaker in the club, I just needed to be the best speaker I could be at this point in time. It’s now a year later, and I’ve improved a lot as a speaker, I still have a long way to go, but I’m on my way. And sometimes I still get mad when I get into a car after a meeting. But now, more often I complain that, “This awesome speaker just left the club because he got a job in another state, and I have one less amazing speaker to learn from.” As a friend of mine said on Slack the other day:

“It’s better to be the dumbest person in the room than the smartest person in the room.”

  • A smart friend

“That way you have the most people to learn from, and the most opportunity to improve your own self.”

Our New and Improved Comparison Operator (24:32)

Here’s the new implementation of the comparison operator:

fun < (my: SkillOrSuccess, their: SkillOrSuccess) -> Bool {
	// don't compare; learn
	// feel awesome, give massive flex!
	return false

This time, rather than comparing, we focus on learning from that other side. Also, this one has a much better side effect. This lets us feel awesome and give life our best flex. We should be happy that there’s a Twitter success parade, because it shows us what is possible to achieve; it inspires us to create great things, and gives us lots of examples to learn from. That’s why we’re here — we’re here to learn. That’s why all of you are here listening or reading this talk: you’re hoping that something I say could help you in your own personal journey.

Now, you shouldn’t compare yourself to me. I mean, I was the Best Body on the Beach, and I know how impressive that is. Remember, we are all here in our own unique Mario Kart, driving our own unique road. Remember to overload your comparison operator, and to give life your best flex like nobody’s watching.

About the content

This talk was delivered live in June 2015 at AltConf. The video was recorded, produced, and transcribed by Realm, and is published here with the permission of the conference organizers.

Ray Wenderlich

Ray Wenderlich

4 design patterns for a RESTless mobile integration »