Writing functional code in Java

So, with the onslaught of java 8, I, like many, was happy to believe java was finally a functionally compliant language. This is only somewhat true. Unfortunately, breaking old habits die hard in a language that makes them easy. Why do we use mutable datatypes by default? Mutability is a performance improvement, and should be […]

Read More »

Logging context with Mapped Diagnostic Contexts

Since upgrading my log acquisition platform to be metadata-aware (it’s effectively syslog messages + log flume + “other stuff”), I’ve really started to take advantage of the message diagnostic context available with major logging frameworks for tracking a specific complex interaction. Below is an example of what I’m talking about: public void myThingIDo(String targetUser, UserPreferences […]

Read More »

The Bellman Equation

Back in college, I learned about a tool called the “Bellman Equation”. It’s very nice because it turns into a local calculation for each node, and you only need to know about your neighbors’ previous values. It’s parallelizable. (Do every node in parallel, sync, repeat, until convergence). The only gotcha for using a bellman equation […]

Read More »