Tired of making mistakes while learning to code? You're not alone.

I run a monthly newsletter about Swift, and each month I try to finish with a few thoughts based on work I'm doing, people I've met, or advice based on past experiences. In the July 2024 edition I wrote about mistakes, and I had so many folks reach out to me to thank me for tackling a difficult topic so honestly that I decided to publish it here too.

A few weeks ago I received an email, which I'm sharing below with permission.

"I keep making mistakes, and have to go back and fix them again and again and again, and frequently make more mistakes while trying to fix the first mistakes. You never seem to screw up in any of your streams. How many more years until I get to that point?"

I've mildly edited it to be a bit less sweary, but I think you get the point! It took me until yesterday to reply (sorry, I recently moved house!), but I'm going to share my reply with you all below in case it helps you too.

First, congratulations on making mistakes! I know that sounds odd, but often we get so focused on not making mistakes that we forget mistakes are part of everyone's journey – trying things out, getting them wrong, and learning lessons from that experience is a fantastic way to learn, and it's even true that sometimes the only way to figure out what's right is to see what's wrong first.

One of my favorite Steve Jobs videos is him responding to a rather aggressive crowd question about some of his choices on returning to Apple. Towards the end, he says "some mistakes will be made along the way, and that's good, because at least some decisions will be made along the way." So, as hard as it might be, be happy that you're making mistakes, because it shows you're pushing yourself outside your comfort zone and learning something new.

Second, you have no idea how many mistakes I've made over the years. Lots of small ones, sure, but dozens – hundreds? – of really serious errors, some of which I'm going to regret to the end of my days.

And – believe it or not – those are okay too. Sure I wish I hadn't made those mistakes, and I certainly feel like no one would pay a moment of notice to me if they knew just how many mistakes I had made in the past. But those mistakes all taught me something along the way, and I'd like to think I'm more careful, more thoughtful, and more kind to others (and myself!) as a result.

Finally, I want to mention that all those Hacking with Swift+ live streams take a lot of preparation. Not only do I build the full project ahead of time, I rebuild it multiple times before the actual stream, to make sure I've really gotten the code as smooth as I can, and to make sure there's a logical flow through the tutorial.

It's a bit like acting: by the time I'm doing it for real, I've already rehearsed half a dozen times, so if you see me making no mistakes that's only because you aren't seeing the many and varied ways I messed up along the way!

Anyway, I'll leave you with this: keep making mistakes, remember that it's better to regret the things you have done rather than the things you haven't, and don't try to compare yourself to me – trust me, if there were a Screw Up Olympics I'd get a gold medal!