Don't use Actors for concurrency

Don't use actors for concurrency. Instead, use actors for state and use futures for concurrency.

A common practice I've seen in scala code is to use actors for concurrency. This is encouraged by Akka and a lot of writing about Scala, the documentation of which is highly actor-centric. I assert …

more ...

Scala Patterns - HasXIsX

It's often desirable to build wrappers around existing objects, implementing the same interface. As an example one can wrap a java.sql.Connection object with a wrapper that measures timing data (how long the underlying java.sql.Connection spent in blocking calls). In fact, it's often useful to build a …

more ...

Revenge Porn is the Price of a Free Society

Sorry to break into a non-programming rant. No python today.

Over the past week or so, there has been a small war within journalism. Charlotte Laws, a reporter, discovered that another reporter was writing about her daughter. Specifically this reporter (Hunter Moore) discovered, via dubious sources, compromising information about her …

more ...


How to measure a changing conversion rate (with python code)

As the owner of the spamblog http://www.iwishiwastaller.com, I've run into the following problem. I'm selling some height enhancing pills full of organic free range snake oil. I've come up with several different calls to action:

  • Tired of finding pants that fit? Click here for the solution.
  • Click …
more ...




Postgres NOTIFY for cache busting and more

"There are only two hard things in Computer Science: cache invalidation and naming things."

Phil Karlton

For those of using Postgres as a data store, cache invalidation has become significantly easier. Postgres has introduced the command NOTIFY which can be used to inform the cache of necessary invalidation.

The old …

more ...

Compound Aggregates in Hadoop/Scalding

Consider the following problem. I have an extremely large number of servers, each of which uploads their logs to a Hadoop cluster. Each line of the log file contains a server IP address, and represents a single message in Hadoop. I'm investigating a network intrusion. One of my network admins …

more ...