Skip to content
Swizec Teller - a geek with a hatswizec.com

Can you code faster?

Friend, what slows you down most while coding?

It's not lack of skill. I know you're awesome.

It's not lack of ideas. You got plenty.

It's uncertainty. Fear. "What do I do next? Will reviewers rip this to shreds? Is it good enough? Does it perform okay? Is this the right name to use?"

You see this with engineers and other creative pursuits. The fear of imperfection, the drive to get it right the first time.

But that's not how it works my friend. You can't get it right the first time.

The blank file of doom

The blank canvas is your biggest foe.

faYkJRpng5800dj

Click that 👆, it's one of my favorite comics.

Why are you keeping that canvas blank? Start. Type something

When a new file scares you, here's what you do: lfaekwjflawkjalc

The Senior Mindset series

Get a series of curated essays on the mindset of a senior software engineer. What it takes to get there, what should you do when you're there, how to change the way you think.

it describes my days in a way I have not read before.

This was a very enlightening article about being a senior engineer.

Join over 10,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. ✌️

Yes really. Slam the keyboard and build momentum. Once you're typing the code starts flowing.

Better yet 👉 don't open a new file. Write new code next to the old code. Move it to a new file later.

Naming is hard

There are only two hard things in Computer Science: cache invalidation, naming things, and off-by-one errors.

Except naming's not hard. You just don't know what you're building yet.

A trick I learned back in my fiction writing days is The Placeholder. You don't have to decide everything right now. Write.

When you write a novel in a month your target is 1666 words per day. I did it once. You have no time to stop. Heckin' fun.

Same is true for coding. Build the damn thing and you'll find out what it does.

Last week I built a new component, called it Bloop.

Then I got dirty. Tried a bunch of things, explored what I'm doing. Used code to think. When the component worked, its true name was obvious.

Don't fear the mess

embrace the mess! Mess is how you learn.

A fear that stops you in your tracks is that you'll get it wrong. "Hmmm not sure how this works, I better go research online."

TRY IT! Just go for it! It's code, it don't bite. I promise.

Like that time I learned a whole new TypeScript concept that blew my mind. "I wonder if this works ..."

And it did work!

Kids have us beat in this regard. They try shit and see what happens. It's the fastest way to learn. Get in there and muck about! See how it goes.

What's the worst that can happen? Oh are you gonna get a error? Cool! Fix it :)

Make bets and let small fires burn

The other thing that slows you down is fear of mistakes. Not like "oops that's a weird name for a function" but mistakes like "oops I deleted the production database"

Don't delete the production database.

Do consider the consequences of your decisions. How big are they really? How likely are they?

If your code runs 100 times per day and you wrote a 1-in-10,000 bug ... do you think it's worth worrying about? The bug that happens once every 10 days?

You do have to weigh probabilities against consequences. Don't drop your production database every 10 days 😂

Thinking in Bets is a great book about this mindset. You can decide faster if you think like a bet: "What's the consequence? How likely is it? Okay do the thing"

Make the decision and move on.

And don't forget, something is always on fire. Focus on the biggest fire, let small fires burn. Not every bug or detail is worth your time.

The vomit draft

Another trick from the writing world: The Vomit Draft.

Your first draft gets the ideas out. The code working. An embarrassing mess.

Guess what you can do with an embarrassing mess? Fix it. Edit.

Make a pull request and get feedback. Show screenshots to designers and get feedback. Show it to your product owner and get feedback.

You can polish until it's perfect enough. But an empty file ... can't do much with that.

Start. Don't stop. Keep going. You can always fix it later. ❤️

Cheers,
~Swizec

PS: this applies to everything

Did you enjoy this article?

Published on February 26th, 2021 in Opinions, Learning, Mindset

Want to become a true senior engineer?

Getting that senior title is easy. Just stick around. Being a true senior takes a new way of thinking. Do you have it?

Leave your email and get the Senior Mindset series - a series of curated essays on the mindset of a senior software engineer. What it takes to get there, what should you do when you're there, how to change the way you think.

The Senior Mindset series

Get a series of curated essays on the mindset of a senior software engineer. What it takes to get there, what should you do when you're there, how to change the way you think.

it describes my days in a way I have not read before.

This was a very enlightening article about being a senior engineer.

Join over 10,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. ✌️

Have a burning question that you think I can answer? I don't have all of the answers, but I have some! Hit me up on twitter or book a 30min ama for in-depth help.

Ready to Stop copy pasting D3 examples and create data visualizations of your own?  Learn how to build scalable dataviz components your whole team can understand with React for Data Visualization

Curious about Serverless and the modern backend? Check out Serverless Handbook, modern backend for the frontend engineer.

Ready to learn how it all fits together and build a modern webapp from scratch? Learn how to launch a webapp and make your first 💰 on the side with ServerlessReact.Dev

Want to brush up on your modern JavaScript syntax? Check out my interactive cheatsheet: es6cheatsheet.com

By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️