Annoying Graphs: Did the Facebook Container Add-on Result in More New Firefox Profiles?

Yesterday, Mozilla was in the news again for releasing a Firefox add-on called Facebook Container. The work of (amongst others) :groovecoder, :pdol, :pdehaan, :rfeeley, :tanvi, and :jkt, Facebook Container puts Facebook in a little box and doesn’t let it see what else you do on the web.

You can try it out right now if you’d like. It’s really just as simple as going to the Facebook Container page on addons.mozilla.org and clicking on the “+ Add to Firefox” button. From then on Facebook will only be able to track you with their cookies while you are actually visiting Facebook.

It’s easy-to-use, open source, and incredibly timely. So it quickly hit the usual nerdy corners of the web… but then it spread. Even Forbes picked it up. We started seeing incredible numbers of hits on the blogpost (I don’t have plots for that, sorry).

With all this positive press did we see any additional new Firefox users because of it?

Normally this is where I trot out the usual gimmick “Well, it depends on how you word the question.” “Additional” compared to what, exactly? Compared to the day before? The same day a week ago? A month ago?

In this case it really doesn’t depend. I can’t tell, no matter how I word the question. And this annoys me.

I mean, look at these graphs:

Here’s one showing the new-profile pings we receive each minute of some interesting days:c52dd445-e624-47aa-a44d-d5e758b56b04

Summer Time lining up with Daylight Saving Time means that different parts of the world were installing Firefox at different times of the day. The shapes of the curves don’t line up, making it impossible to compare between days.

So here’s one showing the number of new-profile pings we received each day this month:ebce02bb-1c78-4c52-9878-9a9e8d78e459

Yesterday’s numbers are low comparing to other Tuesdays these past four weeks, but look at how low Monday’s numbers are! Clearly this is some weird kinda week, making it impossible to compare between weeks.

So here’s one showing approximate Firefox client counts of last April:1d44c744-0267-4216-9371-5bf042ba47e7

This highlights a seasonal depression starting the week of April 10 similar to the one shown in the previous plot. This is expected since we’re in the weeks surrounding Easter… but why did I look at last April instead of last March? Easter changes its position relative to the civil calendar, making it impossible to compare between years.

So, did we see any additional new Firefox users thanks to all of the hard work put into Facebook Container?

¯\_(-.-)_/¯

:chutten

Advertisements

TIL: Water Softeners

We wake up to hear an odd sound carried through the forced-air ducts. Furnace is loud, I think. My wife precedes me downstairs and, finding the sound louder, heads to the basement.

“Water in the basement!” comes her yell. I bound down the stairs two at a time and start shutting off water valves to stem the flow of a 3/4″ coldwater supply emptying through the water softener and onto the floor.

Water softeners are a piece of almost necessary equipment in the part of Canada where I live. Hard water is water that contains dissolved minerals (usually Calcium and Manganese) that, when present in sufficient amounts, can form “hard water scale.” This usually shows up on heating surfaces (the inside of kettles and water heaters) and on drying dishes (in the form of cloudy spots). Hard water’s not toxic or anything, but it’s a pain, and our water’s well into the category the USGS calls “very hard.” So we soften it.

Conventional water softeners work by exchanging those dissolved mineral ions (mostly Calcium around here) for salt ions (Sodium or Potassium) in tiny little resin beads kept in a column called the “resin tank” (or “mineral tank”) which you hook up to your water supply. The beads are made up of a compound to which salt binds less strongly than other ions (because it prefers ions missing two valence electrons, if you remember your High School Chemistry). Thus, when a bead with a bound salt is presented with a free-floating Calcium ion, the bead ditches the salt into the water and snatches up the Calcium.

The resulting water does not taste salty and does not meaningfully contribute to dietary salt intake, in case you were wondering.

Eventually these beads become full of these mineral ions. To return them to previous performance levels, they are soaked and flushed with a salt brine. Due to the brine’s high concentration of salt ions, the hardness ions leave the resins to form an equilibrium between the beads and the brine. Then the waste brine (now full of hardness ions as well as quite a lot of the salt) is sent down the drain.

To generate the brine, water is pumped into a salt storage tank (or “brine tank”) and then is left to dissolve salt. This salt is the only consumed quantity in this process, and must be regularly topped up (usually by purchasing 24kg bags of softener salt pellets at local grocery stores for under $6 a bag).

The whole recharge process takes about two hours.

Water softeners have an operating lifetime similar to that of the plumbing fittings you need to install it: ten to fifteen years.

Near as I can figure it, the water softener that decided to flood my basement was 14 years old when its resin tank decided to rupture catastrophically during a 2am recharge cycle. Two hours later, recharge cycle complete, it flipped the valve back to supply the house with soft water and then supplied itself with all of the house’s water.

Luckily my floor drain was nearby and could handle the water flow, so the only “damage” was a little splashed carpet in the next room and some garbage I’d been meaning to throw out. I’m not looking forward to the water bill next month, but I’m happy my furnace is installed on feet for just this sort of occasion.

I did get a nice close-up view of those tiny ion-exchange resin beads, though, as they had been spread all over the basement floor. They look like transparent cornmeal. When wet they kinda have the consistency of mashed potatoes.

One on-sale water softener from Canadian Tire and one plumber’s visit later, I’m once again living in the land of soft water. For the next ten to fifteen years.

So now I know rather more than I previously did about water softening. And so do you.

 

So I’ve Finished The Legend of Zelda: Breath of the Wild

20180315_132531.jpg

Wow, what a game. It’s a game that had me talking with friends about video games again. You know, in that cagey way where you hint at something you aren’t sure they’ve seen yet until they nod and then you head into spoiler territory?

It’s a game that gives you every tool you need in the tutorial. Swords, shields, bows, bombs… and then you’re off. It doesn’t care what you do from then on, or how you do it. You simply go.

It’s a game that decides to not measure progress. Sure, it’ll count shrines and things… but it doesn’t care. Nothing changes, nothing matters except defeating Ganon. And yet, it is happy to let you take the long way around to get there, both in mechanics and in story. Who needs experience points, or levels, or priority missions, anyway?

It’s not perfect. The framerate drops in the Great Hyrule Forest. It leans a little hard on motion controls that ask you to point with the bottom of the controller instead of the point. Inside the Divine Beasts voices lead you around by the nose as though they didn’t get the “trust the player” memo the rest of the game hinges upon.

And the entire Gerudo segment comes across as tone deaf. Treating an ancient culture’s mores as a puzzle to “solve” because you know “better” is a little colonial for the 21st Century.

But then you hold these stumbles up to moments like when the Deku tree says “Next time I’ll let you kill yourself on that sword” and you believe it. The game has been honest with you so far, trusting you and being trusted almost to a fault. I believed that tree about that sword.

Speaking of that sword, pulling it was billed as a test of strength. “Strength?” There are no character sheets in Breath of the Wild, what is strength? Strength is the number of hearts you have. You are stronger when you have more heart. WHAT.

I’m especially pleased with this game coming straight off of Mass Effect: Andromeda. The cartoon characters you meet in Hyrule are different and recognizably so from their design. Even the hapless travellers you rescue time and time again are expressive in text and in facial expression.

ME:A also never wanted to let the player fail. Zelda is only too happy to have you fail. Too close to your own bomb when it goes off? Congratulations, you ragdolled down a cliff and into the river. Find a guardian? They’ll roflstomp you for hours. And you keep running across them! Even the main quest has you tromping up a hill in Zora’s Domain and finding something you cannot win against. Not because the game has decided it, but because you’re just not ready. And you can brickwall against it, like I did. Maybe if you jump over here, maybe if you use lightning arrows… Nope. You aren’t supposed to win this fight. You are the mouse, not the lion (or in this case, the Lynel). Scurry, little mouse, and try not to be seen.

Oh. No. You’ve been seen. Better run, little mouse. Run!

I’m sure there’s a wave of people who’ve seen this first in games like Dark Souls, but for me Zelda: Breath of the Wild was the first game in recent memory that made me afraid.

And how I love it for doing so.

Attacking Hyrule Castle, pushing deeper within. Everything the world taught you being put to the test, but upside down. On the overworld height helps you find your way, lets you see danger coming. In the Castle, height will get you killed. Better run, little mouse.

Wait. No. You’re not a mouse any more. You’ve fought, you’ve learned, you’ve grown.

But… you still remember being a mouse. So the tension ratchets up more than it ought to, creatures down the hall loom a little larger than they actually are, and victory… oh, victory tastes so much sweeter when you remember how impossible it used to be.

And then you reach Ganon. They really didn’t mind being a little disgusting with the creature design of the calamity bosses, and Ganon got a double dose. I feel a little cheap not having learned the perfect parry before fighting him, having to rely on my powers to defeat him… but that’s fitting. It works with the story. The champions were there for the assist.

Or so I tell myself.

The ending… was fine. The writing was a little weak, but everything else was lovely. I’m a little disappointed I don’t get to play in the world my adventure helped create, instead being dumped outside the castle gates, moments before the final confrontation, but it was an end.

And so I decided to put Zelda: Breath of the Wild down. I feel I could spend a lot more time in there. I feel I may have played it “wrong” by rushing too much to expand the map without exploring it enough (and my final map percentage of 40.03% certainly seems to reflect that). I can think of, right now, another couple of corners of the map I maybe should’ve gotten to.

But some things should end. Some things should leave you with that bittersweet hangover of a world your mind isn’t finished living within.

It’s been a long time since I’ve felt that from a video game. I missed it.

TIL: Feature Detection in Windows using GetProcAddress

In JavaScript, if you want to use a function that was introduced only in certain versions of browsers, you use Feature Detection. For example, you can ask “Hey, browser, do you have a function called `includes` on Array?” If the browser has it, you use it; and if it doesn’t, you either get along without it or load your own implementation.

It turns out that this same concept can be (and, in Firefox, is) done with Windows APIs.

Firefox for Windows is built against the Windows 10 SDK. This means the compiler knows the API calls and type definitions for all sorts of wondrous modern features like toast notifications and enumerating graphics adapters in a specific order.

However, as of writing, Firefox for Windows supports Windows 7 and up. What would happen if Firefox tried to use those fancy new Windows 10 features when running on Windows 7?

Well, at compile time (when Mozilla builds Firefox), it knows everything it needs to about the sizes and names of things used in the new features thanks to the SDK. At runtime (when a user runs Firefox), it needs to ask Windows at what address exactly all of those fancy new features live so that it can use them.

If Firefox can’t find a feature it expects to be there, it won’t start. We want Firefox to start, though, and we want to use the new features when available. So how do we both use the new feature (if it’s there) and not (if it’s not)?

Windows provides an API called GetProcAddress that allows the running program to perform some Feature Detection. It is asking Windows “Hey, so I’m looking for the address of this fancy new feature named FancyNewAPI. Do you know where that is?”. Windows will either reply “No, sorry” at which point you work around it, or “Yes, it’s over at address X” at which point to convert address X into a function pointer that takes the same number and types of arguments that the documentation said it takes and then instruct your program to jump into it and start executing.

We use this in Firefox to detect gamepad input modules, cancelable synchronous IO, display density measurements, and a whole bunch of graphics and media acceleration stuff.

And today (well, yesterday at this point) I learned about it. And now so have you.

:chutten

–edited to remove incorrect note that GetProcAddress started in WinXP– :aklotz noted that GetProcAddress has been around since ancient times, MSDN just periodically updates its “Minimum Supported Release” fields to drop older versions.