Lea Verou, PhD

@leaverou@front-end.social
8K Followers
223 Following
1.3K Posts
I make things that help people make things. • W3C TAG alum • CSS WG Invited Expert • CS/HCI PhD @MIT • Shy extrovert.
Pronounsshe/her
Websitehttps://lea.verou.me
GitHubhttps://github.com/leaverou
🦋 Bskyhttps://bsky.app/profile/lea.verou.me

Lea: Oooooh, import.meta.resolve() is writable! I wonder if… 💡

#JS engine: Nope! Just stop Lea 😒

😅

TIL: You can highlight a JS template tag as another language by prepending it with a comment like /* html */ in at least VS Code and editors wrapping it like Cursor.

How did I find out? Cursor suggested it when I tried to instead do a more convoluted

const html = String.raw;
const template = html`…`;

Edit: Oops, turns out I had an extension installed that did this (es6-string-html). Sorry!

Pic for reference:

In today’s episode of Useless Info I just learned about #JS:

Turns out you cannot subclass Proxy (because it has no prototype).

Nice try Lea 🥲

(Yes, I know that for this particular use case you can have a regular constructor return a Proxy)

Continued from https://front-end.social/@leaverou/115259505530216030

Surely, 0% instead of the advertised 40% is as bad as it gets, right? Wrong.

Suppose you’re now taking a friend along on the trip, so you’re 3 adults + 1 kid. With Family, you now pay *more*, with no opt-out!

And chances are, you wouldn't even know, and would be grateful for the "discount"!

Don't get me wrong, I love good marketing. But this squarely crosses the line into deception and is not ok.

Don't be the reason we can’t have nice things. :(

[5/5]

Continued from https://front-end.social/@leaverou/115259497950801042

Remember the weird mysterious alchemy involved in the actual total when you use the Family fare?

That wipes out even that tiny discount, making the grand total of savings less than $1, an effective discount of 0%.

In fact, after I took these screenshots, the fare changed slightly so in the OP screenshots the difference is literally $0.00!

Surely, 0% is as bad as it gets, right? Wrong. [4/5]

Continued from https://front-end.social/@leaverou/115259476715556155

Exhibit A: ATH-VIE on Sep 30
2 adults: Flex is $319.88/pax

1 adult + 1 kid: Flex → Family, now $362/pax (+13%). Flex is no longer bookable.

So how much is the actual discount?
Flex for 2 pax: $319.88 * 2 = $639.76
Family for 1 adult + 1 kid: $362.13 * 1.6 = $579.408
2 - 579.408 / 319.88 = 18.9% off, less than half the advertised discount.

…But wait, why is the total higher? [2/5]

I otherwise like Aegean Airlines but their "40% discount for children" is a scam and a #darkpattern and I finally got sufficiently pissed off I’m going to expose it.

tl;dr: The "40% off" is based on a fake fare, artificially inflated so it can then be discounted. The effective discount is 14% for 1 adult + 1 child, 0% for 2 adults + 1 child, and the fare actually *increases* for adult:children ratios > 2:1 with no opt-out.

[1/5]