You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Overengineering A Blog, Prologue: An Ode To Red Squigglies"
3
+
date: "2019-02-06"
4
+
template: PlainPost
5
+
---
6
+
7
+
It’s all about the red squigglies. Red squigglies in Microsoft products have been saving me from looking stupid since the second grade, and now they save me from writing stupid code on a minutely basis. Well, significantly less stupid code. You know what I’m talking about. The red squigglies that tell you that no, it’s not spelled “bureauacracy,” and more frequently for me, that object is possibly `undefined`, dummy.
8
+
9
+
And you _want_ the red squigglies. They might not feel like your friend in the moment, but you’d much rather them get on your case than have them drop the ball on you. Whenever I’m involved in an incident review at work, one of the things I look for is why red squigglies didn’t save us. If we wrote bad code, why are we catching it at runtime instead of at compile now? Ensuring red squigglies appear where they’re supposed to has consequential impact. It keeps the site running for our customers.
10
+
11
+
I had been meaning to write my [first technical blog post](/expressive-react-component-apis-with-discriminated-unions) for a while, and I always figured that when I finally got around to writing it, I would publish it on Medium and be done with it. I had every intention of doing exactly that, until I thought about how I would explain the content to a colleague. Red squigglies. You want to write React component APIs that make red squigglies appear when someone tries to use your component wrong. That’s the whole point.
12
+
13
+
So, this blog was born, not because I’m dedicated to blogging frequently, but because if I’m going to do it even once, I’m not going to write a whole post about how to get more red squigglies _without showing you the red squigglies_. Every code sample in this blog is interactive. You can hover identifiers to see their type information; you can hover incorrect code to see the compiler errors; you can even edit the samples and watch how those change. You can fix the broken code samples or break the working code samples. I learn best through hands-on experiences, and thought others might too.
14
+
15
+
I think it came out pretty cool, and I learned a ton while building it. This was also the first time I’ve _started_ a serious frontend web project from scratch in a couple years, so I got to catch up on all the new frontend fads the kids are talking about on Twitter these days. So, my next couple posts will be dedicated to how I built this, what I learned while building it, and why I decided to compromise and make my squigglies straight lines.
0 commit comments