HNHacker News
TopNewBestAskShowJobs

samwho

1,463 karma · joined June 25, 2011

I write interactive visualisations of programming topics at https://samwho.dev
submissionscomments
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
I got a good laugh out of this.
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
This should be fixed. Sorry about that.
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
This should be fixed.

I picked fonts that are present on a wide variety of systems without having to be downloaded on page load. I just forgot some CSS to make sure numbers looked distinct.

Fortunately someone sent me a PR with the right CSS.

samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
You’re welcome!
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
This matches my experience. This is a bit of fun but I’m hoping it has the positive side effect of making people more cautious about how they use Date.
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
I agree with this. I do think it’s an easy trap to fall into if you’re unfamiliar, and hopefully this quiz has made a whole wave of folks more familiar. :)
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
It me.
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
Yeah, as I understand it this isn’t backed by any spec. I decided to go with Node’s (v8’s) implementation for the quiz. Fun to see how much divergence there is!
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
I discovered the 0/“0” disparity in work this week for the first time. Then I tried “1” and “2” and knew there was fun to be had. :)
samwho··on New Date("wtf") – How well do you know JavaScript's Date class?
It very much is. I put the lil notice at the start that I verified the questions on a specific version of Node, with a specific timezone, because both things matter.
samwho··on Reservoir Sampling
Bartosz is a huge inspiration to me, you can likely tell that there are plenty of things he does in his post that I'm emulating in mine. It's maybe the best compliment you can give me to compare my work to his. Thank you.
samwho··on Reservoir Sampling
Doe’s bandana is my attempt at tasteful solidarity and support. Glad you noticed it!

I did consider a pause button for the logs but it felt too unsubtle, and distracts from the content of the post. You could argue the log messages are already distracting, but I really wanted my own take on “reticulating splines.”

You can read how the messages are constructed here: https://github.com/samwho/visualisations/blob/main/reservoir...

samwho··on Reservoir Sampling
Totally happy to do that! You’ll find where to contact me on my homepage. :)
samwho··on Reservoir Sampling
I appreciate the offer (and your contributions in the comments here!) but collaborations are very difficult for me atm. Most of the work I do on these posts I do when I can steal time away from other aspects of my life, which can sometimes take weeks. I wouldn’t be a dependable collaboration partner.
samwho··on Reservoir Sampling
I actually read that post on the alias method just the other day and was blown away. I think I’d like to try making a post on it. Wouldn’t be able to add anything that link hasn’t already said, but I think I can make it more accessible.
samwho··on Reservoir Sampling
I loved distill.pub. Usually didn’t fully grasp what the papers were about but they were beautiful and I usually got _something_ out of them.

Was very sad when they announced their hiatus. Made me nervous about the viability of this sort of content.

You may also enjoy https://pudding.cool.

samwho··on Reservoir Sampling
I hadn’t considered this, cool to know it works!
samwho··on Reservoir Sampling
You're welcome! I think it's a beautiful palette, and I think people have come to associate me with it now so I don't think I'll ever change.

I view all of my posts using the various colour blindness filters in the Chrome dev tools during development, to make sure I'm not using any ambiguous pairings. I'm glad that effort made you feel welcome and able to enjoy the content fully.

samwho··on Reservoir Sampling
That's the one! Thank you.
samwho··on Reservoir Sampling
My gut instinct is no. I certainly don't think I'd be able to derive this algorithm from first principles in a 60 minute whiteboarding interview, and I worked at Google for 4 years.
samwho··on Reservoir Sampling
Something no one seems to have realised yet is that the hero simulation at the top of the page is using reservoir sampling to colour 3 of the shapes black.
samwho··on Reservoir Sampling
Something I've considered writing about in the past is how sampling affects the shape of lines on graphs. Render the same underlying data with different sampling strategies and show how the resulting graph can look extremely different depending on the strategy used. I think it's an underappreciated thing a lot of people don't think about when looking at their observability tools.
samwho··on Reservoir Sampling
Recovering WoW addict. :)
samwho··on Reservoir Sampling
Good question. I'm not sure how suitable this would be to then do statistical analysis on what remains. You'd likely want to try and aggregate at source, so you're considering all data and then only sending up aggregates to save on space/bandwidth (if you were at the sort of scale that would require that).

The use-case I chose in the post was more focusing on protecting some centralised service while making sure when you do throw things away, you're not doing it in a way that creates blind-spots (e.g. you pick a rate limit of N per minute and your traffic is inherently bursty around the top of the minute and you never see logs for anything in the tail end of the minute.)

A fun recent use-case you might have seen was in https://onemillionchessboards.com. Nolen uses reservoir sampling to maintain a list of boards with recent activity. I believe he is in the process of doing a technical write-up that'll go into more detail.

samwho··on Reservoir Sampling
Thank you so much!

The dogs on the playing cards were commissioned just for this post. They’re all made by the wonderful https://www.andycarolan.com/.

The colour palette is the Wong palette that I learned about from https://davidmathlogic.com/colorblind/.

Oh, and you can pet the dogs. :)

samwho··on Reservoir Sampling
Hello! o/

I’m the author of this post. Happy to answer any questions, and love to get feedback.

The code for all of my posts can be found at https://github.com/samwho/visualisations and is MIT licensed, so you’re welcome to use it :)

samwho··on Consistent Hash Ring
Love this.
samwho··on Interactive article about heart arrhythmias
I was able to do it by clicking in a few places in quick succession evenly spread out.
samwho··on Interactive article about heart arrhythmias
Absolutely fantastic. Well done!
samwho··on IO Devices and Latency
Gosh, this is beautiful. Fantastic work, Ben. <3
← PreviousPage 4 of 10Next →