Git Forensics

Earlier today I was helping a coworker with a question about data related to block messages on mobile, like this:

Lol.

Screenshot of “your account has been blocked from editing Wikipedia” notice

— Katherine Maher, October 20, 2018

I did not anticipate my investigation to become what I might best describe as “git forensics”. First, let’s introduce our dramatis personae:

MobileFrontend
When you browse the mobile (“m.” subdomain) version of Wikipedia in a browser, what you see rendered is largely due to the MobileFrontend extension for MediaWiki (the software that powers Wikipedia, Wikimedia Commons, and Wikimedia projects).
Git
Git is a free and open source system for version control.
Phabricator
Phabricator is an open source toolkit for code review, repository hosting, bug tracking, and project management. If you’re familiar with Jira it’s kind of like that.

The story begins with the Phabricator task T260218 to “Add logging for measuring impact of our work on improving the mobile block messages.” The task mentions that this has been done in the past and links to a task from August 2018: T201719. What happened to that tracking? Is that data still available?

Using R to help my wife manage Sims screenshots

I grew up with The Sims and remember spending what is probably hundreds of hours of my childhood with that game, so it was a special feeling to share that with my wife and introduce her to The Sims 3 a few years ago.

Coming from Animal Crossing: Happy Home Designer, the expanded toolset for interior design (AND addition of architecture tools) hooked her, but she wasn't that into the non-building part of playing The Sims. It actually wasn't until last year when we got The Sims 4 (TS4) at a discount that she got into the full Sims experience, because TS4 is waaaaaaay better in every way (from building houses, to playing with your sims).

Replacing the knitr engine for Stan

2020-08-03 UPDATE: Good news! A version of this engine is now included in versions 0.1.1 and later of {CmdStanR}. Use cmdstanr::register_knitr_engine() at the top of the R Markdown document to register it as the engine for stan chunks. See the vignette R Markdown CmdStan Engine for examples. Shoutout to the maintainers Jonah Gabry & Rok Češnovar for a super positive code review experience with the pull request for this.

I originally dabbled with custom {knitr} engine creation last month, when I made {dotnet} which enables R Markdown users to write chunks with C# and F# programs in them.

Introducing ‘dotnet’ knitr engine for C# & F# chunks in R Markdown

I had a thought “wouldn’t it be cool to do a blog post about Bayesian inference with Infer.NET?” and then a follow-up thought “wouldn’t it be even cooler to have the probabilistic programs as R Markdown chunks that would be actually built/compiled and then run/executed just like Python and Julia chunks would be?”

And that’s how I ended up spending an evening learning how to make custom language engines for {knitr} and making one for C# and F# languages.

Strings in R 4.x vs 3.x (and earlier)

Among the several user-facing changes listed in R 4.0.0’s release notes was this point:

There is a new syntax for specifying raw character constants similar to the one used in C++: r"(...)" with ... any character sequence not containing the sequence )". This makes it easier to write strings that contain backslashes or both single and double quotes. For more details see ?Quotes.

To get a better sense of this (wonderful) feature addition, I thought it’d be useful to see some before/after examples.