6 min read• January 25, 2018Binary search is an extremely useful and popular algorithm used for quickly searching in a sorted array. Binary search is even used by people in real… Algorithms Javascript

19 min read• January 24, 2018A binary heap is a simple data structure most often used for implementing priority queues. In a more general sense, a heap is a tree-based data… Algorithms Javascript

8 min read• January 23, 2018Having just implemented and tested a Fibonacci heap on a large dataset I thought I’d write up a bit about it, mostly so that I can reference this post… Algorithms

11 min read• January 18, 2018A Bloom filter is a simple yet powerful data structure. It allows you to answer the question have you seen this before? in a very fast and memory efficient way. Unlike a regular set, a Bloom filter only needs to store a few bits per item instead of storing the whole thing. Algorithms Javascript

19 min read• January 17, 2018A bit vector (also known as bit set or bit array) is a set data structure which uses only 1 bit per element. It answers the question is X in the set… Algorithms Javascript

8 min read• August 08, 2015We'll take a look at different ways of calculating fibonacci numbers in JavaScript. Starting from simple recursive implementation, followed by dynamic programming and an iterative approach. Algorithms Javascript

12 min read• May 09, 2020While trying to implement an animated number counter I stumbled upon an interesting issue with and not playing together nicely that lead down a… Javascript React

10 min read• May 04, 2020SSH tunneling is an extremely useful feature of SSH that is very often googled, but less often understood enough to use without a reference. In this… Ssh Linux

26 min read• May 03, 2020This post is a short guide to making your git usage a little more efficient. We’re not going to cover how git works in depth. Instead, we’ll look at… Git Linux

13 min read• February 01, 2018In this article we'll implement 2D collision handling using raycasts and axis-aligned bounding boxes. We'll also add jump mechanics and gravity to our previously developed game. Gamedev Javascript

9 min read• January 28, 2018As far as gamedev and HTML5 goes, there are tons of great game engines already out there. How do we pick the right one? Look at the number of stars on GitHub? The number of contributors? The number of published games? If you've looked at the previous articles on this blog, you probably know where this is heading (or read the title for that matter). We're going to write our own game engine first! Gamedev Javascript

7 min read• January 28, 2018Now that we have the game loop, we can build a small wrapper around the HTML5 Canvas API. We'll start with a simple tile based map where each tile is rendered as a colored rectangle. Gamedev Javascript

5 min read• November 16, 2014I’ve been using OS X as my main machine for quite a while now, mainly
because I got into Ruby development, and having a Mac is just the thing
you do… Linux

11 min read• August 10, 2014This article is a small introduction to
Parsec, the Haskell parser
combinator library for Haskell. We’ll use it to parse simple CSS file
such as the… Haskell

12 min read• August 06, 2014In the first article in the series about
lenses,
we’ve looked at the motivation behind the lens library, and we also
derived the basic type of . In… Haskell Lens

17 min read• July 30, 2014Before we can get into the more advanced topics on Lenses, it is
important to really understand both and , which
is the motivation behind this… Haskell

13 min read• July 22, 2014In this article we'll focus on building our own monad transformers. We'll start out with an example code and improve it by building a simple wrapper over IO (Maybe a). The following example is really simple, but I'm sure you can imagine doing something similar in your own application. The findById method is there just to simulate a database query that might not find a result. Haskell

16 min read• July 20, 2014Haskell is a purely functional language, which means there are no side-effects
and all variables are immutable. But as you probably know this isn’t… Haskell

19 min read• July 14, 2014This article is the first in the upcoming series that aims to explain the
Haskell’s library and the
ideas behind it in an approachable way. Don’t… Haskell Lens

6 min read• July 10, 2014I’ve received a lot of reactions to the previous blog post about Phantom
Types
over the past two days, which is why I’ve decided to summarize what I… Haskell

6 min read• July 08, 2014If you’ve been programming in a dynamic language, you’ve probably heard that
type systems can catch more errors before your application even gets run… Haskell

6 min read• June 23, 2014I’ve been a long time VIM user. I use it every day for all
of my work and side projects, writing blog posts, writing other
content, sometimes even for… Emacs

3 min read• May 15, 2014I’ve been trying many Haskell web frameworks over the past few weeks. I wrote
one small app with Simple, almost wrote another one with
Scotty. Then… Haskell

3 min read• May 04, 2014Having powerful tools like RSpec gives us so much power, that what was
once a nice suite of readable specs becomes a huge bunch of unreadable
mess… Ruby

4 min read• January 13, 2014I’ve been playing around with Light Table since the day its source code was released (even made a tiny Ruby plugin). First of all, Light Table is… Clojure

9 min read• December 08, 2018Eigenvalues and eigenvectors of a matrix tell us a lot about
the matrix. On the other hand, if we know our matrix is somehow
special (say symmetric… Linear algebra

9 min read• December 05, 2018Now that we’ve worked through the Dirichlet-Categorical model in quite a bit of detail
we can move onto document modeling. Let us begin with a very… Probability Bayesian

7 min read• December 04, 2018In the previous article we derived a maximum likelihood estimate (MLE) for the
parameters of a Multinomial distribution. This time
we’re going to… Probability Bayesian

3 min read• December 03, 2018In this short article we’ll derive the maximum likelihood estimate (MLE) of the
parameters of a Multinomial distribution. If you need a refresher on… Probability Bayesian

5 min read• December 01, 2018In the previous article we looked at the Beta-Bernoulli model. This time we’ll extend it to a model with
multiple possible outcomes. We’ll also take a… Probability Bayesian

5 min read• December 01, 2018The Beta distribution is a parametric distribution defined on the interval with two positive shape parameters, denoted and . Probably
the most… Probability Bayesian

7 min read• December 01, 2018The Gaussian distribution has many interesting properties, many of which make
it useful in various different applications. Before moving further, let… Probability

5 min read• November 29, 2018This article is a brief overview of conditional independence in graphical models, and the related d-separation. Let us begin with a definition. For… Graphical models

4 min read• November 24, 2018This post describes two approaches for deriving the Expected Lower Bound (ELBO) used in variational inference. Let us begin with a little bit of… Variational inference Probability Machine learning

4 min read• November 22, 2018Before we begin, let me just define a few terms: is the state at time . is the action performed at time . is the reward received at time . is the… Reinforcement learning

4 min read• July 01, 2018Compared to the previous article where we simply used vector derivatives we’ll now try to derive the formula for least squares simply by the… Linear algebra

5 min read• May 16, 2018This article is a draft and as such there might be typos and other inaccuracies. In this article we’ll derive the matrix inversion lemma, also known… Linear algebra

5 min read• April 24, 2018There are multiple ways one can arrive at the least squares solution to linear regression. I’ve always seen the one using orthogonality, but there is… Linear algebra

9 min read• May 30, 2017TensorFlow operations form a computation graph. And while for small examples you might be able to look at the code and immediately see what is going on, larger computation graphs might not be so obvious. Visualizing the graph can help both in diagnosing issues with the computation itself, but also in understanding how certain operations in TensorFlow work and how are things put together. Python Tensorflow Machine learning