RSSAmplifier

Blog

Timo Tijhof

timotijhof.netRSS feed ↗24 posts

Latest posts

John Cleese on Creativity (Transcript)

The below is transcribed from a 1991 talk by John Cleese titled Creativity in Management. I encourage you to watch the 30-minute recording on YouTube. The delivery is hilarious with great comedic timing that my transcript can’t begin to do justice. I edited the transcript for brevity, and added headings and links. This speech was given by…

📎 Unifying Wikipedia mobile and desktop domains

Until now, when you visited a wiki (like en.wikipedia.org), the server responded in one of two ways: a desktop page, or a redirect to the equivalent mobile URL (like en.m.wikipedia.org). This mobile URL in turn served the mobile version of the page. All wikis now serve mobile page views on the canonical domain, instead of…

YouTube in a feed reader is… better?

Two months ago, I deleted my YouTube subscriptions. I now follow YouTube channels in my feed reader instead (I use the NetNewsWire app). How does that work? Is it better? How to follow a channel On desktop, or on the mobile site, copy from the addres bar when on any channel page, or from the…

Lockfiles for apps, not packages (still)

TL;DR: My updated take is Lockfiles for Node.js apps, not for other projects. When you run npm install, after you add or change a dependency in package.json, npm finds and selects the latest compatible version, downloads it, and replaces your package-lock.json file to describe what it found. The npm install command does not consider lockfiles…

How we balance security and openness at Wikimedia

How does an open philosophy jive with best practices in performance and security? In short, we’re selective in our dependencies and audit our own upstream sources. Progressive enhancement not only makes for a fast and accessible site, I argue it’s also the cheaper choice in the long run! Background The Wikimedia Foundation is the non-profit…

An Internet of PHP

Statistics and anecdotes about PHP at scale.

Browser adoption rates

For two years in 2020 and 2021, I shared Wikipedia’s worldwide browser statistics on Mastodon under #browserstats. They looked a little something like this: As the data includes the browser’s major version, I wondered whether I could use this to follow the adoption rate through each browser’s release cycle. The short answer is… Yes! Here…

HTTP/2 performance revisited

Deploying HTTP/2 support to the Wikimedia CDN significantly changed how browsers negotiate and transfer data during the page load process. We found regressions in performance during the transition and are sharing the lessons we learned. Hello, HTTP/2! In 2016, the Wikimedia Foundation deployed HTTP/2 (or “H2”) support to our CDN. At the time, we used…

How does Internet Archive know?

The Internet Archive discovers in real-time when WordPress blogs publish a new post, and when Wikipedia articles reference new sources. How does that work? Wikipedia Wikipedia, and its sister projects such as Wiktionary and Wikidata, run on the MediaWiki open-source software. One of its core features is “Recent changes”. This enables the Wikipedia community to…

📎 Krinkle Treasure Hunt

I miss the era of very Internet-y things, geocities-style scavenger hunts, with easter eggs and all. So, I devised a treasure hunt of my own! → Enter here

Profiling PHP in production at scale

At Wikipedia, we built an efficient sampling profiler for PHP, and use it to instrument live requests. The trace logs and flame graphs are powered by a simple setup that involves only free open-source software, and runs at low infrastructure cost. I’d like to demonstrate that profiling doesn’t have to be expensive, and can even…

📎 Interview on Uses This

Today, yours truly got to add his bit.

Should I substr(), substring(), or slice()?

What’s the deal with these string methods, and how are they different? String substr() str.substr(start[, length]) This method takes a start index, and optionally a number of characters to read from that start index with the default being to read until the end of the string. The start parameter may be a negative number, for…

Many dots, do not a query make

How a long sequence of dots allowed a regex to reach its internal stack limit. Premise Wikipedia’s production error logs were reporting an increase in app crashes from the search results page. The internal Logstash error report looked as follows: [RuntimeException] Cannot consume query at offset 0 (need to go to 7296) at mediawiki/…/CirrusSearch: QueryStringRegexParser->nextToken…

To throw or not to throw, that is the question

Why does software accept invalid data? And, at what software layer should we reject it? Also, what are “namespaces” and “special pages” on Wikipedia? Premise One day, our server monitoring was reporting a high frequency of fatal errors from web servers. Over 10,000 an hour. The majority shared a single root cause – The program…

Tomorrow, may be sooner than you think

These are short stories from bug hunts and incident investigations at Wikipedia. Impact After developers submit code to Gerrit, they eagerly await the result from Jenkins, an automated test runner. Every day during the 15 minute window before 5 PM in San Francisco, code changes submitted for code review would have mysteriously failing tests. Jenkins…

Missing partitions, disappearing audio players, and extreme packet loss

These are short stories from bug hunts and incident investigations at Wikipedia. New database partition A user reported a timeout error for certain queries from the Public log viewer on commons.wikimedia.org. Database administrator Manuel Aróstegui investigated the underlying query and found that it was slow (and timing out) due to one of the database replicas…

Wikipedia’s JavaScript initialisation on a budget

This week saw the conclusion of a project that I’ve been shepherding on and off since September of last year. The goal was for the initialisation of our asynchronous JavaScript pipeline (at the time, 36 kilobytes in size) to fit within a budget of 28 KB. The above graph shows the transfer size over time.…

How to protect yourself from npm

What’s the worst that could happen after npm install? When you open an app or execute a program from the terminal, that program can do anything that you can do. In a nutshell: Imagine if your computer were to disappear in front of your eyes and re-appear in front of mine. Still open. Still unlocked. What…

Six years of BrowseHappy

Six years ago (in 2012), I was looking for a newsletter about browser releases. At the time, my motivation was to remember to regularly check and update the jQuery TestSwarm framework as needed for each new browser release. I found a simple overview at browsehappy.com, run by WordPress. Lacking RSS, I decided to simply check…

Measuring Wikipedia page load times

This post shows how we measure and interpret load times on Wikipedia. It also explains what real-user metrics are, and how percentiles work. Navigation Timing When a browser loads a page, the page can include program code (JavaScript). This program will run inside the browser, alongside the page. This makes it possible for a page…

QUnit anti-patterns

Today, I’d like to challenge the assert.ok and assert.not* methods. I believe they may’ve become an anti-pattern. assert.ok Using assert.ok() indicates one of two problems: The former necessitates improvement to the code being tested. The latter comes with two additional caveats: Common examples: assert.not Using assert.not*() indicates one of three problems: Common example: I’ve yet…

PhantomJS for CI (anno 2014)

How did Apple create Safari, and what is PhantomJS? Safari In January 2003 Apple announced Safari, their new web browser for Mac. The Safari team had just spent 2002 building Safari atop KHTML and KJS, the KDE layout and javascript engines developed for Konqueror. The Safari team kept the codebase somewhat modular. This allowed Apple-branding…

The word “rebuke”

re·buke verb express sharp disapproval or criticism of (someone) because of their behavior or actions “she had rebuked him for drinking too much“ “the judge publicly rebuked the jury“ noun an expression of sharp disapproval or criticism “he hadn’t meant it as a rebuke, but Neil flinched“ (from the Oxford English Dictionary) I ran into the…