Planet DIKU

En samling af weblog-indlæg for datalogistuderende på DIKU

02. November, 2011

Christian Joergensen

Experiment: DuckDuckGo as default search engine for a week

Have people become irationally too used to Google search? I must admit, I haven't really considered using any alternative for the past many years. Especially since it has always been the default search provider of my primary web browser (Firefox, Chrome).

Inspired by a Reddit post, I will try to make up for my search engine ignorance and try out DuckDuckGo for a week (at least), and I dare you to do the same.

Some of the highlights of DuckDuckGo includes:

Here's instructions on how to change your default search provider of your favorite web browser.

af Christian Joergensen d. 02. November, 2011 22:42

21. October, 2011

Christian Joergensen

MIPS machines giveaway

Instead of having these machines stored somewhere where noone gets to play with them, I am now offering them to anyone who wants to come pick them up.

http://www.technobabble.dk/attachments/mips1.jpg http://www.technobabble.dk/attachments/mips2.jpg http://www.technobabble.dk/attachments/mips3.jpg

They are SGI Indy machines and you should be able to get Linux to boot on them. Get in touch with me if you want them. They will be scrapped within a month or so. You must be able to pick them up on Nørrebro in Copenhagen.

Fun fact: They make a drum rimshot at boot time and have a port for 3D goggles.

Update

The machines has been donated to the folks at labitat.dk

af Christian Joergensen d. 21. October, 2011 17:27

17. October, 2011

Christian Joergensen

Blogging software change

Having neglected my weblog a bit for the last couple of years, I felt something had to change. So I used the opportunity I got when the server hosting this site was going down and I had to move everything to a new server, to change the blogging software as well.

I'm now using blohg, which is a Mercurial backed blogging engine. That is, all content is read from a Mercurial repository and fed through a reStructedText parser. I needed to find a platform that would make me feel comfortable, and beeing a programmer, whats more natural than using my favorite editor and VCS for the purpose.

In order to facilitate the move, I needed to find a solution to blohg having a different URL structure than my old system, and I couldn't really come up with any good arguments as to why the old scheme was better than the new one, so I decided to go with the new and simple version. Now I needed a way of redirecting the readers from the old URL to the new one:

/<year>/<month>/<date>/<slug> => /post/<slug>/

To solve this problem I wrote a patch for blohg that quickly got accepted, and now blohg supports URL aliases trough an rst comment in your posts.

af Christian Joergensen d. 17. October, 2011 10:10

10. July, 2011

Henrik Stuart

My new cool baby

We have recently acquired an ice machine with a built-in compressor, and we are enjoying every little bit of ice cream it’s churning out.

One of the huge limiting factors of being allergic to dairy products is that, well, most ice creams are made with milk and/or whipping/double cream (granted, there are some products based on soy with an uncomfortably grainy feel, and a few made on oats, but you pretty much have to travel to another country to obtain these). So, time to experiment at home!

Ice machine

With dairy allergies there are a number of alternative choices when preparing ice cream. Rather than milk you can use water, rice drink, soy drink, or oat drink as some of the more readily available solutions. And instead of cream you can use soy or oat based “creams” (they are generally somewhat lower in fat content than cream so some experimentation has to be made). I usually rather dislike the grainy substance of soy, so I tend to favour the oat based products. I generally use Oatly’s oat-based cream for all my cream needs (it’s the only one that’s readily available in Denmark), but if you’re fortunate enough to be in Sweden, for instance, there are a lot of different oat based products available to you, also with higher fat concentration allowing you to stay closer to the milk-based recipes.

One of the seemingly rather north European traits is an unending love of liquorice, so why not combine the two: ice and liquorice. One of the very best liquorices on the Danish market is a handmade liquorice by Johan Bülow, and one of my favourites is his Habanero-chili-liquorice. (Non-liquorice-loving people can now experience true, physical pain when eating liquorice—unless, of course, you have a resistency toward Habanero-chili).

To extract enough flavour from the liquorice, I have sliced it very thinly.

Liquorice slices

This is then covered with a mix of oat based cream and water (to simulate the fat content of milk mixed with cream).

Liquorice cream

The cream and liquorice mixture is then simmered over low heat for at least 30 minutes, and if you have been using good, natural liquorice, then you will get something like this (after a bit of using an insertion blender; the liquorice pieces aren’t completely dissolved so they can still contribute with a bit of a texture/bite to the finished ice cream):

Liquorice cream after simmering

If you do not use natural liquorice, you will get a gray unappetiteful pot of goo, so don’t do that. In a separate bowl, whisk some egg yolks and sugar together, then, while whisking, slowly pour in the liquorice cream, then pour the entire thing back in the pot and simmer for another 5–10 minutes (until it has thickened). Then it goes into the refrigerator for at least 4 hours (until it has reached about 5°C).

Liquorice cream mix ready for churning

Depending on the freezing capabilities of your ice machine it will typically take 30–40 minutes to cool it to ice cream consistency that is ready for immediate consumption (otherwise place it in the freezer and take it out some 20 minutes before use).

Liquorice ice cream

This is a bit more than half a litre of liquorice ice cream that has finished churning.

Liquorice ice cream serving

Liquorice ice cream behaves rather like anise in what foods you can combine it with (anise also has a rather liquorice-y taste). So, typically, it will go wonderfully with strawberries and pineapple, just to name a few fruits.

The ice cream packs a good punch due to the Habanero chili, so this is definitely not a very kid-friendly ice cream, but if you love liquorice, chili and ice cream, this is a mix that cannot go wrong (unless you use poor liquorice, or mix it wrong, or…).

To save other dairy allergics from repeating a lot of experiments, then here is my simple recipe for an oat-based custard:

Chili-liquorice ice cream

  • 240 g oat-based cream
  • 240 g water
  • 56 g liquorice
  • 2 pasteurised egg yolks
  • 100 g sugar
  • pinch of salt

Combine cream, water and liquorice. Simmer for at least 30 minutes. Whisk yolks and sugar, gradually add cream mixture, pour back into pot and simmer for another 5–10 minutes until thickened. Add the pinch of salt and refrigerate for at least 4 hours. Churn in ice cream mixer. Enjoy.

If you’ve kept reading until the end, then it was ice of you to stay with me so long (I know, I know, I need to brush up on my ice puns, that one was absolutely chilling).

af Henrik Stuart d. 10. July, 2011 08:32

05. June, 2011

Henrik Stuart

New bread knife

I have recently acquired a new bread knife from Yaxell, a Ran knife, made from 69 layers of Damascus steel. It is a thing of beauty and it carves bread like a wooden knife cuts through soft butter, mmmm.

Yaxell Ran 23 cm bread knife

I normally score my breads using the bread knife and our old bread knife just wasn’t sufficiently sharp to create interesting patterns, but here and now this changes. Now with even more fancy patterns:

Bread

It carves beautifully and the crumb isn’t mashed together like our old knife had a tendency to do. Most of my previous crumb photos took several slices before I got to a slice where the crumb was sufficiently nice to look at.

Crumb

Disclaimer: I am not affiliated with Yaxell in any way. I just love my new knives.

af Henrik Stuart d. 05. June, 2011 17:17

14. November, 2010

Henrik Stuart

Sausage rolls

The typical sausage roll is made from puff pastry, wrapped around sausage meat, brushed with egg and baked. I simply cannot stand these!

When I think sausage roll, I think some nice bread rolled around a real, actual sausage, not just ‘sausage meat’ (whatever that is). So, I take some nice basic french dough bread recipe and let it preferment for about 3–4 hours, then when we get to shaping, I roll out the dough (very much like making croissants, really, just with a single layer of dough and no fats), place a sausage at the fat end of a slice of dough and roll it up into the typical croissant shape (translated literally, we call these ‘sausage horns’ in Danish).

Sausage rolls before baking

This is left to proof as normal, i.e. 1½–2 hours, and then baked at around 240°C for 10 minutes, then the oven is vented to let out steam, and finally they finish baking in another 10 or so minutes at 220°C.

Sausage rolls

And unlike my typical bread, these may be eaten hot. The taste of the sausage is typically a lot stronger than the flavour of the bread, so the added taste of actually letting the bread cool off completely isn’t really worth outlasting the temptation of eating them. And once you start eating them, you are hooked. I have yet to meet anyone who prefers the puff pastry versions to these. Bon appétit.

af Henrik Stuart d. 14. November, 2010 20:13

07. November, 2010

Henrik Stuart

Using GStreamer and PulseAudio to direct computer audio output to a Squeezebox

I’ve been a big fan of the Squeezebox system from long before Logitech purchased SlimDevices who originally made the device. I keep my music collection in FLAC format on my computer and can easily access it from my Squeezeboxes that play the music synchronised all over the house. As an added bonus, the Squeezebox also supports streaming a lot of different internet radio stations. What it doesn’t support, however, is playing arbitrary audio output from your computer. This might be handy if you’ve got access to a bunch of music through a Flash player and would like to make it available on your normal sound system.

Some plugins have been made to make SqueezeCenter, the management platform for the Squeezeboxes, support fetching audio from specific extra places, but the few that does that for Linux do not mesh very well with PulseAudio, the sound server that e.g. Ubuntu ships with by default. So rather than getting the music directly into SqueezeCenter, we can side-step the entire issue and just provide the audio output as an internet radio station that is only accessible from your local computer; this, the Squeezebox can quite easily play.

I have done this on Ubuntu 10.10, but any system using PulseAudio should be fairly analogous. You need a few prerequisites:

  • icecast2: Ogg vorbis and MP3 streaming server.
  • gstreamer0.10-pulseaudio: GStreamer plugin for PulseAudio.
  • gstreamer0.10-plugins-base: The base set of GStreamer plugins.
  • gstreamer0.10-plugins-good: A set of GStreamer plugins containing interface to icecast2.
  • gstreamer0.10-plugins-ugly-multiverse: A set of GStreamer plugins containing MP3 encoder.
  • gstreamer-tools: tools for use with GStreamer.
  • pavucontrol: PulseAudio Volume Control

Any standard configuration of the icecast2 server will probably do, as long as you can receive music from it and send feeds to it using the configured password you should be good.

First we tell PulseAudio that we have a sink we’d like to register: pactl load-module module-null-sink sink_name=squeezebox

Then we start playback with this easily understood and very apparent command line invocation: gst-launch pulsesrc device=squeezebox.monitor ! audioconvert ! lamemp3enc target=1 bitrate=128 cbr=true ! shout2send ip=127.0.0.1 port=8000 password=PASSWORD mount=mystream.mp3

If you live in parts of the software patent encumbered world, you can probably make it work with Ogg Vorbis instead.

You can now point your Squeezebox at a stream at http://127.0.0.1:8000/mystream.mp3, however, you still won’t have any sound! Why? I hear you pondering… Because above we simply said that we wanted the Squeezebox sink to be the null-sink, i.e. nothing goes on there apart from a timer keeping stuff in sync. In order to hear anything we’ll start up pavucontrol, the PulseAudio Volume Control program and in the Recording tab, we ask it to show all streams and we should be able to see a stream called gst-launch-0.10 and a button next to it that says ‘Monitor of null output’, click this button and select ‘Monitor of your sound card’ and presto, music should appear from your Squeezebox after it’s done buffering (provided, of course, that you are playing something on your computer at the moment).

Just be aware that this plays all audio output from your machine, but it isn’t terribly adequate for watching videos, etc. as there is a noticeable delay between what goes on in the video and when the music appears on the Squeezebox, but for streaming music, it’s perfect.

af Henrik Stuart d. 07. November, 2010 17:56

05. November, 2010

Henrik Stuart

Chocolate-covered marshmallow treats

While many forms of candy are rather ubiquitous in Denmark, a lot of chocolate-covered marshmallow treats are produced here every day. The Danish factory, Elvirasminde, produces between 1 and 2 million chocolate-covered marshmallow treats daily to the entire world. There are also several high profile confectioners making exclusive chocolate-covered marshmallow treats with better forms of chocolate, specialised marshmallow filling, marzipan bottoms, and all kinds of other variations on the theme.

While Wikipedia currently attributes the creation of chocolate-covered marshmallow treats to Denmark (by way of a now defunct reference to Jerusalem Post…), it is more likely that they were invented in Switzerland or Austria, but the exact origin seems lost in the mists of time. Nevertheless, that shan’t keep me from having a go at making them. Since making marshmallows was rather easy, I figured these treats should be run-of-the-mill to make quickly before guests arrived, but, of course, that was not so.

Marzipan in snow

To create these beauties, we start with a good chunk of marzipan and roll it out in confectioner’s sugar and cut out small circles of them.

Marzipan bottoms

These are then dipped in chocolate. Most confectioners only dip the bottom in chocolate, but I find it gives a more wholesome experience if the bottom is entirely surrounded by chocolate, provided, of course, that you use a good chocolate.

Coated marzipan bottoms

Leave in a cool place to set and get to work on the marshmallow interior. While a plain white marshmallow is typical as the interior, I wanted to add a bit of colour and taste to it, so I took out some frozen berries and cooked them with some water.

Forest berries

This gives a lovely dark red liquid that tastes of all the berries, this is mixed together with some sugar and cooked up to 117°C.

Purple sugar syrup

Remove from the heat and slowly add wet gelatine plates.

Gelatine tower

Who says you ever get too old to build card houses…

Slowly drizzle the sugar syrup into beaten egg whites and beat another 8–10 minutes.

Purple marshmallow

This is then, supposedly, ready to be piped unto the chocolate coated marzipan bottoms, or so I thought, but it ran everywhere, so before damaging everything, I allowed it to cool a while in the fridge, albeit not enough.

Chocolate-covered marshmallow treat

I sort of managed to contain the runniness, but it isn’t as perfect as normal chocolate-covered marshmallow treats. So, given the lack of height, I call these… rustic chocolate-covered marshmallow treats. The smaller amount of marshmallow interior actually allows the chocolate and marzipan to contribute with more flavour than usual, not giving the exceedingly sweet marshmallow a chance to overpower it, and you could still pick up a very slight hint of forest berries, but most of the purple colour was lost after the whipping. Adding a bit of extra red fruit colouring while whipping would probably have made it somewhat more spectacular.

Chocolate-covered marshmallow treat inside

Normal, store-bought chocolate-covered marshmallow treats can be eaten rapidly, allowing you to easily consume 5–6 in a fairly short timespan, but even if you’re an experienced sweets eater, the dark chocolate, the marzipan and the rich marshmallow interior allows you to at most eat two of these, smaller marshmallow treats. And, apart from their rustic appearance, they were delectable, if I have to say so myself.

af Henrik Stuart d. 05. November, 2010 11:39

30. October, 2010

Henrik Stuart

Marshmallows

Home made candy will usually always be better than the store bought variant (granted, home made candy can be abysmally botched as well, but with a bit of effort and control it is usually better). In particular the marshmallow, which from the store is kinda dry and mushy will, when fresh, be dry on the outside, but creamy and luscious on the inside. And when it comes to candy it’s practically one of the easiest candies to make.

A lovely mix of 500 grams of sugar and 100 grams of water is brought up to 122°C and once it’s removed from the heat you add in 10 leaves of dissolved gelatine (be sure to add the leaves slowly as they will make the sugar syrup foam up, but not dangerously so).

Marshmallow sugar mass

As the sugar syrup makes it up to that, you start whipping 120 grams of pasteurised egg whites (you could just go for plain egg whites, but they’re only heated by the sugar syrup and I’m not a betting man when it comes to salmonella—plus there’s less to fuss about when young children are handling eggs). When they’re nice and fluffy, you start pouring in the sugar syrup ever so slow. This is really a time where a stand mixer is a great benefit as the mass needs to be beaten for more than ten minutes.

Pouring melted sugar into whipped egg whites

After all the sugar syrup has been poured into the egg whites, you leave the mixer to do its thing for another 10 or so minutes, and then it’s ready to pour into a 30×20 cm shape. Be sure to dust the paper/dish with copious amounts of sifted confectioner’s sugar, this is what keeps marshmallows from sticking to everything.

Pouring marshmallows into shape

Leave them in a cool place, though not cold, for some hours, and they’re ready for slaughter…

Cutting set marshmallows

Dust each marshmallow in a nice bit of sifted confectioner’s sugar and lightly dust away the worst excess.

Copiously sugar-powdered marshmallows

And voilà, you have home made marshmallow treats. A lot more rich, and a lot more tasty than the ones that are store bought. But beware, it’s impossible to eat up an entire portion all to yourself, so make sure you have friends over to share them with.

af Henrik Stuart d. 30. October, 2010 07:35

24. October, 2010

Henrik Stuart

Just plain bread

Once in a while I find myself in the rather annoying situation of waking up and realising that we are out of bread, there’s no real good alternative for lunch, there is no poolish ready for use, and the stand mixer is in the dishwasher and not at all ready for use. At that point, I could, of course, do a bunch of kneading myself, but that gets rather gooey and unwieldy with the highly hydrated doughs I prefer to make, so, enter the no-knead process…

The basic process is this: mix everything and incorporate the ingredients, then walk away from it for a while. You could just leave it like this for a good 16–18 hours and the dough will magically have kneaded itself, but from waking up until lunch, 16 hours seems a bit unrealistic. Instead, you can gradually strengthen the gluten strands by folding the bread, say, every 30–40 minutes or so for 2–3 hours. After that, we can shape the bread, let the loaf proof for about five quarters of an hour, then stuff it into the oven at a good 240°C for 30–35 minutes, and finally let it cool completely before slicing the bread. That last part is usually the most difficult part of them all, but like a good roast, you will not get a full, rich flavour unless you let it rest (unfortunately bread usually takes more than 20 minutes to rest, it’s more like 40–60 minutes).

Just plain bread

That is what 500 g flour, 10 g salt, 14 g fresh yeast, and 360 g of water will give you when folded every 30 minutes for 2½ hours, and otherwise following the procedure above.

Just plain bread inside

A lovely creamy crumb, and a wafer-thin, flaky crust. In a professional bakery, the ovens are able to take in water and turn into steam in certain intervals inside the oven, which keeps the bread moist and prevents the crust from forming prematurely—home bakers are, typically, not as fortunate, so we have to make do with alternative methods of getting those thin crusts. A lot has been written on the topic: people throw in ice cubes when they load the loaves, they put in wet towels that give off steam, they put a pan of cold water below the plate with the breads on, etc., etc.; In my opinion, this is all much too much work (plus the ice cube thing might damage the oven, crack the glass in the oven front and whatnot, plus it interferes with the bottom heat for my baking stone). Instead, I take some cold water from the tap, and place it in the cup of my hand and slowly drizzle it across the unbaked loaves between my fingers, then bake it just like that. This, of course, keeps me from doing fancy flour-patterns on top of the bread, but I didn’t really plan on doing those in the first place.

At any rate, for a fairly quick bread (yes, my quick breads take in the vicinity of 6 hours), it has a nice taste, but not as pronounced a taste of wheat as the 12+ hour breads do. But, at least, there was bread for lunch.

af Henrik Stuart d. 24. October, 2010 08:03

09. October, 2010

Henrik Stuart

Forest berry slices

There is this small cake that is a staple at almost any Danish bakery, the raspberry slice. While it is small and not terribly fancy compared to a lot of other cakes, it has a rather religious following of people who simply cannot do without it. At the basic level it’s two thin layers of baked shortcrust pastry on top of each other, separated with a layer of raspberry jam and decorated with layer of glacé icing and hundreds and thousands. But for some reason, a bite of this unseemly cake can compete with a lot of fancier cakes.

So, it is on shaking ground that I break with dogma and not only replace the raspberry jam with forest berry jam (we were out of raspberries, sorry!), and use margarine instead of butter (so us poor lactose intolerant people won’t suffer the worse, apart from gaining weight). Of course, we didn’t really have any jam at all, so we had to make that first from a blend of forest berries that we had in our freezer, along with some fresh Danish apples to provide thickening.

Forest berry jam base

Allow to cook in with a smidgen of sugar.

Forest berry jam progress

Once that’s reduced a lot more, we can apply it to the baked shortcrust pastry slices.

Baked slices

And now, with jam, glacé icing and hundreds and thousands ready, just smear, smear, smear (carefully, though, so the slices don’t break apart).

Jam and icing

Once the jam is applied on two of the slices, the remaining two are carefully placed on top. If you are wondering, this is what too much jam between the layers looks like.

Folded slices

So, just add the glacé icing and the hundreds and thousands, carefully cut into mouth-sized bites (provided you have extremely large mouths).

Finished slices with icing and hundres and thousands

You can see how the jam is spilling out a tad too much. But even if we broke dogma, they had that raspberry slice feel and taste to it that is always great to bite into. Our daughter applied the hundreds and thousands; according to dogma, they should only be placed in a small but generous strip in the centre of the slice, but that was a bit too much to explain to a two year old who got to sprinkle them across the slices (I know, it’s almost sacrilegious).

af Henrik Stuart d. 09. October, 2010 19:38

02. October, 2010

Henrik Stuart

Honey top cupcakes

Time passes quickly and life with a two year old doesn’t leave much time for anything much, least of all blogging, so these pages have seen little love for a good long while now. In fact, baking has been this hurried event where I’ve started using the same one or two recipes over and over again for bread, which makes for rather boring blog posts, to be honest.

Today when my daughter woke up from her midday sleep, she resolutely pointed to one of my baking books, flipped around for a short while then resolutely pointed to a recipe for honey top cupcakes and making them could only go too slow (she was trying to get her apron fastened almost before we managed to get into the kitchen).

With such a scrumptious base, how can you go wrong? In case you wonder, we like to bake—probably also more than is good for us, but that is another story—so we have a decent stock of cupcake forms, here nicely added to our metal form to lessen the clean-up mess.

Our daughter diligently helped mix flour, spices, egg, wheat-based cream and the sugar-honey-margarine base above into a coherent dough that we (more or less successfully) managed to move into the forms.

This just leaves a bit of baking to be done for a while.

And, of course, no cupcake is complete without some form of icing. A nice lemon icing with red fruit colour. Nothing too pompous so our darling daughter won’t die of sugar shock.

It’s awesome to be baking the whole family together, in case anyone should be wondering.

With cinnamon, ginger and ground clove these cupcakes taste very Christmasy (basically the same things we stuff into our Christmas cookies over here). So, with a chance of beating even the store advertisements… have yourself a merry little Christmas.

af Henrik Stuart d. 02. October, 2010 19:12

17. April, 2010

Henrik Stuart

Highly hydrated doughs

Since the time I started baking I have read copious amounts of information on baking, primarily perusing titles from master bakers here and there, and some successful owners of bakeries in Denmark, Sweden and the United States. Some give good advice, others not so good, but the main thing I’ve taken away from having read all this is… it’s food, experiment and find something you like (though do be accurate about what you do so you can recreate it).

In some peoples’ opinion (and mine too for that matter), you should try to master the plain bread before you start adding all sorts of extra things to it. In a basic bread there are four ingredients: flour, water, salt, and yeast (or sourdough). That is it. No seeds, no additives, no lard, no herbs. Just four plain ingredients. I use organic flour and Maldon sea salt, mainly because I do not fancy eating flour with all kinds of remnants of artificial fertilisers, and Maldon sea salt because I like their salt taste the best (but do try a bunch of different salts and find the one you like best).

The amount of flour you put into this thing mainly controls how much bread you will have once the process is done (this is an over-simplification, each ingredient influences the final outcome in a lot of surprising and complex ways, so take the following with a grain of salt), the amount of salt will control the taste (and to some degree how well the gluten strands develop), and the yeast will control how quickly the fermentation process will happen (more yeast, faster bread and less taste, less yeast, slower bread and more taste), and finally there is the water. This is usually the ingredient you turn up and down to control the handling characteristics of the bread. The lower water rate, the more manageable the dough is, the higher it is, the more you will feel like you’re battling some sticky monster from hell as you try to shape everything up into loaves of bread.

So for a while I have been giving the breads very low amounts of yeast (around 1–5 grams), rather long time to ferment (from 5 to 18 hours depending on how busy our daily schedule is), and very high amounts of water (around 90% the weight of the flour) a try. This has given me a very open and creamy crumb with a soft crust the first few hours after baking, which hardens into a denser crust after 6–12 hours and a superb taste. In order for such a wet dough to stick together, it is necessary for the gluten to be able to keep it all together, which is what the long fermentation will help you achieve. For a brief few illustrations I have taken some photos of a 5 hour fermentation followed by 10 hours retardation (placing the dough in the fridge).

gluten strands

The lighting is a tad shoddy. It is surprisingly difficult to pour dough, handle a camera and get the lighting just right around 7 am after having stumbled out of bed. There is some nice gluten strands here, but without the retardation they are typically longer and tougher. You can tell how strong they are by how long they can get before they snap if you pull at the dough.

Next, there are more fun ways to influence the result of your bread: how you bake it. With steam? without steam? at what temperature? for how long? I usually pour a bit of water over the loaves just before I put them in the oven, which will create enough steam to keep the crust from setting too quickly. Since the dough is highly hydrated, the loaves need to bake for a good while (usually around 40 minutes in my oven), and I start out at the high end of the temperature range at 250°C for 15 minutes, then I vent the oven (open the hatch for a few seconds to let out the steam), then I finish baking over the next 25 minutes, slowly reducing the heat once in a while to keep the crust from scorching.

creamy crumb

After baking, you will have a nice, creamy, open crumb and a wafer thin crust that flakes like it does with plain bread from a good bakery. Flour, water, salt, and yeast. That is it.

af Henrik Stuart d. 17. April, 2010 13:00

09. April, 2010

Henrik Stuart

X.509 certificates and Mercurial

As one of the primary developers touching certificates in the Mercurial world, I am often asked how they work, what people need to do to use them and how they can work well with Mercurial.

A principal thing to remember here is that Mercurial will not work as a complete server out of the box, requesting authentication information, in the form of basic, digest, or certificates, at all. This means that in order to use X.509 certificates with Mercurial, one needs to place a web server that knows of these authentication mechanisms in front of it.

This guide is written at the existence of Mercurial version 1.5.1 and touches on many newer features, so if your distribution is old or lacks these features, perhaps it’s time to upgrade to the latest and greatest.

X.509 certificates and SSL/TLS

The most commonly known aspect of X.509 are the certificates. At some level, one can think of a X.509 certificate as having a public and a private key. The public key is the one that secure websites present to you when you, for instance, visit Gmail. You can encrypt data to the intended recipient using this key and only with the corresponding private key can this information be decrypted. In reality, the actual public/private key pair is only used to compute a shared secret, and this is the secret used to communicate securely for the remainder of the conversation.

A X.509 certificate is issued by a certificate authority—some of the commonly known certificate authorities, i.e. that are trusted by a lot of people, can be seen in your browser’s certificate settings—however, a certificate authority can be anybody you trust, e.g. yourself. This certificate authority can then issue server certificates (that represent a server’s identity), and client certificates (that represent a client’s identity). As long as you control the ecosystem of your environment, e.g. you know who your clients are, they know who you are, there is no reason to give out money to some third-party certificate authority, you can accomplish everything you need to on your own.

In order to become your own certificate authority and certificate issuer, you need one of two tools: OpenSSL or makecert.exe, the latter only being available on Windows (there are probably countless other tools as well, to be fair, but I do not cover them here). Below I will cover how to use each of these to set up everything, but before we delve into the details, we will look very briefly at what a certificate authority certificate is, and what ‘normal’ certificates are.

Certificate authority: A certificate authority is basically just a certificate that has signed itself. If you trust this certificate’s public key, you will also trust any certificate that has been issued by this certificate authority.

Normal certificates: A normal certificate is just a certificate that has been signed by a certificate authority (or in reality a certificate authority or an intermediate certificate—you can have a full chain of certificates signing each other if needed).

Now, there are a lot of weird details in these certificates. You may hear terms thrown around such as OU (Organisational Units) and whatnot. The only important part for our purposes is the CN (Common Name). This is the name of the certificate holder, e.g. the server’s name, or the user’s name. So if you access your server as ‘hg.my.cool.server’, your server certificate’s CN must be ‘hg.my.cool.server’.

OpenSSL

Like everything else in the X.509 certificate landscape, OpenSSL has a lot of options, switches and strange voodoo attached to it. Lest this post be turned into a really boring tutorial on certificates, I will just give a few very cursory examples of how you can generate the different certificates. There are plenty of different tutorials on this topic already. Note that Microsoft’s IIS is a tad weird in how exactly it requires the certificate to be constructed, so we will not cover this for OpenSSL, but only for makecert.exe (inquiring minds can figure out all the details of generating certificate requests and processing these in OpenSSL if they prefer).

  • Certificate authority: openssl req -x509 -nodes -days 365 -subj '/CN=MyCA' -newkey rsa:1024 -keyout ca.key -out ca.pem

    The ‘MyCA’ part specifies the name of your certificate authority, so you will probably want to name it something a bit more descriptive.

    This gives us a certificate authority certificate with a private key stored in ca.key and the public certificate in ca.pem. You will need both of these to issue other certificates. Also, if you do not want to get scary pop-ups with invalid certificate trust models in your browser when you browse the hg repositories through hgweb, you will need to install ca.pem into the trusted root certificate authorities in your browsers.

  • Normal certificates:
    • Generate request for signing: openssl req -new -nodes -out name-req.pem -keyout name.key -subj '/CN=name'

      You should, of course, replace name with something more sensible, e.g. your server’s fully qualified domain name (the one people will be entering in their browser to visit it).

    • Signing the request: openssl x509 -req -in name-req.pem -CA ca.pem -CAkey ca.key -out name.pem -CAcreateserial

    Do note that this is the quick-and-dirty way of generating certificates for use in testing/simpler controlled production scenarios. There are a lot more advanced features (like openssl ca) that will allow you to act more like a real certificate authority. If you need these things, go look up some OpenSSL tutorials, then come back here to see how things work with Mercurial.

    The final issue is getting these certificates into a form that your browser will like. They require the certificate to be in a special format, e.g. PKCS#12. To get that we use the openssl tool again like this: openssl pkcs12 -export -in name.pem -inkey name.key -out name.pfx. This file can be imported into your browser in a fitting place.

makecert.exe

makecert.exe is a bit of a different beast from openssl as it interfaces directly with the machine’s or user’s certificate store (the special place where certificates live a happy life in Windows).

  • Certificate authority: makecert.exe -pe -r -ss My -m 12 -n "CN=MyCA"

    This will install the root certificate into the current user’s personal certificate store and mark the private key exportable. To see the current user’s certificate store, run certmgr.msc.

    The certificate’s public key will need to be exported and subsequently imported into the ‘Trusted Root Certification Authorities’ on each machine that trusts this certificate to issue other certificates.

  • Server certificate: makecert.exe -pe -is My -in "MyCA" -n "CN=name" -sky exchange -ss My -sr LocalMachine -m 12 -eku 1.3.6.1.5.5.7.3.1 -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

    Do note that this certificate is imported into the local machine’s personal certificate store—this is where IIS expects to find server certificates. To see these certificates, start mmc manually and add the certificate snap-in.

  • Client certificate: makecert.exe -pe -is My -in "MyCA" -n "CN=name" -sky exchange -ss My -m 12 -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12

If the client and server certificates aren’t generated on the machines you need them on, you need to select the certificate in the management snap-in and export it, including the private key. Exporting as PKCS#12 is usually the safest bet.

This should basically cover how we get the actual certificates. Now, to use them.

Configuring a web server to use certificates

There are countless web servers and operating systems to run them on. I will give a very brief guide to running it on two of the most archetypical web server/operating system combinations: Apache 2.2 on Linux (Ubuntu), and IIS7 on Windows Server 2008. In particular, I will assume that you have already got Mercurial running and working just fine on both web servers.

Apache 2.2 on Linux (Ubuntu)

Setting up apache with mod_ssl can be done in a multitude of ways, I’ll just presume you have enabled mod_ssl already and show how to create a really, really skeleton version of a SSL site that serves Mercurial repositories. We will set up a server that serves a few Mercurial repositories using hgwebdir, from the root of the website, and we’ll only define a virtual host for listening on port 443.

Server certificates

The main configuration is as follows:

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /path/to/myserver.pem
  SSLCertificateKeyFile /path/to/myserver.key
  SSLCACertificateFile /path/to/ca.pem
  SSLCACertificatePath /path/to

  ScriptAliasMatch ^(.*) /path/to/hgwebdir.cgi$1
</VirtualHost>

Do note that if you have cloned the Mercurial repository, you should copy hgwebdir.cgi to a different location and make it executable. Furthermore, see HgWebDirStepByStep for further instructions.

This simple solution serves our self-issued server certificate when we access our website using TLS/SSL.

Client certificates

Client certificates do not require much more than that:

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /path/to/myserver.pem
  SSLCertificateKeyFile /path/to/myserver.key
  SSLCACertificateFile /path/to/ca.pem
  SSLCACertificatePath /path/to
  SSLVerifyClient require

  ScriptAliasMatch ^(.*) /path/to/hgwebdir.cgi$1
</VirtualHost>

This allows anyone with a validating certificate to connect, but no other checks are made. In order to restrict which certificates can be used to connect to the server, we can use the built-in fake authentication mechanism of mod_ssl’s.

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /path/to/myserver.pem
  SSLCertificateKeyFile /path/to/myserver.key
  SSLCACertificateFile /path/to/ca.pem
  SSLCACertificatePath /path/to
  SSLVerifyClient require

  <Location />
    SSLRequireSSL
    SSLOptions +FakeBasicAuth
    AuthName "FakeBasicAuth"
    AuthType Basic
    AuthUserFile /path/to/httpd.passwd
    require valid-user
  </Location>

  ScriptAliasMatch ^(.*) /path/to/hgwebdir.cgi$1
</VirtualHost>

The fake basic auth basically means that we will create a file, httpd.passwd that contains the certificate subjects as usernames and password in its hashed form as password. Then mod_ssl takes care of verifying that the certificate is in this file before allowing it to access the remote location. To get the certificate subject to use as username, you can use openssl to get it: openssl x509 -subject -in name.pem. So for our simple client certificate example above, we would have a httpd.passwd file with the following contents:

/CN=name:xxj31ZMTZzkVA

The xxj31ZMTZzkVA part is password that has been hashed. Usually, if you’ve bought your certificate from a real certificate authority, your certificate will also contain country, organisation, and a host of other fancy things. You can also get these by embellishing the subject when you generate the certificate request, thus a real ‘username’ for a certificate might be /C=US/O=My fancy company/OU=West coast offices/CN=John Doe, but for our simple explanation purposes they merely detract from the message.

This is all it takes to set up client certificate authentication and authorization on Apache.

Internet Information Server 7 (Windows Server 2008)

Server certificates

The server certificate part is easy. Make sure the certificate is installed in the local machine’s personal certificate store, then add a HTTPS-binding to the site you want to host and select the relevant certificate in the drop-down list. That’s it.

Client certificates

Under SSL settings, set that the site requires SSL and that client certificates are required (few systems really work well with the optional part). This is the easy part. The hard part is that after IIS6, Microsoft has decided to drop the interface management UI for mapping certificates to Windows accounts completely, so we will have to do all this in an XML configuration file, and change some system XML-files and whatnot to get everything working.

The first file we need to edit is %SystemRoot%\system32\inetsrv\config\applicationHost.config where we need to find a line like this: <section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Deny"> and change the Deny to Allow. This will allow us to configure this setting in the root of each website that your server is hosting. (If you have users who have write access to the file system, then they will also be able to override the setting for their virtual directories; it is up to you to figure out whether this poses a security risk for you).

In the root directory of your website, edit (or create) the file web.config that we can use to configure IIS7 (and ASP.NET for that matter, but that’s probably not terribly relevant here). For each user we want to grant access we want the certificate’s public key in PEM-encoded format (that is Base-64 in Microsoft parlance), formatted as a single string (i.e., you remove the newlines from the text-file and copy-paste the contents of the certificate, excluding the first and last line with the dashes). Below is a brief snippet that illustrates this:

<?xml version="1.0"?>
<configuration>
  <system.webServer>
    <security>
      <authentication>
        <iisClientCertificateMappingAuthentication enabled="true"
            oneToOneCertificateMappingsEnabled="true">
          <oneToOneMappings>
            <add userName="testuser1" password="test" certificate="CERTIFICATE_STRING" />
          </oneToOneMappings>
        </iisClientCertificateMappingAuthentication>
      </authentication>
    </security>
  </system.webServer>
</configuration>

Now we have told IIS that the user with the certificate CERTIFICATE_STRING logs in as the user testuser1 using the password test. However, even though we’ve set the website to require the use of client certificates, anyone presenting an arbitrary certificate can log in, since anonymous access is enabled. To turn this off, and only allow access for the specified users in the authentication section, we will need to modify the authorization rules as well as the authentication rules to disallow anonymous users. Below the /authentication line in the above configuration we add the following:

<authorization>
  <remove users="*" roles="" verbs="" />
  <add accessType="Allow" users="testuser1" />
</authorization>

Unlike the certificate mapping, this can also be handled from inside the IIS configuration manager under authorization. Now, only testuser1 can log on to the site, using his client certificate. In general, you probably want some more users to be able to access your site, so you can go right ahead and add those as well.

Mercurial and X.509 certificates

All this, finally, brings us to how Mercurial interacts with certificates. There are, indeed, several things we need to cover here: how to use server certificates with ‘hg serve’ (the built-in web server), accessing a web server that requires client certificates from the Mercurial client, and how we can use the usual access control methods in Mercurial together with client certificates.

The built-in server, hg serve

Note: For hg serve to use SSL, you must have installed pyopenssl.

hg serve supports a --certificate option where you can specify a certificate file for a certificate that verifies. This detail is important, as right now, with the commands we issued above, we have a certificate file, we have a certificate authority file, and we have a private key file. We need to combine all these into a single file with this command: cat name.key name.pem ca.pem > hgserver.pem. If you have a certificate from a known certificate authority, you do not need to combine the certificate authority certificate into your certificate file.

To use this, you now simply just write hg serve --certificate hgserver.pem and you can access your stand-alone server using HTTPS.

Accessing a web server that requires client certificates

This is, of course, the really interesting part where everything comes together. In order to use client certificates you need them split up into two different files: name.pem and name.key (if you have followed the guide above for OpenSSL, you already have these two files, otherwise you need to generate them). Now we need to set up an auth section in our local hgrc file:

[auth]
something.prefix = my.server.tld
something.cert = name.pem
something.key = name.key

When you try to clone, push, pull, incoming, outgoing to my.server.tld (or any path below that), we will automatically send along the specified certificate file and decrypt stuff using the key file. Also note that the something can really be anything, as long as they are connected. That is, if you have two different client certificates for two different servers you could do something like this:

[auth]
something.prefix = my.server.tld
something.cert = name.pem
something.key = name.key

somethingelse.prefix = my.other.server.tld
somethingelse.cert = othername.pem
somethingelse.key = othername.key

Be aware that the paths to the certificate and keyfile should be absolute (otherwise they’re read relative to your current working directory).

There is currently no way to discern that certificates are included in the request or not (other than the request possibly failing). Also, the error messages that are given back if there are problems with certificates are less than stellar, but that is, unfortunately, the par for OpenSSL (which Mercurial uses by way of Python).

Access control using certificate users

Mercurial contains a number of mechanisms for controlling who can read/push from/to a specific repository. Furthermore, there are extensions such as the acl extension that allows you more fine-grained access control on who may push what files. The usernames that you can specify are delimited with either a space or a comma. See the problem?

A very common certificate username for Apache might be ‘/C=US/S=CA/O=ACME, Inc./OU=Coyote Solutions/CN=John Doe’. This will be parsed as allowing/denying access to the users ‘/C=US/S=CA/O=ACME’, ‘Inc./OU=Coyote’, ‘Solutions/CN=John’, and ‘Doe’. In short, you cannot use these mechanisms with Apache and client certificates right now (this should, of course, be rectified in the Mercurial source code somehow).

With IIS we have no such problem as we have mapped the client certificates to actual Windows account names, and we must just limit based on the Windows account names.

Verifying the server identity

The default for Mercurial (or any Python application for that matter), is to connect to a SSL/TLS server and not check that we actually trust the certificate being served. In fact, it is only possible to make Python do this from Python 2.6 and onward, and only if you specify special flags and special files to some of the SSL/TLS calls. Some kind developer who shall remain unnamed has added the necessary support to Mercurial so that we from Python 2.6 can actually verify the remote party. This is done by specifying a certificate trust file in your hgrc file in the web section:

[web]
cacerts = /path/to/cacerts.pem

This file should contain a list of the certificate authority certificates (PEM encoded), one after the other. If you’re already on a system that has OpenSSL installed, e.g. most GNU/Linux systems, this can be found in the file /etc/ssl/certs/ca-certificates.crt (or wherever your distribution places it). If not, then you will have to construct this file manually.

If verification fails, you will, again, get some cryptic OpenSSL error message.

Conclusion/Summary

These are all the many fancy ways that Mercurial can work together with certificates currently. Some of the ways are cumbersome, but they are hopefully not cumbersome due to Mercurial. We have tried to make them as easy to use as possible (if it can be said that certificates are easy to work with). It is also worth noting that prior to Python 2.6.4 (I believe), it is not possible to use client certificates with Mercurial, if you are also using a HTTP proxy server.

I will try to update this post if/when changes occur to the client and server certificate support in Mercurial. If you have suggestions or issues with using these, please file them on the Mercurial issue tracker, thanks!

Update: Thanks to Claudio for some useful comments and corrections.

af Henrik Stuart d. 09. April, 2010 20:48

18. February, 2010

Soeren Vrist

What does CodingHorror have in common with Apache H-Base?

As I was in my “Advanced data management” class today I realized that CodingHorror aka Jeff Atwood of stackoverflow fame agree quite alot with Apache H-base. Apache H-base is a column-store database system based on the Google BigTable ideas leveraging Apache Hadoop.

Jeff Atwood was is not very happy with the default “incredibly pessimistic out of the box” setup of databases in his “Deadlocked!” post.  Along the same lines, the H-store people published an article[1]:

The End of an Architectural Era (It’s Time for a Complete Rewrite).

They claim that the time is up for “legacy systems” like the model used by current RDMBS’ like MySQL and SQL Server. The assumption of the H-base people that reasonates with Jeff Atwood – I believe – is:

Every effort should be made to eliminate the cost of traditional dynamic locking for concurrency control, which will also be a bottleneck.

I don’t know if it is something Jeff Atwood is aware of, and I don’t know if that is a sign that a traditional RDBMS is maybe not what he wants, but it is worth think about – IMHO.


[1]Stonebraker, M., Madden, S., Abadi, D. J., Harizopoulos, S., Hachem, N., Helland, P., 2007. The end of an architectural era: (it’s time for a complete rewrite). In: VLDB ‘07: Proceedings of the 33rd international conference on Very large data bases. VLDB Endowment, pp. 1150-1160. URL:http://portal.acm.org/citation.cfm?id=1325981 pdfBibtex


af svrist d. 18. February, 2010 12:41

17. February, 2010

Christian Joergensen

Time is an illusion, lunchtime doubly so

Do you have some spare CPU cycles and a little bandwidth on your server?

Then you should consider taking part in the NTP Pool project and become a part of the global effort to provide accurate time for millions of users. There continues to be a large growth of users of the pool, and the number of servers doesn't seem to grow quite as fast.

It will only take you about 15 minutes to setup. Read more here: How do I join pool.ntp.org?

af Christian Joergensen d. 17. February, 2010 07:57

27. November, 2009

Soeren Vrist

The .dk zone and complaints – The Orango Case

This post is about the danish toplevel domain and in danish – These links describes much of the case in english http://www.isquattedyour.eu/2009/11/18/something-is-rotten-in-the-state-of-denmark-d/ and http://www.noervig.dk/?p=16

Dette er hvordan sagerne ser ud fra min del af internettet

Først dukkede sagen om eof.dk op[1] som skabte lidt røre. Et domæne registeret for flere år siden, men uden website blev dømt som “ikke i brug” og givet til et firma som valgte at skifte til et navn som kan forkortes til eof.dk. Min personlige store kæphest med den sag er at for det første foregår det bagvendt. Firmaet skifter navn og passer pludsligt til forkortelsen EOF.dk, selvom domænet var taget og i brug. For det andet synes jeg at den tekniske baggrund der ligger til grund bliver fuldstændig forfladiget og hele den sammensatte netværksstack som ip og dns dækker over bliver lavet om til: “Det vi kan se i vores internet explorer 6.0″. Hvis domænet kun bliver brugt til mail, så bruger man det jo ikke! Argumenterne for sådan en prioritering fremføres bl.a. i ddu.dk sagen:

I diskussionen om den retlige regulering af internet-domænenavne sætter man undertiden lighedstegn mellem internet-domænenavne og hjemmesider. Det ligger da også klart, at nogle af de mest værdifulde anvendelsesformer for internet-domænenavne netop er som kommunikation via hjemmesider. Internetdomænenavne kan dog også anvendes til andre formål, f.eks. e-post og FTP-service. En sådan anvendelse kan også have en betydelig nytteværdi, men da e-post ofte sendes mellem parter, der kender hinanden, medens kommunikation til og fra hjemmesider ofte sker mellem parter, der ikke kender hinanden (og som derfor har behov for at kunne huske det relevante kontaktpunkt), har en sådan anvendelse ofte en mindre økonomisk værdi.

Tjaeh tjoeh.  Jeg synes man glemmer dimension omkring at folk kunne hurtigt blive afhængige af at beholde deres emailadresser for eksempel.

Derfra gik der et par måneder indtil Peter Makholm tørt bemærkede: “…IMHO orango.dk, roklub.dk, and ddu.dk looks interesting.” baseret på hans gennemkig af de nyeste sager fra Domæne Klagenævnet. Og så gik det pludseligt vildt for sig.

Det hele drejer sig om at at firma – orango.nu, stiftet i foråret 2009 – ønsker sig domænet orango.dk. En privat person har ejet domænet i 9år og har altid brugt “orango” som sit nick online. Domænet bruges til email og som startside af ham personligt.

Peter Larsen er meget lidt tilfreds med sagen og poster harmdirrende på sin blog og turen starter. Herfra går det via twitter og comon:

Virksomheder har forret til danske domæner. Det lader til at være essensen af endnu en dansk domæneklage-sag.(common)

og der dukker en lang række blogposts op i kølvandet:

Derudover er der flere nyhedssites som tager sagen op:

  • 180grader: Orango skifter hænder med statens hjælp
  • CRN: Domæneejer mister navnet efter 9 år
  • Leder fra 180grader: Venstrefløjsekstremisme er gjort til lov om webdomæner
  • Newz: Mister domæne efter 9 år til nystiftet firma

Dette afføder en del reaktioner i debatfora og som kommentarer til ovenstående blogposts og nyhedsposts. For mig virker det som om de fleste kanaliserer deres vrede direkte mod orango.nu firmaet selvom flere påpeger at firmaet som sådan kun er et symptom på en syg lov/klagebehandling:

Gammelmand @orango enig de er nogle svin. Men husk nu det var difo og domæneklagenævnet og domæneloven der gjorde det muligt. Ændre domænelov nu!!!!

Gammelmand #orango #orangogate hvorfor sidder forbrugerrådet som tavse medlemmer i difo. Ny domæne lov nu! Nyt domæneklagenævn nu!!!

(Fra twitter: http://twitter.com/#search?q=orango)

Denne vrede udmønter sig mange steder. Trustpilot anmeldelser med bundkarakterer, facebook kommentarer osv. Orango.nu forsøger at forsvare sig ved at fjerne/slette alle disse ting, men når det først er derude er det svært at slippe af med:

Conduct Reputation Management 101. Slet ikke kritiske indlæg – svar på dem i stedet (via facebook)

jonasjuhler Mit råd til @orango: Find et nyt navn – og undskyld! Man kan ikke tie en sag ihjel på nettet! #orangogate (via twitter)

jpenti Kan #orangogate mon overbevise @orango om at man ikke kan gemme sig på internettet? Slet bare løs på Facebook men samtalen fortsætter. (Via twitter)

runehven @conduct_dk Orango har måske slået væggen fra – men folk kan stadig uploade “fan”-billeder :)http://bit.ly/6qGW7a#Orango #orangogate (via twitter)

Samtidigt skydes der gang i flere tiltag:

Modvinden er så strid at DR Update tager imod tippet om sagen og laver et indslag: http://www.dr.dk/NETTV/Update/?video={cc7e58df-fbcb-41ee-85ed-ea674dd41e4f}

Sidste nyt er artikel med råd fra kommunikationsekspert om at orango.nu bør skifte navn og sige undskyld(via  Comon) sammen med forsøg på at få kommentarer fra Orango.nu på sagen.

Samtidigt har Peter Veileborg  - nuværende ejer af Orango.dk – afsløret at der bliver en retsag: http://www.orangotilbage.dk/ hviket diverse nyhedssites også rapporterer:

Stay tuned!


[1] Eof-sagen:

http://new.czar.dk/?p=510 – Peter Larsen (Larsen data, gratisdns og formand for DKRegistrar brancheforening)
http://new.czar.dk/?p=521 – || -
http://www.piratpartiet.dk/node/277
http://www.version2.dk/artikel/12516-god-skik-skal-diskuteres – Peter Makholm, version2 blogger
http://www.version2.dk/artikel/12124-klagenaevn-konfiskerer-html-fri-domaener – Artikel fra version2 der sætter sagen i spotlight.
http://www.business.dk/tech-mobil/principiel-domaenesag-kan-ende-i-retten – Skal EOF sagen i retten?


af svrist d. 27. November, 2009 19:55

14. November, 2009

Henrik Stuart

Chocolate cupcakes

Recently, my youngest sister wanted to bake these ‘advanced’ cupcakes, so she asked whether I would bake them with her. Never avoiding a chance to bake with others, I immediately agreed, and we had a lot of fun preparing, decorating, and not least eating the cakes.

It’s a fairly standard chocolate cake with whipped egg whites carefully folded into the chocolate batter. After a good bake we piped butter frosting over the cupcakes and drizzled candied violet over it.

Cupcakes

Looking closely we can see the small pieces of candied violet better:

Cupcake closeup

Normally I don’t fancy cupcakes too much as I think they have a tendency to become a bit too dry, but these were very good. Yummy.

af Henrik Stuart d. 14. November, 2009 11:08

Slow durum bread

If one has better time, it is, of course, preferable to give the bread a slow rise, which brings out more flavour nuances in the bread. There isn’t that much difference in consistency to the quick durum bread, but it does have better flavour.

The ingredients are:

  • 700 g wheat flour
  • 300 g durum flour
  • 10 g fresh yeast
  • 20 g sea salt
  • 700 g water

The ingredients are mixed together for 3 minutes at first speed to incorporate the ingredients, and then continuing on first speed for another 7–8 minutes to develop the gluten.

Slow durum bread dough

The dough ferments for 3 and a half hours with folds every 50 minutes and then the dough is shaped into pretty loaves.

Slow durum bread shaped

After 1½–2 hours of proofing, the loaves are slashed and baked. Looking closely after the slashing we can see the bubbly activity inside the bread.

Slow durum bread bubbles

After baking they have a lovely golden durum crust.

Slow durum bread baked

And after cooling, the bread is ready for serving, perhaps with a nice variety of seafood.

Slow durum bread served

Bon appetit!

af Henrik Stuart d. 14. November, 2009 10:38

23. October, 2009

Henrik Stuart

Quick durum bread

Ever since our daughter has started in a nursery, we have more or less been incapacitated with illness, one overtaking the next, so time and energy for baking has been rather scarce. I did, however, succeed in baking a quick bread this past weekend, before I succumbed to another illness (the joy).

I found myself without bread on saturday, and a lacklustre enthusiasm of having to eat the local bakery’s cardboard bread once again. Lunch was few hours away, and the only straight dough recipes that I really like takes at least six hours from start to finish. So what to do, what to do… let us try something crazy and just go with the flow. Let’s try to mix some of the techniques from the slower breads, and the theory of bread baking I’ve been reading up on, with the traditional way for Danish home bakers to bake: quickly and with lots of yeast.

For interested parties, I’ll present to you the ingredients here:

  • 700 g wheat flour
  • 300 g durum flour
  • 28 g fresh yeast
  • 24 g sea salt
  • 650 g water

This is a bit high percentage of salt given my usual tastes, but the quick fermentation process will yield a rather non-tasty bread (i.e. without as much wheat flavour), so we compensate by adding salt (this is not necessarily a good way to compensate, but when in a rush and all that…).

The ingredients are all weighed into a mixing bowl and gets an improved mix (3 minutes at slow speed for incorporation, and 3 minutes at a higher speed for gluten development). In order to further improve the gluten structure (this was, perhaps, not really necessary as it wasn’t a terribly wet dough, all things considered), I decided to let it ferment 40 minutes, fold, ferment 40 minutes and then divide and shape into loaves.

After the first fermentation, the dough is slightly sticky, but it has a nice structure, a bit like a good Danish dough.

Durum dough

Folding it gives it a very nice, firm, and smooth texture.

Folded durum dough

And giving it another 40 minutes to divide the loaves and shaping them works nicely.

Divided durum dough

After this comes the proofing time, letting the loaves rise after you’ve removed a lot of the air when shaping the loaves. I let them proof for about an hour, enough to turn my oven up to 236°C. I let the loaves bake around 30 minutes, but they probably could’ve taken five minutes more.

Durum loaves

We were rather in a rush, so waiting for the breads to cool entirely was not really an option either, so we dug into them a bit early, while the crumb was still a wee bit too moist (but that is, for some reason, what most people insist they prefer).

Durum crumb

This bread will not win any taste rewards, but it’s a nice, quick(-ish) bread with a comfy feeling (kind of saturday morning, the rain is pouring down, you’ve got a cold and you just need a nice warm slice of bread with jam and a big cup of tea, your comfy chair and a good book and to whittle away the hours). It definitely beats the usual quick breads from the Danish bread cook books, if I have to say so myself. Also, the durum flour gives it that nice, rich yellow tint (although that may be a bit hard to pick up from the photos).

af Henrik Stuart d. 23. October, 2009 19:18

25. August, 2009

Soeren Vrist

This week one year ago…

I went running. 20minutes + 6 minutes of breaks spread through out. 2-4 kilometers.

6 weeks before this I went to the physiotherapist – again. Third time, overloaded knees – Patellar tendinitis. First problem, april 2007, second time march 2008.

This time I tried another physiotherapist, recommended to me and a specialist in sports injuries and elite sports. I am and was not elite in sports in any way but the feeling of going to a place where the focus was on sustainable continuous training and not on “patching until workable again” was fantastic!

The main focus point was: Your lungs and heart can get in great shape in a matter of weeks, where your tendons and cartilage needs months and your bones needs many months or years. You are currently at zero or below, start working your way up, but don’t expect that marathon within the next 2-5 years.

Today, one year later I ran 8km in 44 minutes. In a pure quantity view there is a long way from the 40+kms a week, with a weekend run for 22km in march 2007 and all the way down to 8km’s now, but I’m very proud that I have been able to stick to the plan – slow progress and continuous effort. Nothing is fixed, and I can always feel the edge of soreness, and I don’t believe that I will ever be able to get completely rid of the tender knees.

But today is a great day never the less!


af svrist d. 25. August, 2009 19:21

18. June, 2009

Henrik Stuart

Server outage

The server this site is hosted on died rather spectacularly yesterday. Given my lazy attitude to backups it has taken a while to get everything sorted, but most things should be here now, I think. Comments that have been posted to the blog after November 2008 have been lost, but honestly, there aren’t a lot who post comments, so that is not that big a deal.

If you have sent me mail it should arrive here within a day or two, depending on your mail server’s setup, so replies may be slower than usual.

I should probably do something more coherent about taking backups of my site.

If you’re reading my blog through syndication this probably also means that my blog has been spamming you a bit due to changed identifiers on some posts, sorry about that.

af Henrik Stuart d. 18. June, 2009 21:04

15. June, 2009

Henrik Stuart

Managing online development communities

A few friendly reminders to people shepherding development efforts:

  • Strike a cordial tone and do not tell people they do not understand the code.
    Doing this repeatedly to frequent contributors is even more silly.
  • Do not ignore contributions.
    It’s ok if you are busy, but indicate that by replying to the patch, do not ignore it completely.
  • If someone takes the time to go over your bug tracker and fix multiple issues, do not ignore the patches.
    See above.
  • If someone tells you that there are issues in your use of transactions, do consider it an option.
    Transactional safety is hard, it’s likely that details might have been overlooked.
  • Find a decent working process for reviewing contributions.
    Requiring contributors to bug you until you magnanimously take a look at the contributions gets very tiresome quickly and lessens the odds that said contributor will keep contributing.
  • Give constructive feedback.
    Stating ‘This sucks, but I don’t have time to explain right now.’ helps no-one but your own ego. A better approach, in case you really do not have the time, would be to write, ‘I have some concerns over the implementation that I would like to voice. I am, however, travelling for the remainder of the week and will try to reply early next week’.

That is all.

af Henrik Stuart d. 15. June, 2009 16:32

16. May, 2009

Henrik Stuart

Croissants

Between having taken up a new job and having a baby daughter there is practically no time left to do anything, and blogging has been prioritised rather low in the little time there has been, and baking only slightly more than that, so it has actually been several months since I have been able to find time to bake anything. So, the day that I actually found time to bake had to be used to its fullest with something non-trivial, and one of the things I have missed dearly has been some of the folded butter doughs like wienerbrød (Danish pastry) and croissants.

Croissant dough

The dough has to be rolled out to a rectangle and be fairly thin, then you add a block of butter (or margarine in my case), fold the sides over the margarine, roll it out and make a single fold. Then you refrigerate it for 30 minutes, roll, fold, refrigerate, roll, fold, refrigerate, and then you shape. I would’ve liked to get some photos of the margarine work, but from previous experience everything gets easily ruined when working with margarine if you pause overly long, since it is a lot softer than the butter that is usually used. So we skip forward to shaping the croissants.

Shaped croissants

Since the margarine is so soft I have had to add more flour to keep it from leaking everywhere, making the dough a good deal firmer than it is supposed to be. At least they are croissant-shaped, but they will most likely be somewhat more dense than what I had hoped for.

Baked croissants

Sure enough, not the light flaky croissant you get at a bakery, but a tad heavier, albeit still decent, croissant. They weren’t all bad, though, about 25 of these disappeared within a few hours.

af Henrik Stuart d. 16. May, 2009 11:05

22. April, 2009

Soeren Vrist

My favorite Wordpress plugins

So I kinda challenged David – apprently a fellow plugin/addon junkie -  to share his favorite wordpress plugin.

Google Analytics for WordPress Stats! I love stats!
ShareThis My wonderous writing should be shared everywhere. This allows all my readers to do that!
WordPress.com Stats More stats!
Referrer Detector I thought it might be fun
Google XML Sitemaps  
All in One SEO Pack Out-of-the-box SEO for your Wordpress blog
FriendFeed Comments  
FeedBurner FeedSmith For feedburner feed control.
Akismet for spam
WP-reCAPTCHA More spam/robot protection
OpenID Allow my blog to be openID provider.
WP-Syntax CODE!

After reading David’s post i have installed:

WP-Table  
WP-Footnotes  
Textile  

So there you go.

As a sidenote I can reveal that the new “Update automatically” for plugins rocks!


af svrist d. 22. April, 2009 20:40

11. March, 2009

Frej Soya

Ny Cykel

Mine cykler løber altid hjemmefra når de er ca. halvandet år gamle, jeg er nu sikker på de bliver kidnappet af en såkaldt cykeltyv. En enkelt gang vendte cyklen tilbage til min opgang efter ca. 3 mdr efter den skred. Den stak nu af igen, så skal have en ny cykel.

Jeg kan ikke få mig til at bruge ca. 2000 kr på en brugt cykel, så ind til videre er jeg i den grad hooked på en Velorbis Scrap Deluxe. Jeg er dog bange for, at jeg bliver sindsyg at køre med ballonhjul.
Køb?

af Frej (noreply@blogger.com) d. 11. March, 2009 17:49

08. February, 2009

Henrik Stuart

Apple medals

In Denmark we have a range of cakes that are called something with ‘medal’ in them – these are typically shortcrust cake layers around… something. The most traditional ‘medals’ have whipped cream in a layer between two shortcrust layers and with icing on top of the top layer.

A few ‘medals’ are actually closed as in the two shortcrust layers are glued together, typically with egg, a bit like mini-cobblers. This blog post is about one of such ‘medals’, the apple ‘medal’ – I have been unable to find a traditional English name for these cakes, so if you know it, please let me know.

The apple filling in the apple medals are mashed apples that have been cooked for a while to remove the excess moisture. A small amount of this ‘cream’ is then added to each shortcrust bottom.

Apple medal, interior

Using egg to weld each cake shut, a wash of egg is applied and nuts are drizzled on top – traditionally you use almonds, but we only had hazelnuts, so I used those instead.

Apple medal, covered

After baking, the cake is a tad dry, as baked shortcrust often is, but the creaminess of the apple in the interior makes up for this… mostly. (They are still a tad too dry for my tastes).

Apple medal, baked

To make up for the dryness, serve with a nice portion of whipped cream and a few berries.

af Henrik Stuart d. 08. February, 2009 15:13

28. January, 2009

Henrik Stuart

Sonnenblumenbrot – sunflower seed bread

Since I have started working full-time on a new job and have a longer commute, and I like to spend the hours when I am at home with my daughter, I have neglected both this blog and baking for a while.

With a child in the house both my wife and I tend to make recipes we know so they do not require so much focus, but by doing that we risk getting set in our habits, only eating the same kinds of bread, the same kinds of things for dinner, for the next many, many years. So in order to break free of that, we have agreed to make something new each week – my wife will make a new recipe for dinner, and I will bake something I do not usually bake.

For last week I delved into the ‘not entirely white bread’ recipes in Jeffrey Hamelman’s book ‘Bread’ and found this German recipe for sunflower seed bread. I am, personally, a bit so-so with sunflower seeds, but my wife absolutely loves them, so I figured why not. We will need lots and lots of sunflower seeds.

Sunflower seeds

We will also need a rye chop soaker and a pâte fermentée to add to the final dough.

Sunflower soaker and pâte

The mixed dough is fairly reminiscent of the white doughs from Hamelman’s book, just a bit less ‘extremely sticky’.

Sunflower dough

Now, the recipe calls for a good long bake of 40 minutes at 240°C, which seems to be a bit too much, so I would suggest turning the heat about 10–20°C down after 20 minutes (when I look at the recipe again, Hamelman actually also suggests this).

Traditionally, the Sonnenblumenbrot is moistened on top and dipped into non-roasted sunflower seeds, however since I am not too keen on too many sunflower seeds, I opted to skip this part. It is still, all in all, a very wholesome bread with a beautiful crust, and a nice crumb with bite, due to the sunflower seeds, and a slight sweetness, due to the rather large, in my opinion, amount of malt syrup that goes into the dough as well.

Sunflower bread

Very excellent with jam.

af Henrik Stuart d. 28. January, 2009 18:04

18. January, 2009

Soeren Vrist

Logging vs. debugging

It is probably no news that measurements in an experiment almost by definition affects the experiment. 

This is true also for IT systems, where logging is a very used way for observing running code.

From Jeff Atwoods Coding Horror blog about a problem during the beta of stackoverflow.com:

We spent days troubleshooting these deadlocks by .. wait for it .. adding more logging! Which naturally made the problem worse and even harder to figure out. 

[link: The problem with logging]

This illustrates my point exactly. 99% of the time logging affect the system in a neglible way. But you have to keep in mind that it actually could affect the “experiment”. In this case the performance or the behavior of your program.

 

My job is “Production Support” in the ITIL way. IE. ensuring quality of running services with  Incident Management and Problem Management. That means that for anything not related to normal operations we often need the logs. 

Also in these days of powerful IDEs and remote debugging is that much logging really nescisary?

[link: Stackoverflow: Code to logging ratio]

Yes it is! We are supporting an ESB developed and customized during the last 3-5years and attaching a debugger isn’t really an option. 

So we are basically totally dependent on good logging for troubleshooting.

We have been dealing with a problem relating to big batches of large messages and the 2GB limit of our JVM’s. We started by initiating a project to throw some dedicated hardware after the code handing these large messages so it wouldnt affect the rest of the “stuff” running on the same application server. But unfortunately hardware acquirement and machine setup can be a slow process, and worst of all: It’s out of our hands! :)

So our current guru took a quick look at the code and started grabbing for some low hanging fruit:

Before ifDebugEnabled

Before ifDebugEnabled

After using if debugEnabled

After using if debugEnabled

 It turns out that developer had used the same politic as mentioned in the stackoverflow post:

<…
DEBUG Level

  • Any parameters passed into the method

…>
 

The parameter in this case was 1-2MB xml-data which was logged like this:

LOG.debug("Entering part 2.1 of method MyMethod with msg: "+msg.toXml());

In production only INFO and above is logged so the debug message was discarded. But the concat of 2MB data was still performed several times per message (10-12 as far as I recall). So the difference between the above to memory graphs is:

if (LOG.isDebugEnabled()){
    LOG.debug("Entering part 2.1 of method MyMethod with msg: "+msg.toXml());
}

(as also mentioned here: http://wordstoday.wordpress.com/2007/11/26/log4j-why-use-isdebugenabled-in-your-code/)

This should buy us some time before we can isolate this process on it’s own hardware/jvm.

The guru is currently looking into writing a xpath expression for PMD run over our giant codebase. Could be fun to see what it’ll dig up


af svrist d. 18. January, 2009 11:50

05. January, 2009

Soeren Vrist

What I like about Unit Tests

They are included with the source code, committed to SC and build along with the code  pretty automatically these days!

Actually I dont really care if it’s unit tests, integration tests or any other kind of test, I just see unit tests every day as part of my work. The part I like is that it’s such an integrated part of the code.

When I do a code review, it’s not always possible to just load in the code as a project into my eclipse and run findbugs, pmd, checkstyle and eclemma.

In these cases I go straight to the included testcases to see what is being tested.  I always have the (maybe naive?) faith that by looking at the test I at least get a view of the “main” function of the code parts and that way I can start to dig through the code. This has helped me likewise  when trying to reuse some old code. The unit test showed me very easily how to initalize the functionality, what I need to supply, and what needed to be  present (the mocked out parts). 

So shame on you who don’t write unit tests! (or other kinds of directly included tests).


af svrist d. 05. January, 2009 18:59

16. December, 2008

Henrik Stuart

Cinnamon loaves

One of the glorious things from my childhood was the sunday trip to the bakery where we got to pick our Sunday morning treat. Normally this treat was to be a single item like a rum snail, a croissant, or the like, but just once in a while I managed to sweet-talk (read: emotionally bribe) my parents into buying a cinnamon loaf. For those unfortunate enough that they haven’t come across this wonderful bread before, it is a butter and egg enriched dough that is rolled around a cinnamon-enriched remonce cream (mix of butter and sugar). For quite a few years now, I have had to pass these things by in the bakery, along with most their other treats, since I’ve been ‘fortunate’ enough to pick up lactose intolerance on the course of my life. Furthermore, we have egg allergists in the family as well, so what else was there to do than replace the butter with milk-free shortening and replace the eggs with a mix of water, oil, flour and baking powder? (We have also prepared these loaves with the egg, but there is practically no difference between replacing the egg as well).

Cinnamon loaves, rolled out dough

The first part is rolling the dough into a fairly thin square, however, I can never, ever, manage a square when rolling dough like that, so it gets to be square-ish. We smear the remonce over this and roll it up nicely.

Cinnamon loaves with remonce

For those of you who aren’t experienced remonce-smearers, this is what too much remonce looks like (you will see why in a bit).

Cinnamon loaves, rolled

These three rolls are then used to carefully braid the loaf (in most home-made versions of cinnamon loaves it is just rolled into a single roll, but that does not get the authentic bakery braid).

Cinnamon loaves, braiding

After some careful braining and a graceful finish at each end of the braid, you get this.

Cinnamon loaves, braided

Now it just needs to be placed in a form and proofed until it’s nice and wiggly.

Cinnamon loaves, proofed

And after being baked for half an hour, this is the oozing goodness that meets the eye (ok, normally it doesn’t ooze quite that much, but we brought it upon ourselves by using a larger portion of remonce).

Cinnamon loaves, closeup

Or seen in a bit larger perspective.

Cinnamon loaves, oozing

Now comes the time to turn out the loaves from the forms.

Cinnamon loaves, removed from forms

This was also the time I suddenly realised that I was supposed to have greased the forms.

Cinnamon loaves, remember to grease the forms

It’s not all bad, though, as it is still great to eat out of the form, but the loaf in the background, above, is collapsed a bit due to this.

Now we only need to add the final touch to complete the masterpiece: icing.

Cinnamon loaves in all their decorated glory

The best part is, you do not have to wait for these loaves to cool, you can eat them warm, oozing and savor their delectable creamy consistency that is punctuated by the sugary cinnamon and the crisp and sweet crust on the top of the loaf.

Cinnamon loaves, crumb

It’s still as good as I remember it from my childhood.

af Henrik Stuart d. 16. December, 2008 16:22

15. December, 2008

Henrik Stuart

Pain rustique rolls

Pain rustique is a wonderful savory bread that not only tastes great, but is also relatively fast to make (including the poolish it only takes like 15–18 hours from start to baked loaf). They are prepared much like regular pain rustique, just divided into smaller amounts of dough. Here I have prepared what would usually be four small loaves and each of these I have divided in four to create rolls. So, one or two rolls should be plenty to fill your appetite for a meal.

Pain rustique rolls, ready for final proofing

Since the buns are somewhat smaller than the regular loaves they don’t require entirely as long in the oven.

They look just like small pain rustique loaves.

Pain rustique rolls everywhere

The crust is crisp, thin and lovely, but the crumb is a bit denser than the regular pain rustique, but that is most likely due to me shaping the rolls a wee bit tighter than I normally shape the loaves (pain rustique requires no shaping, much like ciabatta, but I never get rectangular slices of dough, so I tend to tug in the odds and ends to make it appear rectangular).

Pain rustique rolls, crust and crumb

This is, of course, not where the story usually ends when I bake, but it is usually where I stop depicting the process. However, my wife got inspired by the rolls and prepared extremely delicious sandwiches using them. In their full glory, I present to you a cucumber, tomato, salmon and avocado sandwich. Lovely.

Pain rustique rolls, sandwich

af Henrik Stuart d. 15. December, 2008 05:18

11. December, 2008

Henrik Stuart

Potato garlic bread

While I really love and adore the French and Italian white breads, I was brought up on Danish rye bread, which, usually, uses more or less 100% rye. Now, I’m not really ready to consume rye bread again after having sworn it off once I moved away from my parents, however, I’m usually coaxed into trying different kinds of breads with whole meat wheat, maize, or in this instance, potatoes and garlic.

We oven-roasted the potatoes as per Hamelman’s directions for optimum taste in his book Bread. Now, if you make the usual metric-based recipe from Hamelman’s book, you’d wind up with 27 loaves of about 600 grams each, and while it sounds tempting I neither have space enough in my oven, nor am I able to eat all that bread before it goes stale. Now, if you did create 27 loaves, you’d be needing about 30 grams of oven roasted garlic, but when you create what corresponds to 2 loaves of 600 grams each (in reality I made 4, each being about 300 grams), you would only need 3 grams of garlic, which is about a single clove. That is just overkill to ovenroast! So I fried it in a generous amount of oil instead.

Furthermore, Hamelman makes the suggestion not to remove the peel from the potatoes when you mash them to add some colour to the consistency of the bread. I am much too lazy to hand-mash potatoes, so I tossed them into my blender along with the 3 grams of garlic and let it run for a bit. It is an extremely efficient blender, really, as there was no hint of the roughness of the peel once it had mashed everything up for a bit.

The dough is somewhat denser than for instance ciabatta dough, which is due both to the wholemeal wheat used in it, but certainly also the potatoes that don’t release their moisture until later in the process. It is, at least, a lot easier to work with than the ciabatta dough that has a tendency to try to escape from my grasp at all times.

Potato garlic bread

The potatoes add a nice bit of colouring to the bread and the crumb is somewhat denser than the loose, airy crumbs that I usually prefer, but I will have to agree with Hamelman, it’s got a nice, comfy taste, and the garlic adds a nice bit of ‘kick’ to it.

Potato garlic bread crumb

What has amazed me most about this bread is its keeping time. Normally the ciabatta becomes slightly stale after just two or three days, but the potato garlic bread is still good after 4 days. Sure, the crust is getting slightly chewy, but with some liver paté (in case you are wrinkling your nose at this, it’s a Danish tradition to eat it, and unlike the rye bread, I haven’t sworn this one off just yet), the bread still has a nice taste. Good for the times where you don’t have time to bake during the week.

af Henrik Stuart d. 11. December, 2008 17:04

23. November, 2008

Henrik Stuart

12. November, 2008

Henrik Stuart

Panmarino

For a while I have had Carol Field’s ‘The Italian baker’ standing in my bookcase without it seeing any much use at all. There are two primary reasons for this. First, the breads from Jeffrey Hamelman’s ‘Bread’ are simply so good it’s hard to motivate myself to bake from another book, and secondly, the recipes in Field’s book are simply annoying in their measurements. Who in their right mind measures ‘a cup of olive oil less a tablespoon’?

Like most people, I have a tendency to get stuck in just making the same few recipes over and over and over and… again, and I must admit that the pain rustique and french bread recipes are superb. However, it does nicely to experiment with what you eat once in a while. So, I forced myself to put Hamelman’s book back on the shelf and take a look at some breads from Field’s book, diligently trying to convert the measurements to metric weights before starting on them.

My first try was panmarino, or rosemary bread, where finely chopped rosemary is mixed into the dough.

Panmarino dough

Distinctive to this bread is the way that it is scored, namely in the shape of an asterisk, and the incisions are then lightly drizzled with coarse flakes of sea salt, but I only had fine flakes so they had to make do. After a good long bake the crust turns out lovely crisp.

Panmarino, baked

When I think italian bread my foremost thought is usually a solid crust and a crumb with lots of holes, but this bread is nothing like that. On the contrary, it has a fairly dense, soft crumb, but with the rosemary aroma in the bread it goes very nicely with lamb.

Panmarino, crumb

Ciao!

af Henrik Stuart d. 12. November, 2008 09:36

09. November, 2008

Henrik Stuart

Rabbit stew

There are a number of dishes that you do not get to try out terribly often in this region, and while some might get you to wrinkle your nose in trepidation, like brain or snake, others may intrigue you as to their taste. So, it was with great anticipation that we prepared a rabbit stew. After digging around for a recipe for a while, we found one that marinated the rabbit in red wine overnight and cooked it in the oven for a good long while.

Rabbit stew

With a bit too much flash due to the late-night lighting conditions, this is the outcome of quite a few hours of cooking. Served with oven baked potatoes and ratatouille.

As to the taste, I will probably not return to rabbit in the near future. In my opinion, it tastes much like chicken without any overly distinguishing qualities.

af Henrik Stuart d. 09. November, 2008 09:36

09. October, 2008

Christian Joergensen

Hacking Django forms for CSS flexibility

The default output of the Django forms (former newforms) module is not very CSS friendly. With a few simple adjustments, you can make your web designer colleague happy.

This patch will add three classes on the parent HTML element of the rendering of each form field (the tr, li or p tag depending on your rendering mode):

  1. The type of the form field. (Examples: CharField, ModelChoiceField)
  2. The type of the widget. (Examples: TextInput, SelectInput)
  3. Is the form field optional or required: Optional or Required
  4. Now a required DateField will render, using the as_table rendering, as:
1  <tr class="DateField TextInput Required">
2    <th>
3      <label for="id_date">Date</label>
4    </th>
5    <td>
6      <input type="text" name="date" id="id_date" />
7    </td>
8  </tr>

Example uses

A couple of example use cases where my patch will help you out:

  • Special styling of required fields possible.
  • Easier to add a date picker by JavaScript.
  • Special styling of checkboxes (styling input elements to width: 100% also affects those).

Download the patch

Patch against forms/forms.py in Django 1.0: Download - View

How to patch your newly downloaded Django-1.0.tar.gz

For those of you not quite familiar with working with patches:

$ wget http://www.hacktheplanet.dk/export/HEAD/misc/forms.py.patch
$ wget http://www.djangoproject.com/download/1.0/tarball/
$ tar xvfz Django-1.0.tar.gz
$ patch -d Django-1.0/django/forms/ < forms.py.patch

af Christian Joergensen d. 09. October, 2008 16:36

05. October, 2008

Henrik Stuart

Retarded filone bread

While the filone bread is a description of the shape of a traditional bread from Toscana (Tuscany) where it is made without salt due to an old salt feud, filone has come to mean a special kind of white, rustic bread here in Denmark, made slightly different from the ciabatta (another shape description for the saltless Toscana bread). In the Danish bakeries the filone is a rustic bread, with salt, that is slightly elongated, typically with pointy ends (which makes it fairly impractical to cut in regular slices, but nevermind that).

Now, most recipe books in Denmark are written by enthusiasts rather than professionals, and there is a tendency to an extreme overuse of fresh yeast (this is available in any store, really, whereas instant and dry yeast is slightly more rare). Thus, it was with ill-hid enthusiasm I threw myself at a recipe released from one of our bakery chains for retarded filone bread—it has been released as part of a yearly event that some people and stores are having in the fall break called The Great Baking Day, which is a moment for the busy families to pause and bake, father, mother, and children. It has been launched by a reknowned Danish chef and a child psychologist and seems to be a wild success (although the companies backing it seem to exploit it a tad by insinuating that you should use special brand flour for the optimal product, etc.).

Irrespective of it not being fall break just yet and that Hannah isn’t nearly old enough to participate, I wanted to give the retarded filone bread a try. The recipe calls for a 24 hour retarding, but I only gave it about 18 hours, fearing that it would have a too acidic taste otherwise. Shaping the cold dough is a whole lot easier than trying to shape some of the equal wet poolish-based doughs I usually make.

Shaped filone loaves

The shaped loaves are rolled in durum flour, and after proofing and a somewhat lengthy bake—almost 40 minutes—the breads have gained a lovely golden and rustic look.

Baked filone loaves

Unlike the breads I usually bake, this method of making the breads yielded a somewhat denser crumb (which is consistent with the filone breads from most bakeries around these parts).

Filone crumb

Its taste is markedly acidic, and I think having let it retard for another six hours would’ve been too much. It’s a solid bread that is good for a varied amount of toppings, particularly considering that it’s very easy to make. It’s basically made just by mixing the dough on a stand mixer, stuffing it in the fridge, waiting 18 hours, shaping, proofing, slashing, and baking the loaves. I still prefer the breads that require all the folding and other work—the crumb is simply better in those loaves. Still, an altogether decent bread.

af Henrik Stuart d. 05. October, 2008 12:15

04. October, 2008

Henrik Stuart

Butter poppy seed rolls

These rolls go by a couple of different names in Danish: tebirkes, smørbirkes or Københavnerbirkes, and it seems that no one really agrees on how to make them. They also have no official translation to English, so this was the closest I could dream up. In the traditional bakeries near Copenhagen, most kinds are filled with remonce, but most bakeries will also have savoury kinds without the remonce. The recipe I’ve found is a typical home-baking recipe from Denmark using a full package of fresh baker’s yeast (50 grams), which means that it’s quickly done, has little flavour and mostly only taste good warm out of the oven. However, the rich butter dough (which I’ve replaced with margarine) does taste awesome fresh out of the oven. The day after, however, it is hard to stomach.

It’s a very easy thing to make: basically you just throw together some flour, butter, egg, salt and yeast and presto, you have the dough after some kneading. Brush with eggs, fold twice and brush with eggs again and add some poppy seeds and this is what you have. The lighting sucks in the photos, I’m afraid, as I made them late in the evening and our artificial lighting in the kitchen is fairly lacking.

Unbaked butter poppy seed rolls

After a relatively quick proofing and bake they turn out a tad more voluminous. In the professional bakery versions the layers are usually somewhat more visible and there’s even a hole showing through the sides of it. No such thing here.

Baked butter poppy seed rolls

Cutting it up it shows a very dense crumb, which is heavy with butter and egg. Very good warm, otherwise… not.

Butter poppy seed rolls crumb

af Henrik Stuart d. 04. October, 2008 18:00

28. September, 2008

Henrik Stuart

A small family

A few weeks ago our little daughter was born. She is healthy and doing very well and we are all very happy. In the image she is two days old.

Hannah

This is also, if there should be any doubt, why I have been a tad quiet as of late.

af Henrik Stuart d. 28. September, 2008 15:55

25. August, 2008

Christian Joergensen

Django and mod_wsgi: A perfect match!

mod_wsgi is an Apache module for serving WSGI-based Python web applications from the Apache HTTP server. Django, along with almost every other Python web framework today, comes bundled with a backend for acting like a WSGI application.

A couple of months ago I decided to try it out in spite of mod_python. Discovering and trying out mod_wsgi really suprised me. It can take a massive beating, and outperforms mod_python in every practical aspect.

The setup

You will need a short Python "bootstrap" script to create a WSGI-handler for your Django project. Here is an example (call it wsgi_handler.py and place it in the root directory of your Django project - the one with manage.py and settings.py):

import sys
import os

sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
os.environ['DJANGO_SETTINGS_MODULE'] = 'projectname.settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()

Finally set up your Apache virtualhost to use mod_wsgi:

<VirtualHost *>

  ServerName www.projectname.org
  ServerAlias *projectname.org

  Alias /admin_media /usr/lib/python2.4/site-packages/django/contrib/admin/media

  <Location /admin_media>
    Order allow,deny
    Allow from all
  </Location>

  Alias /media /home/user/projectname/media

  <Location /media>
    Order allow,deny
    Allow from all
  </Location>

  WSGIScriptAlias / /home/user/projectname/wsgi_handler.py

  WSGIDaemonProcess projectname user=user group=user processes=1 threads=10
  WSGIProcessGroup projectname

</VirtualHost>

In the WSGIDaemonProcess line, you can easily manage the amount of system resources (measured in processes and threads) mod_wsgi should use. In my experience a single process with 10 threads will cover most small to medium loaded websites.

Why?

This is some of the reasons why you should ditch mod_python for mod_wsgi when hosting Django projects:

Faster

The load times of the websites now served with mod_wsgi really surprised me. Normally a page would be served within 150-300 ms. This was reduced to load times in the range of 40-80 ms.

I also discovered that running mod_wsgi in embedded mode (as opposed to daemon mode) was not worth the effort. I didn't really see any difference between load times when using Django.

Less memory usage

Everyone hosting more than a couple of Django projects on a single Apache instance knows that Django projects squanders a bit with memory usage, and every single Apache child process will easily end up using 50 MB RAM.

mod_wsgi dedicates a process (or multiple processes) to a single interpreter for a single Django project, and keeps the memory usage low in the "normal" Apache child processes. On a server with 8 small Django projects, I went from using ~1500 MB RAM on Apache child processes to using 150 MB.

Secure

When using mod_python your Python interpreter will be running as the user running the Apache webserver itself (on Debian systems, the user is called www-data). Typically this will allow you to peek around in places where you do not want your users peeking. This is due to the fact that www-data must have read access to every file you use in your application (including settings/configuration/media files).

mod_wsgi addresses this problem by changing to a user id specified in the configuration file, and run your Python interpreter as another user than www-data, allowing you to lock down every project on your server to seperate user accounts.

These points cover mod_wsgi running in daemon mode.

Conclusion

mod_wsgi rocks!

So if you are thinking about moving your systems to, or just curious about, mod_wsgi, you should really get to it. I, for one, welcome our new mod_wsgi overlords! (sorry)

Futher reading

af Christian Joergensen d. 25. August, 2008 12:34

20. August, 2008

Henrik Stuart

Apple blackberry tart

Starting as an experiment on creating whipped cream from an oat-based cream, the apple blackberry tart is a nice dessert, but since it is fairly dry it really needs whipped cream. The tart dough and fruits applied does look rather appetising.

Apple blackberry tart base

The blackberries are fresh from our garden, so I think they deserve a closeup.

Apple blackberry tart base closeup

This is a closed tart receiving a lid of more shortcrust dough.

Apple blackberry tart with lid

It is supposedly possible to whip the oat-based cream by adding some gelatine, but even after we threw it in the freezer for a while to strengthen the gelatine’s properties (they were not working without this step at all) the result was lumpy and disappointing, nowhere near the impressive tops and lightness of regular whipped cream. So we had to settle with a slightly thickened cream on the tart.

Apple blackberry tart with cream

Darkness fell between the assembly of the tart and it finishing its bake, hence the bad lighting in the last photo.

af Henrik Stuart d. 20. August, 2008 08:51

16. August, 2008

Henrik Stuart

Maize bread

During the last month and some of writing my thesis I spent almost all my waking hours doing just that. No baking whatsoever. One of the last things I had time to bake before going into crunch mode was a maize bread, or corn bread as it is known in many places.

Maize dough

As evident in the photo, the yellow colour of the maize imparts on the dough rather starkly as opposed to the normal white wheat flour. Once baked the pale yellow colour turns to a more golden glow.

Maize crust

The crumb, however, is fairly tough, and a tad more dry than its wheat only counterparts. The maize flavour adds a nice taste, though.

Maize crumb

af Henrik Stuart d. 16. August, 2008 08:26

14. August, 2008

Henrik Stuart

Rehabilitating from thesis writing

There has been a lot of silence on this blog during the past two months. Too much silence, really. However, all has not been lost as I have now finished my master’s thesis and handed it in. Only the defense remains. However, after scarcely having had time to bake, let alone writing about it, there is only one solution for rehabilitation: bake a lot of bread and make some awesome food. So I did just that, or, rather, I provided the bread, my wife provided the awesome food.

What we did was take a bunch of very lovely and delicate chantarelle mushrooms…

Chantarelles

and we throw them on a frying pan together with a few regular champignons, some thyme, a bit of parsley and some thinly sliced garlic. They make for a very lovely photo if I have to say so myself.

Frying the chantarelles

To this we add a bit of oat-based cream (since I am lactose intolerant) that the mushrooms absorb fairly quickly.

Frying the chantarelles with cream

Now all we need is a bit of my freshly baked french bread…

French bread

and the fried mushrooms are placed on the bread…

Fresh french bread with fried chantarelles

et voilà. Delicious as an appetiser or a night snack.

af Henrik Stuart d. 14. August, 2008 20:37

30. July, 2008

Soeren Vrist

Using my Certification

 

Finally I found a way to use my certification!

Mobile photo of laptop


af svrist d. 30. July, 2008 19:45

15. June, 2008

Christian Joergensen

Exploiting the Python object system for server monitoring

I have tried a lot of server/network monitoring systems over the years. Nagios, Zabbix, Zenoss is some of them. However, as a programmer, I didn't really feel right with any of them. Then I got this crazy idea of exploiting the Python object system for server monitoring. In this blog post I will try to explain my idea to you and provide a proof of concept implementation, and probably you will see how great an idea this is. ;-)

The system is designed to have a very small footprint (currently less than 500 lines of Python) and also designed with inheritance in mind.

In my system every server is a class. Servers can inherit from other servers. Classes can be defined as being a stub, and needing to be subclassed. Servers can inherit from multiple server "types".

The checks to be performed are just methods on the server class. To distinguish checks from other methods, they must start with check_. If a check method raises a MonitoringError exception, this will be handled by the notification system. All settings, like what port number your httpd runs on, is done in class variables. All class variables are defined with a default value. This makes it easy to configure.

Whenever a check fails (or returns to a successful state) a notification is to be sent. This is done by invoking all defined methods starting with notify_ on the server class.

To put things into perspective, here is an example of a http/https server:

This file should then be saved in a directory (along with an __init__.py file - this is Python... ;-)). The monitoring client is then invoked as: monitoring-client.py /path/to/hosts/directory. All subclasses of the base server class is then discovered and entered into a scheduler.

Server abstractions

The experienced Python programmer would probably by now have realized that if you have a lot of web servers, you would make a web server abstraction:

from monitoring.hosts.bundled.web import WebServer, SSLWebServer

class MyWebServerType(WebServer, SSLWebServer):
    admins = ("someone@example.com",)
    stub = True

class WebServer001(MyWebServerType):
    hostname = "server001.example.com"
    address = "195.274.31.12"

class WebServer002(MyWebServerType):
    hostname = "server002.example.com"
    address = "195.274.31.13"

Obviously, this would make more sense when you have a lot of more generic settings per server - but hopefully, you will get the point. If you were to also check a plain HTTP server running on port 81, you would just add it in the generic class:

from monitoring.hosts.bundled.web import WebServer, SSLWebServer

class MyWebServerType(WebServer, SSLWebServer):
    admins = ("someone@example.com",)
    stub = True
    http_ports = (80, 81)

Class relationships can also span multiple files. For easy importing, the directory with your hosts is automagically exposed to Python as monitoring.hosts.

Remote checks

I have also made a simple mechanism for carrying out remote checks. That is, checks that are run locally on the remote servers. This could fx. be to check the available disk space or check that a given process is running.

I use a XML-RPC server with some HMAC-SHA-1 for authentication. However, this still needs some work and is not very well-tested at this point. But if you are into security systems, please do take a look and comment. One thing that comes to my mind, is that i probably should also validate the "calling" IP address.

Adding remote checks to our server checks is as simple as adding another base class for our template:

from monitoring.hosts.bundled.web import WebServer, SSLWebServer
from monitoring.hosts.bundled.remote import RemoteChecks

class MyWebServerType(WebServer, SSLWebServer, RemoteChecks):
    admins = ("someone@example.com",)
    stub = True
    http_ports = (80, 81)

This will automagically check disk usage, system load, ram usage and swap usage. The limits can be configured using class variables (if the default ones doesn't cut it for you):

from monitoring.hosts.bundled.web import WebServer, SSLWebServer
from monitoring.hosts.bundled.remote import RemoteChecks

class MyWebServerType(WebServer, SSLWebServer, RemoteChecks):
    admins = ("someone@example.com",)
    stub = True
    http_ports = (80, 81)
    disk_limit = 50 # warn when more than 50% if the disk is full

This also exposes a method called remote_call on the server. That is, if we were to check for a specific running process, we could just define a method:

from monitoring.hosts.bundled.web import WebServer, SSLWebServer
from monitoring.hosts.bundled.remote import RemoteChecks

class MyWebServerType(WebServer, SSLWebServer, RemoteChecks):
    admins = ("someone@example.com",)
    stub = True
    http_ports = (80, 81)
    disk_limit = 50 # warn when more than 50% if the disk is full

    def check_someproc_running(self):

        """ Someproc running """

        procs = self.remote_call("pgrep -f someproc").strip()

        if not procs:
            raise MonitoringError("someproc not running on '%s'" % self.hostname)

Remember that any method prefixed with check_ will be treated as a service check and any MonitoringError exceptions will go to the notification system. Also when defining custom checks, remember a doc string, as this will be used to identify the problem in the notifications.

More

I haven't made a release yet, but will try the system out in production in the next week or so. If it seems to work, I might put out a release for you to try. Until then you can check out the code in my trac browser or get a snapshot to play with.

af Christian Joergensen d. 15. June, 2008 19:51

08. June, 2008

DIKU Foto

DIKUfoto i skaterparken

nANDy og jeg var en tur i fælledparkens skaterpark til et DIKUfoto møde. Vi eksperimenterede med teleoptik. Jeg havde min Canon EF 70-200 f/2.8 IS USM med, superlækkert legetøj til hurtig fokusering. nANDy have et noname 75-300 objektiv med. Vi prøvede at tage billeder i modlys, med lyset i ryggen, fra frøperspektiv og fugleperspektiv fra den største af ramperne.

Der var desværre ikke et stor opbud af meget dygtige skatere, så vi så aldrig nogen komme over kanten på ramperne, hvilket ellers ville have været en fantastisk fotomuligthed. Til gengæld fik vi set en del tricks på de mindre hop.

Da vi kom tilbage til DIKU fik vi udvalgt de bedste af billederne (7 af ~80) og efterbehandlet en smule. Her er resultatet:

skater07_small.jpgskater06_small.jpgskater05_small.jpgskater04_small.jpgskater03_small.jpgskater02_small.jpgskater01_small.jpg

af Munter d. 08. June, 2008 15:55

07. June, 2008

Christian Joergensen

About Django and the importance of releases

My favorite Python web framework, Django, has not been updated for a long time. The most current release, 0.96, was released in March 2007. This is a very long time, when you're in the market of web frameworks.

This doesn't seem to bother a lot of people, as the common answer in the django community seems to be just to run the trunk version (development version).

I for one doesn't like that solution. And here are some of the reasons why.

Some of the problems with running a development version

  • When a security release is made, I cannot just update, but need to merge the change in, in all of my installations. An update could maybe break my existing code with backward incompatible changes.

  • It's easier to tell my co-workers that our projects will run 0.96, and not r6389 for one project and r7291 for another (+ a couple of security patches). That's okay if you are a single-person team working on a single project, but not when you have several people and projects.

  • Developers are afraid to commit new things to trunk, because a lot of users will be disappointed when they eagerly update their repositories each morning just to find that backwards compatibility has been broken. A good example of this is ticket 3639:

    This patch will be committed to trunk eventually, don't worry. But I, personally,
    haven't done it yet because of the massive backwards-incompatibility it introduces,
    making timing important.
    

No-one should ever be afraid to break backwards compatibility in the development version. This will just add more complexity to the job of making new releases by queuing up a lot of uncommitted patches.

Release early, release often

Many great people have preached this paradigm a lot. And for a reason. This is the best way for an open source project to succed. If you don't know what your users want, you will most likely fail.

Getting out releases will foster users to tell you about their experiences and if you are heading in the right direction with development with regards to what the users actually need.

Having more frequent releases would probably also spur more developers to contribute. Developers like active projects and getting their contributions released.

A suggestion

One of my biggest problems with the current (0.96) release is how buggy newforms is. This could easily be solved by making django.newforms (and maybe django.contrib.admin) into a separate project with a separate release schedule.

Then everyone wouldn't have to rewrite a lot of form handling code when the 1.0 release happens, but would now currently be using cleaned_data and ModelForms in spite of their current incarnations.

Conclusion

Despite my points in this post, I still think The Django framework is the best thing that has happened to the craft of building web applications since the invention of HTTP ;-)

af Christian Joergensen d. 07. June, 2008 11:16

01. June, 2008

Soeren Vrist

Bali – II


Anden rejseberetning fra Bali. Se billederne fra Fredag/Lørdag, Søndag og blomsterhaven.

Hovedtemaet har været afslapning selvom vi faktisk har set og oplevet en masse.

Fredag gik med morgenyoga på stranden, efterfulgt af lækker morgenmad og derefter en rundvisning i blomsterhaven. Det var en hyggelig pensioneret medarbejder fra hotellet som viste os rundt. Mange flotte blomster, og meget sjovt at bemærke at der næsten ikke er nogen blomster som er indfødt balinesiske.

Resten af dagen gik med shopping på strandenvejen i Sanur. Vi spenderede en mindre formue, men fik også købt nogle fine ting. Sikke nogle ivrige sælgerer og uendeligt mange balinesere som vildt gerne vil køre os rundt. “Transport? NO!, Yes? Tomorrow maybe? NO!” x 10000000. Til aftensmad var der som en del af rejsen Rijstaffel på en af hotellets restauranter. I indonesien er rijstaffel ikke det samme som vi kender det hjemme i Danmark, men et stort udvalg af indonesiske retter med ris til.

Som en del af vores shoppetur fredag, gik vi ind i en dykkerbiks der hedder Bali Crystal Divers. “Hello, how much for diving? Hej med jer! Jeg hedder Minni, Sæt jer ned, så snakker vi om det.”
Det viser sig at vi gik lige ind i en danskeroase. Vi aftalte et hurtigt dyk i poolen lørdag kl 10.30, for at se hvordan Sus ville klare det med ørene, der tidligere har voldt lidt problemer under vand, og for at se om Søren kunne huske hvordan og hvorledes.

Lørdag startede lidt hektisk. På trods af at vi faldt i søvn 22:30 vågnede vi først kl 10:10. En mobiltelefon på dansk tid er ikke det bedste vækkeur! Vi nåede det lige akkurat, men stort set uden morgenmad. Poolturen gik fint, så vi aftalte begge to en tur til Tulamben på nordøstkysten søndag. Serviceniveauet hernede er så højt, at de bare ville komme og hente os på hotellet.
Resten af dagen gik med massage i lille lokal frisør/massør biks. Ganske hyggeligt, men måske ikke verdensklasse massage. Dejligt var det dog og 30minutter for 15DKK er jo en fair pris. Derefter var det helt klart tid til at dase ved poolen indtil solen gik ned. Det gør den ganske tidligt hernede. Aftensmaden blev på en sød lille lokal balinesisk restaurant ved navn Melanie. Se evt. billederne.

Søndag blev vi hentet kl 7.00 og vi havde fået hotellet til at lave os en morgenmadpakke. Den bestod af 2 croissanter, en yoghurt, en minibanan, en snegl og vand. Ikke lige breakfeast of  champions for folk som skal ud og dykke og slet ikke vanlig standard fra hotellet. Det tager ca. to timer at køre fra Sanur til Tulamben. På vejen fik vi en lang god snak med vores instruktør, Else, som har boet hernede i en række år. Det er rart med lidt insiderviden.  Vores anden guide var en pige ved navn Angi med tyk fransk accent, men meget flink og Sørens dykkerbuddy. Efter en kort dykkerbriefing og efter at dykkerporterne havde slæbt vores udstyr ud af bilen var det tid til at gå i vandet. Se på billederne hvordan de små damer slæber vores tanke hele vejen ned på stranden hvorfra vi gik i vandet. Første dyk gik ud til U.S Liberty, et amerikansk fragtskib der blev ramt af japanerne under 2. Verdenskrig. Skibet lå på stranden indtil 1963 hvor lavaen fra et  vulkanudbrud skubbede det ud på 7-35ms dybde. Susanne og Else svømmede rundt på 7-12m  vand i den ene ende af vraget, hvor de så bl.a. små rokker, kæmpe blå søstjerner, og mange af den slags fisk som er den sårede general i akvariet i “Find Nemo” . Generelt var der mange mange farvestråelende fisk over det hele. F.eks. var der en fisk der valgt at søge læ for strømmen lige mellem deres hoveder. Ofte havde man fornemmelsen af at dykke rundt i et akvarie fordi fiskene kom så tæt på.

Søren og Angi dykkede en smule længere ud da Søren endelig fik styr på ørerne og trykket. Længere nede på vraget var der også rigtig mange fisk at se på, men sikkert mange af de samme som på det lavere vand. De så f.eks. et par kuffertfisk der gemte sig rundt omkring på vraget og trompetfisk. Det lykkedes dem alle at mødes under vandet over vraget. Rigtig hyggeligt! Generalt var der rigtig mange folk ude og dykked på vraget, næsten for mange.

Efter en dejlig frokost var det tid til dyk nummer to. Det foregik på en koralvæg ganske tæt på kysten hvor alle 4 dykkede rundt sammen. Vi så en meget flot dragefisk som et af højdepunkterne. Igen rigtig mange fisk.

Konklusionen på Susannes problemer med ørene var, at der ikke var nogen. Til gengæld  havde Søren en del af dem. Sådan kan det gå.

Efter 2 rigtig gode dyk var det på tide at rulle hjem igen igennem det flotte landskab. Se evt. på billederne hvordan man ser ud når man slapper af i bilen på vej hjem :)

Nu er klokken 19.30 og det er på tide med noget aftensmad. Vi er godt mørbankede oven på dykkerdagen!


af svrist d. 01. June, 2008 11:28

29. May, 2008

Soeren Vrist

Bali – I


Første rejseberetning fra det varme Bali. Se billederne her

Indledningsvis kan vi konkludere, at 10 timer i et fly er lang tid! Især, når man flyver kl. 14.30-01.00, men med lokal tid kl. 06.00 ved ankomst – så forsvinder natten. Så det er selvfølgelig meningen, at man skal sove i flyet, men det er ikke nemt, når man generelt ikke er god til det og kl. desuden kun er eftermiddag… Så vi var godt trætte da vi nåede Bangkok! Det lykkedes Søren at sove en times tid på det kolde gulv i lufthavnen, men Susanne var helt smadret, da vi satte os i flyet mod Bangkok – hun kunne næsten ikke holde sig vågen gennem måltidet.

Vi ankom til lufthavnen i øens hovedby Denpasar, onsdag d. 28/5 kl. 14. Vi havde begge sovet stort set hele vejen fra Bangkok, hvilket i høj grad var tiltrængt! Varmemuren da vi trådte ud af flyet var overvældende og luffugtigheden fik os til at hive efter vejret – heldigvis vænner man sig hurtigt til det :o )

Vi blev hentet af hotelbiler og kørt til Bali Hyatt hotel, hvor der blev slået på gong gong´en da vi ankom. Efter en kølig frugtdrik ved ankomst blev vi vist til vores værelse. Det var desværre ikke var helt klar til os, så vi gik en tur på stranden og drak et glas lokal rosé-vin på resortets ‘italienske’ restaurant på stranden.

Da værelset var klar skiftede vi til badetøj for at tage en tur i poolen. På Bali står solen tidligt op og går tidligt ned, så det var desværre slut med det, men i poolen skulle vi jo! Heldigvis var der også en spa man kunne få varmen i. Temperatuen er ca. 25 grader om aftenen, men da resort´et ligger helt ned til vandet, er der en god vind hele tiden, så det kan virke lidt køligt om aftenen.

Vi spiste barbeque-buffet i en af hotellets restauranter, hvor vi sad udenfor og blev underholdt af traditionel balinesisk dans undervejs. Den hed Kancak (eller noget lignende) og var meget speciel :o ) Vi gik en tur i den store have der hører til resort’et og gik derefter på værelset, hvor vi i bogstaveligste forstand gik omkuld kl. 22 (kl. 16 dansk tid)!

I dag stod vi op kl. 8.30 og gik til overdådig morgenbuffet – der er ALT hvad hjertet kan begære. Ærgeligt, at det er lidt svært at overskue frisklavede omeletter i 30 graders varme… Da Susanne har været så fantastisk intelligent at glemme kontaktlinser, og Synoptik ikke umiddelbart har tænkt sig at hjælpe, gik vi efter morgenmaden til receptionen, for at spørge til mulighederne for kontaktlinsekøb. Den søde receptionist gav os navnet på et supermarked i Denpasar, hvor der også er en optiker. Efter et kort visit på værelset gik vi tilbage for at skaffe en taxa og fik en taxamand der ville køre os til Denpasar, vente to timer på os og køre os hjem igen… Til den nette sum af 150 DKK.

Denpasar er en noget anden verden end det luksus-sted vi befinder os på! Det er beskidt, rodet og kaotisk, men ifølge to danskere vi har snakket med, dog pænere end Thailand, Malaysia og Indien. Vi fandt en optiker der kunne sælge os en nødløsning, men det er da bedre end ingenting. Vi nussede rundt i godt en time, hvor Søren blandt andet købte lidt tøj og et bælte, men ikke de shorts han i virkeligheden mangler… Vi spiste et lille måltid traditionel balinesisk mad, hvor der ikke var taget hensyn til turister, da mængden af chili blev afmålt! Men det smagte godt og var meget autentisk :o )

Efter vi resten af dagen har fedet den for hårdt ved poolen, sidder vi nu her i piano-bar og skriver dagbog. Om en halv time skal vi på kinesisk restaurant.

I morgen tidlig skal vi til solopgangsyoga på stranden – det glæder vi os til!

Vi vender stærkt tilbage.

Søren & Susanne


af svrist d. 29. May, 2008 10:47

24. May, 2008

Christian Joergensen

Translate strings using Google Translate

Someone dared "me" to write a python interface for Google Translate. Here it is:

"""
translate.py

Translates strings using Google Translate

All input and output is in unicode.
"""

__all__ = ('source_languages', 'target_languages', 'translate')

import sys
import urllib2
import urllib

from BeautifulSoup import BeautifulSoup

opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'translate.py/0.1')]

# lookup supported languages

translate_page = opener.open("http://translate.google.com/translate_t")
translate_soup = BeautifulSoup(translate_page)

source_languages = {}
target_languages = {}

for language in translate_soup("select", id="old_sl")[0].childGenerator():
    if language['value'] != 'auto':
        source_languages[language['value']] = language.string

for language in translate_soup("select", id="old_tl")[0].childGenerator():
    if language['value'] != 'auto':
        target_languages[language['value']] = language.string

def translate(sl, tl, text):

    """ Translates a given text from source language (sl) to
        target language (tl) """

    assert sl in source_languages, "Unknown source language."
    assert tl in target_languages, "Unknown taret language."

    assert type(text) == type(u''), "Expects input to be unicode."

    # Do a POST to google

    # I suspect "ie" to be Input Encoding.
    # I have no idea what "hl" is.

    translated_page = opener.open(
        "http://translate.google.com/translate_t?" +
        urllib.urlencode({'sl': sl, 'tl': tl}),
        data=urllib.urlencode({'hl': 'en',
                               'ie': 'UTF8',
                               'text': text.encode('utf-8'),
                               'sl': sl, 'tl': tl})
    )

    translated_soup = BeautifulSoup(translated_page)

    return translated_soup('div', id='result_box')[0].string

Usage:

>>> import translate
>>> translate.translate('da', 'en', u'Goddag')
u'Good day'

af Christian Joergensen d. 24. May, 2008 22:32

20. May, 2008

Henrik Stuart

Pain rustique

While baking alone has a certain meditative quality, baking with others can be a lot of fun as you talk over the ingredients, help each other measure and fold and generally just have a good time creating food. So I took the chance when I had my sisters visiting to help my youngest sister try out one of the breads from Hamelman’s book, Pain Rustique. This bread, which requires a poolish, is very easy to make, and you do not have to wait 5 or 6 hours until it is completed (ignoring the activation time of the poolish, of course, which we left to sit overnight), but only require short 25 minute breaks, which is a lot nicer to have when you are focused on cooking. And lastly, it does not require any shaping, just like the ciabatta bread, making it very easy to handle for kids.

We did not get to take a lot of photos as we were making the poolish and folding the bread (there’s too much sticky dough everywhere when you’re two about baking the same bread), we did take some photos before loading the breads into the oven and after they were completely baked.

Finished dough for pain rustique

And once these beauties have finished baking, we get some nice, lovely breads.

Pain rustique

The general consensus between my sisters, my wife and I: mmmmmmmmmmm.

The bread has a lovely, subtle taste without any overpowering sensations. It’s a good bread to be used as the basis for any food, and it is about as good as my straight dough French bread (the first poolish bread that has really succeeded for me). If you do not have the time to wait the seven or so hours for the French bread, this is a good choice. I will most likely be utilising this more heavily once we have a child.

Photography and great taste, courtesy of my youngest sister (with a bit of aid).

af Henrik Stuart d. 20. May, 2008 17:57

Feeling peckish

I have so far gotten the hang of creating bread for our daily consumption by baking four .5 kg loaves once a week, freezing two of the loaves and taking them out of the freezer as needed. It’s a nice, relaxing routine to bake Hamelman’s straight dough French breads, and they have such a lovely taste. So as part of the celebrations of my oldest sister’s rite of confirmation, I offered to bake some bread and cakes to remove some of the stress from my parents as they were having the house filled with guests.

Being a fairly small family, I just had to bake for about 16 people, but then it started to nag at me… what if there isn’t enough food? So I cleaned out the kitchen tables and got ready to bake some cake.

Ready to bake some cake

The recipe I chose for the cakes was Fudgy Brownies from the most awesome chocolate book Crave by Maureen McKeon. This is the book for chocolate lovers. As I have remarked before I really do not like underbaked cake, so I usually give the cake a wee bit more in the oven than is given in the recipes (enough so that there is no batter left on a fork when I put it all the way through the cake and lift it up again). To liven it up a bit, I went to a specialty store and got candied violet leaves to decorate the cake.

I made a quadruple portion of the cakes, you know, just for good measure. Over a kg of sugar, over a kg of chocolate and lots and lots and lots of oat-based cream to avoid any fun moments with us lactose intolerant people. This is one heavy cake. The candied violet leaves worked wonders.

Decorated cake

Of course, this was the easy part. The fun part was to bake ten .4 kg loaves so no one would leave the party hungry. Not taking any chances I went with my tried and tested straight dough French bread from Hamelman’s Bread.

Ferment, my babies, ferment!

Is it just me or does this make you want to go ‘Ferment, my babies, ferment!’ in a good, classical cheap television production Frankenstein voice too?

Baking the French bread involves a lot of times where you need to fold the bread, it needs to be divided, shaped, scored, and baked, and the bread better not overproof or everything might be ruined! Three doughs meant that I had run out of alarm clocks to signal when I needed to do what! Fortunately, salvation was only 60 lines of Python away, and my laptop sat happily on the kitchen table, reminding me to do all the things in the correct order, at the correct intervals, and fortunately I timed everything so that none of the foldings, shapings or bakings got in the way of each other. I would feel daunted by trying to run a bakery and having to interleave not only three doughs, but thirty or fourty doughs!

Feeling peckish

So, feeling peckish?

af Henrik Stuart d. 20. May, 2008 12:16

04. May, 2008

Henrik Stuart

French bread with pâte fermentée

After having read through several bread baking books and websites there is one common thing I keep hearing, namely that breads baked with sourdough is the epiphany of breads, giving it a delectable, nutty taste. I must admit I have tried a bit of this and that, be it a poolish or a biga, and this time I have tried the pâte fermentée sourdough.

Pâte fermentée

The pâte ferments for about 12 to 16 hours before it needs to be used in the ‘actual’ dough. And while the bread that comes out of this dough is good, I still think the taste of my french bread has it beat with some margin. The bread is still airy, though, but a slight bit more dense than the straight dough french bread.

French bread with pâte fermentée

I guess I will just have to keep experimenting with the preferment breads until I come up with those delectable breads everyone is talking about, but until then, I will most likely keep making the straight dough french bread as my daily bread. Yummy.

af Henrik Stuart d. 04. May, 2008 13:47

28. April, 2008

DIKU Foto

Køb af optik i udlandet

Jeg har for lidt tid siden fået nogle penge tilbage for overskydende skat. Jeg mente godt jeg kunne tillade mig at brænde nogle af dem af på min hobby, som tydeligvis bliver dyrere jo mere interesseret man bliver.

Jeg har længe haft et godt øje til Canon EF 70-200mm f/2.8 IS USM. Da jeg først spottede den kostede den omkring 16.000,- i Danmark.

I skrivende stund har Kamerahuset (DKs bedste kamerabutik) den til 14.550,- med en cashback på 740,-. Altså en pris på 13.810,-.

Stadig ret pebret. Jeg tog et kig på priserne i udlandet, specifikt USA, fordi jeg før har købt min EF 50mm f/1.4 optik derfra. Den nuværende lave dollarkurs kunne måske hjælpe lidt på sagen.

Her er hvad jeg fandt hos 17th Street Photo:

Item Qty. Price Each Total
Canon EF 70-200mm F2.8L IS USM SLR Lens -77mm- 1 $1,699.00 $1,699.00
Hoya 77mm Enhanced Introductory Filter Kit (UV/Circ Polarizer/Warming/Enhancing & Pouch) -4 Filters- 1 $149.89 $149.89
Subtotal: $1,848.89
Tax: $0.00
Shipping: (International Air) $184.89
Total: $2,033.78

Eftersom jeg alligevel skulle betale for fragt tænkte jeg at jeg også bare kunne smide et Hoya filterset med i samme omgang. Det ved jeg af erfaring at man bliver meget glad for. Derudover er filtre ekstremt meget billigere i i USa end i Danmark.

Når man køber fra udlandet skal man dog lige huske et par ekstra omkostninger:

  • Told
  • Moms
  • Fragt

Fragten skal der ikke betales told og moms for, så den holder vi lige udenfor billedet indtil videre. Jeg har altså en subtotal på $1,848.89. Hertil lægges 7% for fortoldning af optik, plus 25% moms. Det giver mig en pris på ~$2,473. Hertil kommer fragten på $184.89, som bringer mig op på $2,657.

Med den nuværende dollarkurs giver det mig en cirka pris på 12.638,- i danske kroner. En væsentlig besparelse i forhold til at købe i Danmark, og så har jeg tilmed fået et filterset med.

Pakken leveres på fredag, og jeg glæder mig naturligvis som et lille barn :)

af Munter d. 28. April, 2008 10:23

Bryllupsbillede

Jeg var inde og se Maja og Uhds vielse i Esajas Kirke d. 12. april 2008.
Det blev til et par billeder med teleoptikken i kirken. De blev desværre ikke specielt gode.
Til gengæld fik jeg nogle gode skud da de kom ud foran kirken og stå i dagslyset.

Her er det billede der virkede bedst:

Maja og Uhd foran Esajas Kirke

af Munter d. 28. April, 2008 09:43

25. April, 2008

Henrik Stuart

Fresh Vietnamese spring rolls

Normally spring rolls is something with extreme amounts of fat and the hassle of deep frying them, so it was quite a refreshing change when I stumbled across fresh Vietnamese spring rolls on Haalo’s blog Cook (almost) anything at least once. Since these spring rolls require rice paper I had to find a small specialty store in central Copenhagen where I was able to buy it, fairly cheap taking into account how many spring rolls we have been able to make with it.

Rice paper

Each sheet is very thin but rather rigid and to be able to roll it, you dip it for a few seconds in tepid to warm water and then place it on a damp towel, add the ingredients and roll it up nicely.

Rice paper sheet

Keeping with Haalo’s recipe, we added steamed chicken, spring onions, lettuce, coriander and vermicelli noodles, although I think the original fresh Vietnamese spring rolls are made with minced pork, but nevermind this. The spring rolls were slightly rubbery, which the lettuce offset nicely, and they were excellent as a fresh, different appetiser. We will definitely be using this again.

Fresh Vietnamese spring rolls

af Henrik Stuart d. 25. April, 2008 14:12

Molten chocolate cake

I have to admit that we are cake lovers. In particular chocolate cakes seem to vanish almost as quickly as they are baked. Really, one would not have guessed from looking at this blog, right? So I was immediately hooked when I was browsing food blogs and saw that the Tuesdays with Dorie food blogger group was baking Molten chocolate cake. Once I actually found this, the week had passed and everyone had posted their molten chocolate cake results, and a couple of them including the recipe, so I had my wife pick up some fancy muffin forms for baking, and off I went.

Muffin forms

The recipe is actually very straightforward and the cake is basically an underbaked cake. With that in mind I used pasteurised eggs to avoid any fun moments due to salmonella. The cake came out exactly as I had intended:

Molten Chocolate Cake

As to the taste… what a disappointment. Even with the light, slightly acidic and fresh taste of pineapple, I will be no fan of this underbaked, pasty cake anytime soon.

af Henrik Stuart d. 25. April, 2008 12:27

12. April, 2008

Christian Joergensen

Bash history aggregation

So, I wanted to join the fun:

$ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s\n",a[i],i}}'|\
sort -rn|head
   87   python
   56   svn
   42   ssh
   38   cd
   33   rdesktop
   22   touch
   21   mplayer
   20   ls
   16   whois
   15   host

I guess it's obvious that I currently mostly work on python projects hosted on svn ;-)

What does yours look like?

af Christian Joergensen d. 12. April, 2008 08:35

08. April, 2008

Henrik Stuart

Pizza ai funghi e prosciutto

Pizza is, without a doubt, one of the most forgiving meals to make. Almost no matter what you put on it, people simply love this piece of dough. Of course, there are a few people who misunderstands the whole pizza concept and put bananas and stuff on them. That is just a plain frightening concept. Now, at its core, the pizza is ‘just’ another yeast dough, much like bread, although it is a somewhat more dense dough than most bread doughs I usually bake. In fact, a single pizza, normally serving four (but in our family 1½), is made of just that little ball of dough. This is what it looks after a good three hours of fermentation.

Fermented pizza dough

After beating the dough down and rolling it out, we get the much loved round pizza napolitana shape.

Shaped pizza dough

Ok, so perhaps my shaping skills are not the best, but it came out round-ish. This is our able foundation for anything pizza, whether it be napolitana or calzone, and it is ready to receive our chosen filling. For my dinner I had chosen a traditional mushroom pizza, pizza ai funghi, and this mean a nicely cooked tomato sauce with mushrooms, garlic (I went a bit overboard here since I am down with a nasty virus) and onions. This you, of course, smear across the pizza prior to baking it. It is very important to have let the tomato sauce mixture cook for a while so you get a lot of the excess water out of it as you’ll have a wet dough mess once you take your pizza out of the oven otherwise.

Pizza dough with tomato sauce

And presto, after a good bake you get a lovely pizza. Now, as I was rather short on mushrooms (we had used quite a few more than I had anticipated for our mushroom risotto the day before), I added some lovely prosciutto to the pizza after it had baked. Adding prosciutto after the bake ensures that the ham does not get as hard and rubbery as sole leather.

Those Italians really hit it well on figuring out a good all-purpose dinner subject that works with pretty much anything you’ve got left over in your cupboards. Amazing.

Pizza ai funghi e prosciutto

That’s all there is to making a lovely pizza from the contents of your cupboard. I hereby name this Pizza ai funghi e prosciutto. (That does sound quite a lot better than pizza with mushrooms and ham, does it not?) Buon appetito.

af Henrik Stuart d. 08. April, 2008 19:03