Programmers are the most optimistic bunch of people I have ever come across. Ask us how long something will take and chances are our estimates will be way off.
It's not because we hate you. It's not because we didn't know any better, either. We're just very optimistic about everything. The project, our skills, the tech, your specs, the unknown unknowns ...
Especially the unknown unknowns are a big problem - it's impossible to predict everything that might go wrong. The variables are just too many.
Right now it looks like we can do This (tm) in an hour, but a weirdness or twenty and suddenly it's taking a whole day.
As programmers we assume the least complications, even when multiplying by Pi.
But there's another profession that gives a lot of predictions in the face of uncertainty - doctors. When a doctor gets their estimates wrong, people are often delighted. What?
Let me tell you a tale of two estimates - a conservative and a programmer estimate.
A tale of two estimates
Last Friday I messed up my shoulder, more specifically that tiny little joint between my clavicle and shoulder. I was longboarding, did something wrong and landed on tarmac. Hard.
In the morning I had to use my left hand to eat breakfast. Couldn't even pick up a spoon.
At the ER the doctors told me that hey, the bones and joint seem fine (no dislocation etc.), but I must have messed up my tendons something bad. What I can expect is three weeks of pain and problems. "Just take some painkillers if it gets too bad", they said.
Today, 6 days later, my shoulder is already at 90%. Clenching my teeth just a little, I could do 60 of my usual 150 pushups this morning. Even jumping rope wasn't much of an issue. Yesterday I could even carry a four kilogram longboard in my right arm for extended periods of time.
In a day or two I will be fully healed, but essentially the doctor's estimate was off by almost a factor of 3.** And I couldn't be happier, it's brightened my whole day up!
A programmer's estimate
I'm working on a web page segmentation algorithm. The idea is to take a website and decide which parts are headers, sidebars and so on. It's an interesting problem since everyone else is only concerned with extracting the main juicy content.
The algorithm finally started working earlier this week, just a matter of merging the results back into the original HTML so they can be useful.
I'll have it by Friday morning, I said.
I mean how hard can it be? I'm just using a language I hate (java), am not experienced with, a paradigm I dislike and try to avoid, and a library I only started poking at two weeks ago.
Surely I can do a task I don't fully understand by Friday morning! It's the estimate that popped into my mind when I tried to pull something out of my arse, so it must be correct. I've been a programmer for ages!
Nope, didn't get it done.
Turns out I didn't understand the object hierarchy of boilerpipe - took me many hours just to extend the relevant functions of a particular object.
Then I found out the HTML parser I'm using is linear, so there is no clear way of deciding which child nodes belong to what parent node.
In the end I spent all of my time just figuring out how to add the algorithm's results to the HTML in the crudest way possible - add a number in front of every node in the DOM.
Well oops.
Programmers are optimists
Whenever you talk to a programmer, just remember, they are an optimistic bunch. Yes, even the most disheartened scruffy old programmer is insanely optimistic. We are the kind of person who:
- Dives into a project with a spec that will change
- Grabs a bunch of unknown tools, applies them to an unknown domain ... and wins
- Lies in a different world with every new project
- Changes all their tools every couple of years
Anyone who isn't an optimist just can't survive as a programmer.
How many other professions can say that about themselves?
Continue reading about Programmers are optimists
Semantically similar articles hand-picked by GPT-4
- Programmers are fucking lazy
- What's more productive, a team or a talented soloist?
- Why programmers work at night
- The 10x programmer in you
- My favorite lessons from Pragmatic Programmer
Learned something new?
Read more Software Engineering Lessons from Production
I write articles with real insight into the career and skills of a modern software engineer. "Raw and honest from the heart!" as one reader described them. Fueled by lessons learned over 20 years of building production code for side-projects, small businesses, and hyper growth startups. Both successful and not.
Subscribe below π
Software Engineering Lessons from Production
Join Swizec's Newsletter and get insightful emails π on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.
"Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. π"
Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.
Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.
Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help π swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.
Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers π ServerlessHandbook.dev
Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization
Want to get my best emails on JavaScript, React, Serverless, Fullstack Web, or Indie Hacking? Check out swizec.com/collections
Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog
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 β€οΈ