I think how people deal with this feeling is one of the most noticeable differences between experienced engineers and those who are new to the field. It’s something you can get much, much better at.
I thought I need to become “smarter” to get out of this. Turns out, it’s not primarily that but:

- Noticing when your mind can’t hold the whole picture, and using tools (pen and pencil)
- Learning good debugging strategies
- Grouping code to create guarantees I can rely on
Even the smartest people in the field aren’t some kind of cognitive monsters. We all have similar brains with similar limitations. But experienced developers are better at slicing the program in a way that each piece can fit in a human brain, while other pieces stat predictable.
*stay
Also sometimes the best solution is indeed just to take a walk or a nap and leave the problem alone. A tired developer is not a productive one.
One more technique I’ve noticed senior engineers do is “bailouts”. When they refuse to think about a problem because it’s unreasonably complicated. Like “with these conditions, there’s no point for me to dig into it — I won’t understand it”. And then work to simplify the problem.
A bailout is very different from randomly giving up. It’s recognized early by specific warning signs (e.g. thread-unsafe code). The whole point is to *not* go into a rabbit hole that’s too deep and holds no reward at the end because the answer is too detached from the mistake.
In React, mutating things during rendering is an example of that. Sometimes people show me code mutating during render and ask, “why exactly does it cause [a weird consequence]”. They’re trying to reason through it. But I can’t — it’s not worth the effort. Let’s fix it instead.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dan Abramov

Dan Abramov Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @dan_abramov

24 Feb
Despite all its warts, MDX is a gamechanger for writing documentation and technical content. It removes the friction between the desire to add a bit of interactivity, and actually doing it in a way that surpasses your original intent. I can’t imagine going back to plain Markdown.
When writing, I used to “think in” Headings, Images, and Text. But now I can also “think in” in <FunFact>s, <Gotcha>s, <CodeSandbox>es, <Quiz>es and whatever domain-specific thing makes sense for this piece of content. Removing friction frees the imagination.
Unlike with a traditional CMS-backed writing, I don’t need a vendor to tell me what kind of blocks I’m allowed to use. I want to make my own in a few minutes.

My biggest problem with MDX is complexity of the stack. Hoping Server Components can simplify it in the long term.
Read 5 tweets
12 Feb
What is this, you may ask? You see, a library compiled with webpack uses code splitting. But webpack doesn't know the URL at which my app is served. So it has some code that guesses the URL based on <script> src. Alas, its guess is wrong. So I fool webpack by giving a fake src. Code snippet:  [...document.getElementsByTagName("scrip
Am I amazed? Yes. Am I horrified? Yes. Am I shipping? Oh yes.
@garybernhardt i think you'll enjoy this one
Read 5 tweets
4 Feb
Is there a good resource with questions that people get asked in real front-end interviews across the industry? Meaning 20-40 minute programming exercises. Can you send me the ones that you got asked, if you have them? Preferably vanilla JS, no framework stuff.
To clarify I’m not looking for actually good questions. I’m looking for what realistically gets asked today if you want to land a front-end job.
Let me make this even simpler. If you remember a question you really got asked (or know someone who was asked) for a front-end role.. and you have a link to it.. please send it in the replies! Thx
Read 6 tweets
30 Jan
It’s cute how in mathematics there is no per-definition function identity. A function is equal to another function if it returns the same output for the same input. That’s it. In JS, function() {} !== function() {} but in math it is. Even *different* sort algorithms would be!
(Pedantically, I guess the notion of “different” sort algorithms wouldn’t quite make sense in math, because a function is just a mapping, not an algorithm. Unless we’re studying algorithms specifically, in which case ofc they wouldn’t be equal, but also wouldn’t be functions.)
From a programmer perspective, it’s mindblowing that in order to tell if functions are equal, we “just” need to compare all their possible values. At possibly infinite points.

“This Set’s hash function? Oh, it’s between the between the chair and the keyboard. Start your proof.”
Read 4 tweets
10 Jan
Can someone confirm that I understand the intuition behind the principle of induction correctly?
Weak induction: if I knock a domino piece and show that knocking one piece knocks the next piece, I’ve shown that all domino pieces have been knocked.
Strong induction: if I show that knocking all pieces between A and B always knocks B, I’ve shown that all pieces after A have been knocked.
Read 4 tweets
30 Dec 20
Where is the monument to the person who invented a pickle
Early culinary history must have been fascinating. All the heroes who got sick or died eating the wrong stuff just so we can discover the 1% of food that actually gets better after burning, freezing, crushing, or leaving it open for a week
O Brave souls who ate a thousand poisonous herbs to find the one that goes well with meat, you may be gone but not forgotten
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!