Welcome to my blog!
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:
All my other posts are listed below, in chronological order. In addition to blog posts, you can read more about me and about some of my projects.
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.
I have a bit of time on my hands right now, so I figured I'd write up my current COVID-19 take. Not really because I think anyone cares. I mean, there are many better informed takes out there. I'm mostly writing this for myself, so I can look back on it and see how my perception has changed.
In late 2019, a few videos appeared online showing some Pete Buttigieg supporters doing a corny dance to Panic! at the Disco's "High Hopes". Here's one, and another, yet another, and still one more.
The rapid release of all those different videos suggested to me that this was not an isolated incident. Crazed Mayor Pete fans must be doing that lame dance all over the place!
I was excited to see more videos. But sadly that never happened. Those are still the only four Pete Buttigieg dance videos I have ever seen.
So what happened? Did Mayor Pete decide to crush the high hopes of his supporters by banning their fun little dance? Or are they still doing it, but with extreme levels of security to prevent further online ridicule?
Very important stuff here!
Take a look at a portion of a normal NCAA tournament bracket. This is one region, cut off at the sweet 16, with all the favorites filled in: