HN user

mmazzarolo

1,199 karma
Posts87
Comments57
View on HN
nicopowa.github.io 1y ago

Ripples3 – Liquid Code Experiment

mmazzarolo
2pts0
mmazzarolo.com 1y ago

Optimizing SPA load times with async chunks preloading

mmazzarolo
1pts0
web.dev 1y ago

New to the Web Platform in July

mmazzarolo
3pts0
mmazzarolo.com 1y ago

Conditional Logging with Query Parameters

mmazzarolo
1pts0
github.com 1y ago

Rspack – Deep Dive into How Web Bundlers Work

mmazzarolo
2pts0
mmazzarolo.com 1y ago

Flexible network data preloading in large SPAs

mmazzarolo
2pts1
mmazzarolo.com 2y ago

Sigh, this is what browsing the web in the EU looks like nowadays (2021)

mmazzarolo
116pts190
ia.net 3y ago

Designing with Emoji

mmazzarolo
1pts0
css-tricks.com 3y ago

Named element IDs can be referenced as JavaScript globals

mmazzarolo
177pts109
mmazzarolo.com 3y ago

Automating Visual UI Tests with Playwright and GitHub Actions

mmazzarolo
2pts1
peppe.rs 3y ago

Programming on 34 Keys

mmazzarolo
82pts69
sethmlarson.dev 3y ago

Preparing for the wave of open source funding

mmazzarolo
5pts0
www.hugonteifeh.com 3y ago

The Case for Returning Errors Instead of Throwing Them in TypeScript

mmazzarolo
2pts0
cloudfour.com 3y ago

Font Subsetting Strategies: Content-Based vs. Alphabetical

mmazzarolo
1pts0
mmazzarolo.com 3y ago

Checking if a JavaScript native function is monkey patched

mmazzarolo
7pts2
web.dev 3y ago

New Patterns (Web.dev)

mmazzarolo
3pts0
ordinarypuzzles.com 3y ago

Show HN: Ordinary Puzzles, a free puzzle game inspired by Picross and Sudoku

mmazzarolo
7pts3
mmazzarolo.com 3y ago

Determining if an HTTP request was sent as beacon/keepalive

mmazzarolo
1pts0
blog.simpleanalytics.com 4y ago

Vodafone and Deutsche Telekom to introduce persistent user tracking

mmazzarolo
215pts128
fortune.com 4y ago

The euro and dollar are worth the same for the first time in 2 decades

mmazzarolo
5pts0
mmazzarolo.com 4y ago

Random notes around service workers development and testing

mmazzarolo
1pts0
matklad.github.io 4y ago

Unit and Integration Tests

mmazzarolo
3pts0
www.smashingmagazine.com 4y ago

Rethinking Server-Timing as a Critical Monitoring Tool

mmazzarolo
2pts0
mmazzarolo.com 4y ago

How to declutter Google's search results page

mmazzarolo
4pts0
www.debugbear.com 4y ago

What Is Google's Chrome User Experience Report?

mmazzarolo
1pts0
2ality.com 4y ago

Alternatives to installing NPM packages globally

mmazzarolo
2pts0
mmazzarolo.com 4y ago

Safari on iOS can overlap multiple full-screen videos

mmazzarolo
125pts88
www.teamblind.com 4y ago

How Layoffs Work: Behind the Scenes/AMA

mmazzarolo
3pts0
garrit.xyz 4y ago

A List of Bugs in macOS

mmazzarolo
1pts0
web.dev 4y ago

First-Party Cookie Recipes

mmazzarolo
1pts0

Author here. This article is my take on automating visual regression tests of a “modern” web application using Playwright and GitHub actions. The goal is to build a "minimal" testing setup that checks for UI regressions on each pull request and allows selectively updating the baseline images when needed.

Felt 4 years ago

Looks cool! I'm also wondering how much this 4-letter domain is worth.

If you don't know the global names, I would probably do something like this:

1. Grab the name of all globals your JS code is creating (using https://mmazzarolo.com/blog/2022-02-14-find-what-javascript-...).

2. Inspect all of them with the technique used in the article and update the inspection logic so that it checks does a deep check of the value "HelloWorld123" as well (the value can be accessed here: https://gist.github.com/mmazzarolo/2b325f3af2bc83f56d3c921ff...)

To me, there are two many reasons to avoid the global scope:

1. Like prototype extensions of JS types like "String", you're basically using a namespace that in the future might be used by a built-in API of the JavaScript engine — which would break your code.

2. You don't know for sure where your code will run in the future. A couple of years ago I worked on a migration where "standard" SPA were migrated to a micro-frontend app (where multiple SPA could be loaded on after another at the root level and each SPA would have to clean-up its own globals and listeners).

BTW I'm not against it — I DO put some stuff in the global object. If you put your entire state in a namespace like __MY_CUSTOM_SPACE__ the risk of encountering those two issues is basically 0. But I still thing there aren't many valid reasons to do so, especially with nowadays' toolings.

Author here! I recently finished writing "Running React Native everywhere": an opinionated tutorial on how to run React Native on multiple platforms using Yarn workspaces.

You can see the final result in the react-native-universal-monorepo GitHub repository (https://github.com/mmazzarolo/react-native-universal-monorep...).

It currently supports:

- Android

- iOS

- Windows

- macOS

- tvOS (tutorial here: https://finnternet.com/dev/blog/react-native-tv-monorepo)

- Android TV (tutorial here: https://finnternet.com/dev/blog/react-native-tv-monorepo)

- The web (using Create React App)

- The web (using Next.js, tutorial here: https://finnternet.com/dev/blog/nextjs-monorepo)

- Electron

- A browser extension

I've also been hearing coil whine sound coming from MacBook's Caldigit dock when using a wired gaming mouse (only in totally silent rooms). I haven’t mentioned it in the article, but just like you said, lowering the polling rate fixes it too.

It almost makes me feel that I am breaking the law when scraping a site, yet web scraping is on of the most basic programming things.

Yeah, same for me.

Regarding the denylisting, I guess it depends on what is being scraped and how often the scraping happens? I'm maintaining a remote jobs aggregator website and I've never been blocked before (but I'm not scraping more than ~5 times per day the same web page). And with a caching strategy, I think that even a scrape-as-a-service API like the one I'm building in the article should be "kinda" safe (besides edge cases that brute force the cache constantly, like by adding random query-params)?