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
is it 5am? oh no
I don’t blame anyone here. Webpack is doing its best. The library is doing its best. I’m doing my best. We’re all tryin

• • •

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

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
29 Dec 20
Funny how people don’t really know their impact on others. Like some song may be hugely personally meaningful to me but it’s just a few random streams for the artist. Or I’ve learned something from a random old comment but that commenter would say it’s silly or uninformed today.
And would they care? I don’t know. Like if I told that to some artist they’d probably feel icky and awkward. They just made a thing and they know it’s good, but they’re not responsible for my feelings. That thing has its own life now.
I think the part I tend to get wrong is projecting the awesomeness onto the person when it’s really about the work of art they’ve fished out, and my interpreting it. Stanning them might be awkward but stanning the work is not because clearly we both liked it a lot.
Read 4 tweets
27 Dec 20
I love how people watching me talk and mentioning my age or calling me a millennial straight up assume I wasn’t around when PHP, ASP .NET, or even XSLT were hype. I’m not deeply familiar with them because I mostly did desktop but I started early so I’ve seen a few things. 🙂
Here’s a challenge. When I want to tweet “X is just like Y back in the olden days” I try adding “but...” and figure out what the difference is. If I thought of a past analogy after one minute of thinking, clearly I’m not the first one to think this, and there might be more to it.
It’s easy to see the past references. They stand out, and there’s a limited number of variables to play with in the design. Some things will repeat. It’s harder to notice the new twist. Which can turn a past weakness into strength or solve a limitation.
Read 6 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!