Kanojo Blog Blog-Blog


Robust HTML Parsing (in Ruby)?

Have you ever wanted to parse information from some rather complex or totally broken (in terms of html standards compliance) website? Maybe you tried fighting that problem with regular expressions or DOM or SAX XML parser. If you did you probably ran into some problems: Maybe there were too many similar matches for your regex as there are repeating similar patterns in the website or your XML parser went crazy with invalid formatted or non-xhtml-compliant content?

I wanted to parse a website that had no RSS feed for changes and create a RSS feed. I first tried around with various of the ideas mentioned above but as the website is kind of "irregular" (every item is a slight bit different) and W3 validator shows over 11k of errors (in 1.1 transitional) i had quite some problems.

Until i found Rubies Hpricot, a HTML parser that lets you realize robust HTML parsing of fucked up formatted and non-standard-compliant content at ease.


Backferment (special yeast) bread

Recently we've been into baking bread. Like, traditional easy bread thats tastey and available kinda quick after you've decided you wanted bread for dinner or supper. Anyhow those simple baguett-like yeast bread, even though they require quite some trying around to be able to properly handle the yeast properly to achieve a even fluffyer result have gotten somehow boring. So we thought we might give a tip by the Mum of a friend a try.

Thats a special kind of yeast thats harvested from natural yeasts in honey carried in by bees from various sources (yeasts exist all over the world, thats how beer and bread used to work in medieval ages). Its called "Backferment" (no translation found, sorry) and was developed by Hugo Erbe around the beginning of the century.

The making is somehow troublesome and similar to sourdough, you first need a quite fluid base which consists of:

- 150g flour type 405

- 150g freshly ground wholemeal flour

- 300-400g water

- 10g Backferment

and that needs to stand at ~28*C for a day. You should see quite some bubbles rising after that. After that you need yet another base, the breads sponge which is a bit less fluid (300g of any flour, 20-30g of the base and 5g Backferment) and yet again needs to stand a half day to swell and expand. Again bubbles should be clearly visible. The rest is easy, add another 700-800g of any flour, salt, oil and whatnot to your liking knead, let rest for 2 hours (or better: until it starts to collapse slightly again), bake until finished, thats it.

The result was astonishing, a slight, mild taste like sourdough, but not as harsh as real sourdough. It was super fluffy, but IMO with 1/3 freshly ground wholemeal flour it tasted a bit too solid, so 100% type 405 is my recommendation :). In any case, Backferment is worth the trouble and produces a bread thats quite different from regular yeast white bread and sourdough bread. Its uniqueness is expressed in a mild, pleasant taste that reminds of sourdough.

For anyone whos eager to try some new breadmaking techniques and play around, Backferment is sure one of the ways to go :). Be also sure to check back as we try out specific recipes for great breads. As soon as the look of the is up to a nice standard we'll also post pictures :P. Bon appetit!


Ladder Stitch

You're going to use this stitch many times if you make plushies, usually used for closing after you've stuffed them. It's made of awesome. I plan to write a more detailed description this stitch in the future but these pictures have to suffice for now. You can google it in the meantime.


Like this (click for bigger picture). And pull every few stitches.


It'll close magically!