Asanka Herath

Deriving the Poisson Distribution

Where does the Poisson Distribution come from? A little bit of research1 tells us that the distribution was originally introduced by Abraham de Moivre in 1710 in an article called “On the Measurement of Chance, or, on the Probability of Events in Games Depending Upon Fortuitous Chance” 2 (not the original title). A few steps that will get us there is laid out below. Let’s start with a simple “rate” problem.

#Math

Ten Years

It’s been ten years since I started at Google. The work anniversary fell on 6th of December. Ten years ago my wife and I made our way to Mountain View for my orientation; all excited for a brand new chapter in our lives. After spending a week in Mountain View / Palo Alto we both decided that California was not for us. But that’s beside the point. I was elated. This was pretty much everything I dreamt of as a kid growing up in Sri Lanka.

#Career

Visualizing Internet Users

What does 0.3%1 of internet users look like? As of this writing the global population hovers around 7.7 billion according to the World Population Clock 2. Screenshot from census.gov showing the world population clock. The International Telecommunications Union “estimates that at the end of 2019, 53.6 per cent of the global population, or 4.1 billion people, are using the internet.”3 Screenshot from itu.int showing historical internet usage numbers as a percentage of the world population So a 0.

#Engineering #Curiosity

Things You Can Do With Neovim and Vscode That You Can't Do With Neovim Alone

This is the third time I’ve tried in earnest to switch to VSCode from Vim (or Neovim in my case) for reasons not all of which are relevant to this post. But I love Vim style modal editing and I’ve grown accustomed to some features that aren’t present or not well emulated in VSCodeVim. Enter VSCode Neovim. I was intrigued by their claim to integrate Neovim instead of trying to emulate Vim.

#Tools #Vim

Why 'Strong Opinions Weakly Held'

Origins of the phrase The title of this blog is Strong Opinions, Weakly Held. The same concept shows up elsewhere are Strong Opinions Loosely Held. An eponymous essay by Paul Saffo in (2020) introduced the world to this concept. In his essay – which isn’t very long if you would like to read the whole thing yourself – he lays out the concept as follows: I have found that the fastest way to an effective forecast is often through a sequence of lousy forecasts.

#Meta

Names for Name Conventions

Names I’ve seen used to refer to naming conventions: snake_case, hacker_case, unix_hacker_style : Everything is lower case, though exceptions exist. E.g. HTTP_foo_bar. SCREAMING_SNAKE_CASE : Usually reserved for macros and constants. camelCase : The first letter is lowercase. PascalCase : The first letter is uppercase. kabob-case : Like snake_case, but uses dashes instead of underscores. Common for command-line options1, CSS styles, commands (e.g. git-receive-pack). While looking idly looking for details on this, I stumbled on this Medium post which is relevant.

#Engineering

How This Blog Works

How I put this site together and why.

#Meta

The Comcast Technician Problem

Given a set of tasks, incentives are often aligned towards dropping a task rather than allowing for perpetual accretion of delays.

#Math

Vim: Use Drop Not Edit, SBuffer Not Buffer

I’m going to assume you are a Vim user. Say you have a several windows open in Vim and you want to edit another file. Using :edit works if you want to open the file in the current window unconditionally. But that’s often not what you want. If you have the same file open in another window, then the most efficient and least disruptive thing to do is to switch to that window.

#Tools #Vim

Notes from Crash Course's Videos on Fact Checking Information You See On The Internet

Hank Green’s Crash Course YouTube channel has an excellent series about navigating digital information. It’s an excellent guide to how internet users could intelligently consume information they see on the internet. These are my (incomplete) notes from the series.

#Curiosity