Software! Math! Data! The blog of R. Sean Bowman
The blog of R. Sean Bowman

Posts with tag “javascript”

November 11 2016

In distributed systems a process often needs to wait for more than one of its peers before completing some action. For example, we may send a request to 5 of our peers and require that we hear back from 3 of them before considering the action completed. Even when the distribution of round trip times for a single request is pretty simple, it’s not entirely clear what the distribution of the aggregate request will be. (To me, at least; maybe if you’re smart or know statistics well it’s simpler.) In any case, we can use a histogram to get an idea of the shape of the density function.

Read more...

August 13 2016

D3 is a Javascript library for creating charts, animations, and other visualizations. It’s awesome. One of its key features is the easy creation of a DOM heirarchy mirroring some data you’ve carefully constructed for the job. Here’s a way to create a hierarchy of elements where the elements in each level aren’t necessarily homogeneous. I used this to make a table with a header column, but I’m sure it has lots of uses.

Read more...

April 18 2016

I wanted a link checker for my site my new static site, and I couldn’t find one that used metalsmith or gulp. The closest thing I found was some code on stackoverflow, but even it had some problems. So, using that answer as a template, I wrote my own very simple but functional link checker. But is it even worth adding Gulp to the toolbelt? Spoiler: no. Gulp is crap, make does everything I need and more, and is easier and better. I stopped using Gulp.

Read more...

February 09 2016

I have been writing some Javascript lately, mostly in my free time. Don’t ask me how I got started – Javascript is not my favorite language, let’s say, and I don’t do a lot of web stuff these days. But it’s been interesting to check out the landscape. There are more “frameworks” than you can shake a stick at, the language itself is evolving pretty quickly, and there are lots of cool things you can do in the browser that weren’t available even a couple of years ago.

Read more...