Estimating π using the State monad in Scala In an attempt to better understand the State monad in Scala I wanted to do something practical with it. One thought that came to mind was a simple Monte Carlo simulation to estimate the constant π.

Linux /dev/urandom and concurrency Recently I was surprised to find out that a process that I expected to to complete in about 8 hours was still running after 20. Everything appeared to be operating normally. The load on the server was what we expected, IO was minimal, and the external services it was using were responding with latencies that were normal.

Seek to a position in an ordered relation using PostgreSQL I need to seek to a given position within a sorted relation to fetch an object and it’s neighbors. To get the sorted relation I also need to filter by categories and a status column and then assign a position to each tuple in the relation so that I can seek to the position that I want.