Caraway Soaker Sourdough Bread

What I like about old bread soakers is that they are a good way to get water into the bread and that I can recycle some old bread that I have left over. I based this bread on the Rauriser Weizensauerteigbrot from Plötzblog. I added a soaker using toasted slices from a previous attempt to make the Rauriser Weizensauerteigbrot. While preparing the soaker I remembered that I have caraway. My previous attempt to use caraway in a bread was a bit disappointing. »

Bagel Sourdough Bread

I wanted to toast a frozen bagel in the oven, but forgot it. The result was a bagel that was a bit too dark and dry. I decided to use it as a soaker for a rye/wheat bread. The result was a flavorful bread with compact crumb. Unfortunately, I only documented a part of the baking process. This recipe is a rough approximation of what I did.


Reversing a Linked List

Linked lists are an important data structure and also a popular source of interview questions. Few programmers will actually have to do a fully fledged linked list since most programming languages come with an implementation of it (usually of doubly linked lists). Nonetheless, understanding linked lists and other data structure will help you better understand runtime consequences of choosing one data structure over another. Reversing a linked list is a common task. »

Functional Java

With Java 8 the language got lambdas. This is a huge step towards allowing functional programming in Java and hence brings a fresh breeze. The language designers did not stop by simply providing lambdas but also extended the runtime API significantly to support lambdas and functional programming. What are lambdas? The Java Documentation for Lambda expressions gives a rather dry definition: “Lambda expressions let you express instances of single-method classes more compactly. »

Updating FreeBSD with ZFS Root File System

This weekend I wanted to update my FreeBSD box and saw that the ZFS tools fundamentally changed. The UPDATING file has a corresponding note: 20090520: Update ZFS to version 13. ZFS users will need to re-build and install both kernel and world simultaneously in order for the ZFS tools to work. Existing pools will continue to work without upgrade. If a pool is upgraded it will no longer be usable by older kernel revs. »

Equals != Equality

The other day, I read the article How to Write an Equality Method in Java. Which reminded me that I wanted to write an entry about equality in programming. I cannot hope to cover this topic adequately in a blog post. My goal is merely to show that equality is very hard and that we often have a sever misconception about it. Most programming languages give us several ways to check equality. »

duckprxy with javasist

I just released version 0.2 of duckprxy. It now comes with a duck proxy implementation that uses Javassist: JavassistDuckPrxy. Proxies created with JavassistDuckPrxy are not using runtime reflection, but dynamically created code that is compiled to byte code by Javassist. This should reduce the overhead to that of normal delegation, hence, very little. I did not do any performance tests yet, though. »

FreeBSD: Encrpyted ZFS Root with Geli

ZFS is supposed to support encryption, but it does not yet on FreeBSD. In a previous post I wrote about setting up ZFS on FreeBSD where the root file system uses UFS and the rest goes to logical ZFS volumes. This time I use geli to encrypt a disk partition and use ZFS for the root file system. I encountered a few problems which I’d like to document here. The FreeBSD Handbook section on encrypted disks show how to set up encrypted disks with geom or geli. »

Duck Typing for Java

Every now and then I need to implement some interface, but only one (or very few) methods of it. Usually I need something like this in test code, but it is useful elsewhere, too. The mocking libraries I have seen so far offer something similar, but not quite in the way I want to have it. I had the idea to use something like duck typing for it for a while now. »

The Visitor Pattern in Differen Languages

In this post I want to explore the usage of the visitor pattern in different programming languages. The goal is always to represent expression trees, i.e., to have the abstract syntax tree (AST) of an algebraic expression like 2 * 5 - 3. Let us start with a simple implementation in Java: import java.util.HashMap; import java.util.Map; public class ExpressionTree { public static interface Operator { int eval(int ... args); } public static Map<String, Operator> OPERATOR_MAP = new HashMap<String, Operator>(); static { OPERATOR_MAP. »