Here, you will mainly find me writing about whatever interests me at the moment. Since I am a predictably simple man, most of my posts are about sports, science, and programming, with an occasional foray into politics if I'm really bored. My favorite posts include:
ChatGPT. Cool stuff, right? Very fun. Kind of scary too. That's the naive impression you get from playing around with it, or reading about other people's experiences. It's cute until the easily-confused chat bot says "I will not harm you unless you harm me first".
But can a fancy Markov chain actually be scary? I mean it's just predicting the next word, right?
I am working on a side project that makes heavy use of the Canvas API and I cam across OffscreenCanvas which seemed to have some compelling features. Wouldn't it be nice for performance to do all of my rendering in a web worker? Well I gave it a try, but wound up not going forward with it due to several reasons:
There are three major hypotheses for the origin of COVID:
Natural zoonosis - jump from animals to humans, such as at the Wuhan wet market
Lab leak of engineered virus - leak of an engineered virus at the Wuhan Institute of Virology (WIV) through gain-of-function research
Other WIV-related origin - non-engineered virus exposed to humans somehow through the activities of the WIV (such as a lab leak, or infecting someone out collecting samples for WIV in some bat cave)
#1 is the mainstream opinion, advocated by most prominent scientists and government officials.
#2 is treated by some as a conspiracy theory, but certainly seems like less of a crazy conspiracy theory than it did a couple years ago.
#3 is kind of mundane compared to #2, so maybe gets less attention, but IMHO it is very plausible.
Last week I gave a talk at PWA Summit 2022 which was a purely online conference. It was pretty fun. It was a lot of firsts for me:
First talk on a non-science topic
First talk at a programming conference
First talk at a virtual conference
First talk in many years!
The topic was client side storage in web apps, which was of course motivated by my work on Basketball GM and other games which store tons of data client side. It is frustrating how difficult that is, and how easy it is to experience data loss. But as I go over in my talk, there are at least some reasons to be optimistic for the future!
If you're interested in more, here are my slides and here is a video of my presentation:
I recently uploaded my wedding photos to Facebook. Why Facebook? Cause there are a lot of pictures with a lot of different people, and I remembered that Facebook has some nifty auto tagging feature that would save a lot of time.
And after uploading the photos, what I found was that... I really haven't uploaded photos in a long time. Apparently they made the auto tagging opt-in in 2019 (of course most users will never bother to opt in) and removed it completely in 2021. Why? The most concrete answer in that blog post is:
Why make these Covid posts? Isn't the Internet saturated with hot takes already? Am I really adding anything here?
I think the only reason for me to write about Covid is so I have a record to look back on what I thought at the time, which is kind of interesting for me, but maybe not so interesting for you :)
And what I think now is that the pandemic in the US is about over.
I was playing around with this for use in my video games but ended up not using any of it, at least for now. It's annoying when you learn a bunch of stuff and it ends up not being useful! So I figured I might as well write a blog post about it.
The goal here is to move data from IndexedDB to a file without reading all of the data into memory at once. If you are able to read your data into memory, you can create a blob and use URL.createObjectURL to download it to a file - but that's old news. This is about streaming.
The building blocks of this are two fairly new web APIs: the Streams API and the File System Access API. The File System Access API is currently only supported in recent versions of Chrome, but it's the only way to stream data to a file.
What about getting data out of IndexedDB? The IndexedDB API predates streams, so it has no built-in support for that. But it does have cursors, which allow you to iterate over data in your database, which is basically the same thing.
I got a fun email earlier today - a support request for literally the second piece of software I ever wrote, back in 2001 when I was a kid with a couple months of programming under my belt.
It's a click tracker that I called Click Manager. Pretty simple stuff - a Perl CGI script that counts how many times a link was clicked, storing the data in a flat file database.
Eventually I even added a nifty UI to view the stats. Check it out, in all its early 2000s glory:
There are two possible goals that a government might have when imposing lockdown. The first goal is to eradicate the disease. The second goal is to prevent overloading hospitals with tons of sick patients at the same time. This is the "flatten the curve" strategy, where the idea isn't really to prevent people from getting infected, but to spread out the infections over time.
Those two goals are pretty different. Eradicating the disease is much harder. It requires a much stricter lockdown, and it is much more difficult to achieve when the disease is widespread in the population. Flattening the curve is easier (not "easy", just "easier") because it requires a less strict lockdown.
Over at FiveThirtyEight there is a great article about why it's so hard to model the effects COVID-19. Basically their answer is that there are many factors that go into a model, but many of them are very uncertain, and many of them are also dynamic. For instance, what is the probability of transmission when an infected person interacts with a non-infected person? There's a lot of uncertainty in that estimate. But also, it's going to change over time. Particularly, as the pandemic worsens, people will likely do more social distancing and other mitigation strategies, resulting in a lower transmission rate.
Tricky stuff to predict precisely! But I think that's not quite the complete picture, and there's an even simpler and clearer explanation.