Caching is hard in various ways. Whenever you’re caching things, you have to at least think of: Memory consumption Invalidation In this article, I want to show a flaw that often sneaks into custom cache implementations, making them inefficient for some execution paths. I’ve encountered this flaw in Eclipse, recently. What did Eclipse do wrong? … Continue reading A Common…
#bug
4 posts
14 Dec 2017
4 Mar 2015
Sometimes we give terrible advice. Like in that article about how to use Java 8 for a cached, functional approach to calculating fibonacci numbers. As Matthias, one of our readers, noticed in the comments, the proposed algorithm may just never halt. Consider the following program: It will run indefinitely at least on the following Java … Continue reading Avoid Recursion…
16 Jan 2015
A wise man once said: Anything that can possibly go wrong, does — Murphy Some programmers are wise men, thus a wise programmer once said: A good programmer is someone who looks both ways before crossing a one-way street. — Doug Linder In a perfect world, things work as expected and you may think that … Continue reading Infinite Loops.…
27 Jan 2014
Here is the story of a bug that I caused, found, and fixed recently. It is not particularly hard or tricky, and it didn’t take long to find and fix. Nevertheless, it did teach me some good lessons. The Bug … Continue reading →