Online home of Jeremy Scheff

OffscreenCanvas pain points

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:


PWA Summit 2022 presentation

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:

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:

Streaming data from IndexedDB to a file with the File System Access API

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.


An 18 year old bug

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:


Porting Basketball GM to TypeScript

I'm gonna do that thing again where I link to a post on my Basketball GM blog that possbily is of broader interest.

Moving from Browserify to Rollup

I'm gonna do that thing again where I link to a post on my Basketball GM blog that possbily is of broader interest.


I made another mini project for no apparent reason. You can load one or many CSV files into a SQL database within your web browser (client side) and run SQL queries on them. In most situations it's not that useful (most databases already support importing CSVs without too much trouble), but it might save somebody some time in a pinch. And it's cool that things like this are even possible, purely client side.

Code is on GitHub.

My greatest technical accomplishment

Since this is my blog, it makes sense to talk about the greatest technical accomplishment of my life.

...except I already wrote a long blog post about it. Just not here, over on the Basketball GM blog.

TLDR: I got an order of magnitude performance improvement out of a mature piece of software, with no negative tradeoffs from an end user perspective.

Upgrading Prebid.js from 0.34 to 1.x when using the Index Exchange adapter

Over at Basketball GM, when I upgraded Prebid.js from 0.34 to 1.x, most of the bid adapters could just be easily copied over. Index Exchange was the one exception. For a while it wasn't availble at all on 1.x, but that changed with version 1.10.0, released a few weeks ago. However it requires some changes to your configuration to upgrade from 0.34 to 1.10+, and I found the documentation to be a bit lacking, so I wrote a blog post!


Side projects galore

God damn, I've been neglecting this blog. It's sad really, because I do have a lot to say. I guess I've just been talking to myself instead of blogging lately, which maybe says something about my mental stability, but whatever. I'm blogging now, and I'm going to blog the fuck out of this blog.

It's 2016. My job is pretty cool in some ways, but in some other ways it bothers me a great deal. It's probably not in my best interest to go into that in great detail here (as if anyone is reading this, right?) so I will leave the rest unsaid, and just get to the broader point. I am someone who cares a great deal about science, engineering, creating cool things, doing things the right way, etc. And when I say "cares a great deal" I mean probably more than I can adequately articulate with my pedestrian writing skills. It's almost like a spiritual thing. So for someone like me, what do you do when your day job is preventing you from attaining your desired level of spiritual satisfaction?

Side projects!


Older »