@nolan@toot.cafe
@nolan@toot.cafe avatar

nolan

@nolan@toot.cafe

toot.cafe admin, web dev at Salesforce. Creator of https://pinafore.social. Former browser perf guy at Microsoft. #javascript #web #pinafore

This profile is from a federated server and may be incomplete. Browse more on the original instance.

nolan, to random
@nolan@toot.cafe avatar

"How Do Chrome Extensions Impact Website Performance In 2024?" by Matt Zeunert https://www.debugbear.com/blog/chrome-extensions-website-performance

Once again, one of the most reliable ways to speed up your browser is to uninstall extensions. (Except ad blockers.)

nolan, to random
@nolan@toot.cafe avatar

"Why Patching Globals Is Harmful" by Artem Zakharchenko https://kettanaito.com/blog/why-patching-globals-is-harmful

One of those classic lessons that apparently needs to be learned over and over again.

nolan, to random
@nolan@toot.cafe avatar

"Optimizing WebKit & Safari for Speedometer 3.0" https://webkit.org/blog/15249/optimizing-webkit-safari-for-speedometer-3-0/

Love all the little details here. Improving 60% by stacking a lot of small 1%-ish improvements is impressive.

nolan, to random
@nolan@toot.cafe avatar

"Node.js: The Documentary" https://youtu.be/LB8KwiiUGy0?si=fn3Qeaykl1KdUTR9

Great documentary. I still remember a lot of that early hacker spirit of Node.

nolan,
@nolan@toot.cafe avatar

I think you can get an idea of the cultural mindset of those early Node days by comparing the Browserify website to a more modern equivalent:

Nobody cared if your website was polished, or if it had crude cartoon characters or whatever – everyone just wanted to hack on cool stuff.

Semicolons were thrown away like neckties. Callbacks were cool. Nobody cared what crazy postinstall scripts you ran. It was a different time.

nolan, to random
@nolan@toot.cafe avatar

"My Shifting Open Source Priorities" by Gregory Szorc https://gregoryszorc.com/blog/2024/03/17/my-shifting-open-source-priorities

The details differ, but I identify a lot with this. Being the "random person in Nebraska" takes a lot of time and mental energy.

nolan, to random
@nolan@toot.cafe avatar

Vitest is pretty nice compared to Jest. I'm still not sold on testing a fake browser (jsdom, happy-dom), but at least it runs fast, has a nice UI, and no more CommonJS vs ESM zaniness.

nolan, to random
@nolan@toot.cafe avatar

New blog post: "Bugs I’ve filed on browsers" https://nolanlawson.com/2024/03/03/bugs-ive-filed-on-browsers/

Kind of a navel-gazey post, but I thought it'd be interesting to look back on the bugs I've filed on browsers over the past ~10 years.

nolan, to random
@nolan@toot.cafe avatar

Publishing npm packages as ESM-only and with no TypeScript is such a breath of fresh air. The published files are the same as the source files, just like we used to do with npm back in 2012

nikitonsky, to random
@nikitonsky@mastodon.online avatar

New post: JavaScript Bloat in 2024 https://tonsky.me/blog/js-bloat/

nolan,
@nolan@toot.cafe avatar

@nikitonsky Great post! Unfortunately though I think "disable cache" may be over-reporting. For react.dev for example, it looks like it is continually re-downloading the same resources as you scroll.

My workaround is usually to use a fresh private window rather than "disable cache," FWIW.

matt, to random

@nolan Any chance we can get a spam mute/block list set up on this instance, like this one: https://mastodon.de/@ErikUden/111954222362376457 Thanks for any time you can spare on this.

nolan,
@nolan@toot.cafe avatar

@matt Yeah I noticed that the spammer problem has been really bad recently. I've been getting like dozens of reports in a few days. I'll look into this.

nolan, to random
@nolan@toot.cafe avatar

"Write code for the web" by Manav Rathi https://mrmr.io/apple

This is from an iOS developer, but as an Android developer, I came to basically the same conclusion 10 years ago. The web isn't perfect, but it's a near-universal platform not owned by anybody.

nolan,
@nolan@toot.cafe avatar

Personally, I got tired of Google's constant breaking changes with every Android version, and all the hoops I had to jump through just to keep my apps listed. Whereas whatever garbage I put on the web 20 years ago still works today.

An investment in learning the web (even dumb stuff like document.all or document.write) still pays dividends decades later. Whereas all my old Android API knowledge is just gone, like tears in the rain.

nolan,
@nolan@toot.cafe avatar

The biggest danger to the web IMO is the emerging Google-Apple duopoloy, and the fact that whatever bugs existed in WebKit at the time of the Blink split will just be "how the web works." This is why projects like Servo, Ladybird, and Flow are so important – they prove you can still build a browser from scratch, just based on the spec. (And thank heavens for the spec writers who made this possible.)

nolan, to random
@nolan@toot.cafe avatar

New blog post: "Web component gotcha: constructor vs connectedCallback" https://nolanlawson.com/2024/01/13/web-component-gotcha-constructor-vs-connectedcallback/

This is just a quick post on a anti-pattern that I've seen countless times.

nolan,
@nolan@toot.cafe avatar

@hawkticehurst @DavidDarnes @andrew_chou This makes a pretty similar point to my article! I like the distinction you draw between global and local event listeners.

nolan,
@nolan@toot.cafe avatar

@hawkticehurst @DavidDarnes @andrew_chou Honestly it feels like we need a generic test suite that tests that a web component can be inserted/removed multiple times without blowing up, and that it doesn't leak (ala https://www.npmjs.com/package/fuite or https://www.npmjs.com/package/memlab or similar).

Realistically, I think a lot of devs are not going to grok the subtle difference between global vs local event listeners. Things like Resize/Intersection/Mutation Observer also vary across browsers w.r.t. memory cleanup.

nolan,
@nolan@toot.cafe avatar

@hawkticehurst @DavidDarnes @andrew_chou Actually scratch that last comment, looks like Jake Archibald went on a tear filing Resize/Intersection Observer leak bugs on browsers; seems they are all fixed now. https://bugs.webkit.org/show_bug.cgi?id=227194

So effectively *Observers should clean up memory when the element is removed. So same issue as event listeners.

matt, to random

@nolan Just in case you don't know, toot.cafe seems to be under heavy load right now.

nolan,
@nolan@toot.cafe avatar

@matt Just checked and everything looks normal… not sure what happened.

nolan, to random
@nolan@toot.cafe avatar

Trying to find good guitar tools online really feels like a statement on the degradation of the web:

  • Can't find a decent guitar tuner or metronome that isn't plagued with ads or junk, so I use random PWAs written by web devs as software demos: https://guitar-tuner.appspot.com/ https://rx-metronome.web.app/
  • Searching for chords/tabs for popular songs gives you text files on shady-looking sites that prevent you from copying the text… and the text files look like they were written decades ago
nolan,
@nolan@toot.cafe avatar

You see a similar thing on GameFAQs or GameTabs – there was this flourishing community of people passing around lovingly hand-authored text files (my favorite example is this Super Metroid walkthrough where the text is manually justified https://news.ycombinator.com/item?id=28651093), and now everything is locked behind walled gardens or barely clinging to life (speedrun.com seems like one of those lingering vestiges of the old community-run 'net – GameTabs was, but looks like it got bought or something recently).

nolan,
@nolan@toot.cafe avatar

Maybe I'm just an old curmudgeon or maybe there are still flourishing communities I'm unaware of, but as an old 'net citizen it just grosses me out how much of the modern web is mediated by platforms that only care about wringing out every penny they possibly can. This stuff used to be run by hobbyists on a shoestring budget with bubblegum and twine but care and love (Mastodon still has some of this vibe)

nolan, to random
@nolan@toot.cafe avatar

"Weird things engineers believe about Web development" by Brian Birtles https://birtles.blog/2024/01/06/weird-things-engineers-believe-about-development/

I've worked on both a browser team and as a web developer; this largely jives with my experience.

A lot of web developers have very dogmatic views about "you should do things like this, not like this," but working on a browser, I honestly feel like it's way more nuanced if you actually understand how browsers work. Which is often a mess of hacks and quirks that only make sense if you've been there

nolan,
@nolan@toot.cafe avatar

The whole "virtual DOM is fast, React is fast because of the virtual DOM" idea seems to me downstream of the fact that JS engines got really fast while DOM engines stagnated (especially at MSFT, where Chakra was in a different part of the org chart and raced ahead with an OSS implementation while Trident/EdgeHTML floundered and fell behind). If you were a web dev, this was just the water you swam in, but for browser devs it was a total historical contingency

nolan,
@nolan@toot.cafe avatar

At some point I need to write a blog post about all sorts of weird IE quirks that web devs coded around, like the fact that CSS attribute selectors were crazy slow or that setTimeout blocked user input but setImmediate didn't… I also fondly recall isolating try/catches into their own functions to avoid V8 deoptimizations (this has been pejoratively called "CrankshaftScript").

My point is that browser engines aren't hewn in stone; they have weird quirks. This shapes the web more than you'd think

bkardell, to random
@bkardell@toot.cafe avatar

New Post about some Web Components stuff and styling

https://bkardell.com/blog/LovelyTrees.html

nolan,
@nolan@toot.cafe avatar

@bkardell I totally missed this post when you published it. I agree that we need more userland ideation before agreeing on standards.

One analogy I thought of recently: it's like we have BASIC with its "modules" that only have global variables and GOTOs. And people spent years getting very comfortable using GOTOs. Now we have encapsulation but… people miss the GOTOs. Which makes me wonder if we have the right encapsulation boundaries.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • Durango
  • DreamBathrooms
  • cisconetworking
  • magazineikmin
  • InstantRegret
  • normalnudes
  • Youngstown
  • everett
  • slotface
  • rosin
  • mdbf
  • kavyap
  • thenastyranch
  • JUstTest
  • osvaldo12
  • cubers
  • Leos
  • anitta
  • khanakhh
  • ngwrru68w68
  • tacticalgear
  • GTA5RPClips
  • tester
  • megavids
  • ethstaker
  • modclub
  • lostlight
  • All magazines