Every month my credit card bill comes in with a charge of around $0.29 USD from Amazon Web Services. Every month for at least the last three years. I have no idea what I still have running on AWS. At one point, I had a lot of my website infrastructure on AWS, but now, everything is on Netlify. You might be thinking to yourself, “That’s ridiculous, just go in and delete your AWS account!” And you’d be right, except this is a decision I’m purposely making.
How long do you think it would take me to log in, figure out what’s running, shut everything down, and avoid all charges? Optimistically, let’s say that takes five minutes. That doesn’t seem like a lot of time to avoid a monthly charge. But let’s do a little math. Let’s round up and say that AWS is currently costing me $0.01 USD per day. Does that $0.01 USD per day make any impact on my financial well-being? No it doesn’t. It’s effectively zero.
So it will take me five minutes to save $0.01 USD (effectively zero) per day. Why am I not doing it? Because of other things I could be doing with that five minutes. On the ESLint project, I’m paid $80.00 USD per hour, which works out to $1.33 USD per minute. That means if I work on ESLint for five minutes, I’ll make $6.67 USD. If I have five free minutes, which is the better use of my time? Trying to figure out what I’m running on AWS or working on ESLint? The answer is to work on ESLint because I’m making money. And another way to look at it: If I spend those five minutes on AWS, I’m actually losing $6.67 USD, because that’s what I could be making if I chose to work on ESLint instead.
That $6.67 USD lost by working on AWS is called an opportunity cost. Opportunity cost is a term from economics that is defined as, “The cost of an opportunity forgone (and the loss of the benefits that could be received from that opportunity); the most valuable forgone alternative.” In short, opportunity cost is the cost of not doing something so you can do something else. Or to put it another way: When you say “yes” to something you are implicitly saying “no” to something else. That something else has a value that you’ll never receive.
Opportunity cost is helpful in any scenario when you have to decide between two or more alternatives. Which JavaScript runtime should you use? If you choose Deno over Node.js, there’s an opportunity cost of being able to hire expert Node.js developers who don’t want to work on Node.js. Which application framework will you choose? If you choose Next.js, there’s an opportunity cost of being locked into the React ecosystem, therefore limiting your choice of other technologies to use in your application.
Thinking about our decisions in terms of opportunity cost is an important tool in your decision-making process, and one that we often forget to take into account. Any time you’re making a choice, it pays to take a few moments to think about how that decision limits your opportunities.
Every decision has an opportunity cost, and that doesn’t make the decision wrong. But you definitely want to be aware of the opportunity cost before making the decision.
🤝 1-on-1 Coaching for Software Engineers. I work with senior-level software engineers (and above) to work through the difficult parts of your job. Whether that be leading without authority, improving your productivity, achieving work-life balance, or convincing your VP of your idea, I can help you achieve your goals.
Learn More |
🎬 The Good, The Bad, and The Web Components by Zach Leatherman (via JSHeroes)
It's been a while since I checked in on the state of web components, and this video gives a nice overview of where we are, including some of the sharp edges that make using web components a bit trickier than necessary.
📝 Blinded by the Light DOM by Eric Meyer
This longish read is a journey that explores how to use web components without the shadow DOM -- only with the "light" DOM, aka, the normal DOM that we all know and use. Very detailed, good read.
🎬 Make FAKE Sets with This AI Tool For VIDEO by Website Learners
This short video shows how to create fake backgrounds for your videos using free tools that are available online. Pretty incredible.
💻 Firefly by Adobe
A free online tool that uses generate AI to create, edit, and augment images. Some pretty amazing examples right on the homepage.
🎬 Using custom CSS properties like this is a waste by Kevin Powell
I haven't done much web development since CSS custom properties were introduced, and this video really helped me expand my thinking about how to use them.
📝Navigation API Explainer by WICG
An exhaustive explainer about the new Navigation API, why it was created, why it's better than the history API, and how to migrate your code.
🏠 Real Estate: My latest BRRRR property should have its final hail damage repairs completed by the time you read this. The new roof has been installed and today we're scheduled to start the new siding. Follow my Instagram for photos.
📝 Blog: I published JavaScript WTF: Why does every() return true for empty arrays? in which I explain the logic behind this quirky behavior.
💻 ESLint: I continued working on plans for ESLint v9.0.0, including writing two blog posts. The first explains how the new configuration system will be rolled out, and the second announces our decision to deprecate formatting rules.
A once-per-month newsletter discussing topics important to senior-level software engineers, with a particular focus on frontend technology and leadership.
Thoughts on AI-First Development I spent the past month diving into Copilot Edits, testing whether I could go fully AI-first on my personal projects. Instead of jumping in and coding right away when I had an idea, I let Copilot take the first pass by following my instructions. What sets Copilot Edits apart from earlier versions is its ability to make changes across multiple files—not just suggest edits in a single one. Could this actually save me time and effort? Spoiler: yes, and in a big...
Thoughts on People Skills roles that require more interaction with our colleagues and customers. It’s at that point where a software engineering role shifts from primarily code-based to primarily people-based, and all of a sudden, it’s a different job. Previously, transitioning to a people-focused role took over five years and typically involved several promotions. However, with the advent of AI in software engineering, this timeline is shortening significantly. Companies once hired mediocre...
Thoughts on Debuggability In the early days of web browsers, there were no developer tools. From Netscape to Internet Explorer, and the first version of Firefox, if something wasn’t aligning properly or your JavaScript wasn’t behaving as expected, there was little you could do. The browser provided no additional information. Everything changed with the arrival of Firebug, the first real developer tool for web applications. As a Firefox plugin, it exposed the inner workings of a web browser to...