Plotting a time series heat map with Pandas

Heat maps communicate succinctly how the distribution of a value evolves over time. Performance metrics like latency or API response time often have a complicated multimodal distributions, and summarizing them in single values like mean or 90th percentile for a visualization makes many interesting events invisible. You need to look at histograms to see the …

The JVM ate my variable!

Consider this code: Object obj = new Object(); WeakReference<Object> ref = new WeakReference<Object>(obj); List<byte[]> filler = new LinkedList<byte[]>(); while (ref.get() != null) { filler.add(new byte[1000]); } System.out.println(“Filler size ” + filler.size()); When executed it should always run out of memory: ref.get() will not return null because the referenced object cannot be garbage collected. The local …

Crazy fast AJAX search suggest in CakePHP

The fastest AJAX call is the one that is never made. Network latency makes using AJAX applications like Google instant search, or even the common autocomplete field, feel like running in treacle*. Having the browser run to the server for more data every time the user pushes a key just doesn’t work well. Many times …