From March 2020 to ~October 2020, I wasn't really able to use a keyboard/mouse.
I've been pretty public about how I worked around it (joshwcomeau.com/blog/hands-fre…), but I haven't been as public about how I overcame it.
🧵 This thread is about my personal experience with RSI.
This is a story about my own experience, not a tutorial for how to solve RSI. Everyone's different, and just because something worked for me doesn't mean it'll work for you.
Please read all the way through before trying anything.
[cw medical stuff / surgery discussion]
In March 2020, I injured my left arm. Certain activities, like typing, would cause a burning pain in the elbow, and occasionally the wrist or fingers.
In May 2020, the same thing started happening in my right arm.
Some of the things I tried:
• 3 different keyboards, 3 different mice
• A standing desk
• 3 physiotherapists
• 2 occupational therapists, including the #1 hand specialist in Montreal
• 2 consultations with surgeons (more on this soon)
• Maximum-dose anti-inflammatory regimens
• Lots and lots of vitamins
• Complete computer abstinence for weeks at a time
• Wearing custom-made splints that immobilized my arms at night and throughout the day
• Electro-acupuncture
• An MRI, an ECG, an ultrasound
(And that's just the stuff I remember offhand!)
The medical professionals I saw were focused on the fact that my ulnar nerve subluxes (fancy medical word for "dislocates") when I bend my arm. As my elbow bends, the nerve slides out of place to sit outside my elbow.
This is something that occurs naturally in about 10% of people. If you feel a "click" on the inside of the elbow when you bend your arm, you're part of this group!
(Don't worry though, this is a red herring. It's harmless in the vast majority of cases)
The medically-accepted wisdom is that the nerve gets irritated from moving back and forth over the elbow. The friction causes inflammation, and then the inflammation causes pain.
This explanation is nonsense, though. At least, in my case.
I could bend my arm up and down as much as I wanted, and it didn't make it worse. Spending 16 hours a day with my arms locked in place didn't help. Anti-inflammation medication (even strong prescription ones) did nothing.
The pain occurred when I was typing, no matter what angle my arm was bent at.
The pain didn't occur when I did things like paint the office walls (lots of bending), or drawing (bent in a similar fashion to typing).
It was very specifically typing and using a mouse.
In fact, sometimes my arms would hurt while I was *dictating*. My arms would be immobile, by my side, but using my *voice* would cause my elbows to burn.
I had a moment of realization: it didn't matter what I did or tried. The pain would persist even when it shouldn't. It was a rigged game, and there was no way to win. No special keyboard or medication would solve this problem.
During this period, I heard from lots of folks who had different suggestions, things that had worked for them. One of the most common suggestions was that I read The Mindbody Prescription by Dr. Sarno (amazon.ca/Mindbody-Presc…)
After the 5th time someone recommended it, I bought it and started reading. I got about 1/3rd of the way through before dismissing it as pseudoscience nonsense.
I had been seeing a hand specialist at this point, and he had referred me to a surgeon. Because of COVID, all public non-essential surgeries were paused, so I would have to go through the private system.
[cw next three tweets: graphic surgery discussion]
For most folks, a simple surgery can be done, but I wasn't eligible for it, because my nerve dislocates when I bend my arm. In my case, they'd need to move the nerve to the inside of the arm.
To do this, they make a 6" incision and physically pick the nerve up and move it a few inches. They carve a new "bed" for it to sit in.
You have to be conscious and coherent for this, so that you can bend your arm as instructed, to see how it sits.
Thinking about this procedure makes me lightheaded. I was *terrified* about this process.
It's a serious surgery. It has a recovery period of 3-4 months *per arm*. I was told I needed to do both arms, one after the other.
The surgeries would have cost about $30k, at a time when I wasn't working / had no income / wasn't sure I'd really be able to work again.
In addition to all of this, nobody was actually sure if the surgery would help! In fact, there was a not-negligible risk that it would make it much worse.
But we had exhausted all conservative options. This was the last resort.
Two weeks before the surgery, I decided to try reading that Mindbody book again.
Out of sheer desperation, I tried to follow the guidance in the book, and it started to work.
I can type as much as I want now. No surgeries required.
The fundamental idea in The Mindbody Prescription is that chronic pain can be caused by the brain. As a defence mechanism, the brain deprives muscles or nerves of oxygen, triggering pain.
I was deeply skeptical of this idea. If such a thing could be true, how is it that none of the medical professionals I've spoken with have mentioned it? How can some random book author know more than the specialists who deal with RSI every day?
In fact, that random book author was a doctor who had been using these ideas in his practice for decades, with thousands and thousands of patients, and seeing amazing results.
His book was published in the 90s, and the science is *just now* catching up.
What does the treatment actually look like? It varies, but here's what worked for me:
• Journaling. Every day I'd spend 30 minutes thinking about what was bothering me, and writing it down. Trying to dig deep and understand what's percolating under the surface
• Learning more. I've read a few books on the subject now (links at the end). I used an app that shared some of the research in an easy-to-digest way. Learning more about the research helps give you confidence in it, which is absolutely critical.
• Not trusting pain as a signal. When my arms would start to burn, I would ignore it. The pain was severe, but it would dissipate in a few minutes.
(PLEASE don't try this at home)
• Reminding myself that there is no structural reason for the pain to be happening, that I understand exactly what my brain is doing, and if it could please stop now that'd be great.
TO BE CLEAR: I went for many tests that ruled out any serious physiological causes (eg. tumors). I also discussed this with my doctors / physiotherapists. They were skeptical, but they also thought that this plan was reasonably safe / wouldn't make things worse.
So what actually happened? I think the original injury was normal and mundane. I pulled a nerve. But that usually heals in a few weeks. My brain seized on an opportunity and kept the pain going even after the nerve was fine.
When I'd the phrase "the pain is in your head", I would imagine a hazy hallucination, clearly distinct from "real" pain.
In reality, though, *all* pain is "in your head". Pain is an emotional response constructed by the brain, no matter what the trigger is.
If you're seeing some familiar elements in this story, I hope you'll keep an open mind about this stuff. I almost went through unnecessary surgeries because I was dismissive of these ideas.
Thanks for reading through this way-too-long thread 😄 please don't do anything before speaking with a doctor; there ARE serious physiological causes for pain, and you want to start by ruling them out.
Around this time tomorrow (10AM EST), I'll be launching my first product as an indie hacker, CSS for JavaScript Devs (css-for-js.dev).
It has been one heck of a ride 😅. In this thread, I wanna share what the journey's been like ✨
In early 2020, I developed an RSI that made it impossible to use a keyboard/mouse. I spent months not using a computer at all, and then months training myself to code with dictation and an eye-tracker.
It's mostly better now, but this was a catalyst for my abrupt career change.
I mention this because I think it's important framing: I'm not the type of person that would typically quit their secure, very-well-paid job as a staff engineer *during a pandemic* to pursue an unproven venture. But it felt urgent to me that I do this right now.
One of these numbers-in-circles is correctly centered. The other one *looks* correctly centered. 😅
Can you tell which is which?
Explanation in-thread 👇
With “true” mathematical centering, you get the result on the left. This is what happens by default in HTML/CSS. It centers the number according to an invisible box.
If we shift it a few pixels to the right, its stem aligns with the Y axis, and it looks ever-so-slightly nicer 💖
I wrote a blog post all about these sorts of small tweaks, “Chasing the Pixel-Perfect Dream“: joshwcomeau.com/css/pixel-perf…
It reminds me of a well-tended garden. Each plant that you prune has a negligible impact, but in aggregate, it makes a huge difference.
In Summer 2020, I was trying to figure out what I wanted to teach. Maybe Gatsby, since I worked for the org? Maybe React, since I had been using AND teaching it for years? Maybe whimsical animations, since that's my whole jam?
I picked… CSS.
Explanation in-thread 👇🏻
First, some brief context: In 2020, I developed an RSI that left me unable to type or use a mouse. It's mostly better now, but it was an eye-opening experience, and one that convinced me that it was time to do something I had wanted to do for years: focus exclusively on teaching.
For a few years I've been teaching part-time at a local coding bootcamp. It's super fulfilling work, because I can see the impact I have on students looking to start a new career.
Impact is important to me. I wanted to teach something that would meaningfully affect people!
Today I looked into the performance of different layout modes in CSS. I was curious if it takes the browser longer to lay out elements in a grid vs. Flexbox vs. flow layout.
TL:DR; they're all plenty fast ⚡️ but there are small differences.
Info in thread 👇🏻
For the benchmark, I created an app that renders 1000 random items, with a couple HTML tags in each one. I trigger a re-render, and measure how long it takes to recalculate layout.
Specifically looking for the time spent in this step:
1. Regular flow layout. No CSS on the container.
Average layout recalc time: 22.3ms
I imagine this is the lowest it could be, since each element fills the available width. No "interplay" between children.