Feb 28 2009

Black Garlic

Here’s something I really want to try: black garlic. It’s a garlic root that has been “aged”, apparently by a fermentation process similar to that used for pu-erh tea.

Black garlic. I want some.

It doesn’t appear to be available in New Zealand yet, but I’ll be keeping my eyes open!

Found at the Washington Post. A little information from the American importers here.

Feb 27 2009

Spicy hot chocolate

With the days getting noticeably shorter and the Ya Ya House of Excellent Teas no longer selling their excellent Aztec Hot Chocolate, here’s a recipe for a spicy hot chocolate from my sister:

Take a pinch each of cinnamon, ginger and nutmeg, mix to a paste with chocolate powder and hot water, and top with hot milk.

I find most commercial hot chocolate powders to be too sweet, so usually mix my own out of cocoa and sugar in maybe a 3:2 or 2:1 ratio.


Feb 26 2009

KISS DRY YAGNI

Three concepts that I’ve come across in the software development world that apply quite nicely to the real world also are KISS (which of course originated in the real world), DRY and YAGNI.

KISS

Keep It Simple, Stupid! We’ve heard it often enough, and it’s still good advice. When faced with a problem, especially one that promises to be dull to complete, it can be much more fun to come up with something elegant and/or hugely complicated just because we can. This happens surprisingly often in the corporate software development world, where the boredom of mindlessly dull tasks can be relieved by stretching one’s intellect with a bizarre solution.

Sometimes this is a good thing. But if someone is ever going to have to maintain, fix, or modify what we’ve done, they’re in for a rough time. And it can be quite an “ah” moment when we go back to our own code and can’t make sense of it. There’s a time and a place for ridiculously written code, but often KISS is still the best approach.

DRY

Don’t Repeat Yourself came out of the Agile (capital “A”) software development movement. If you’re writing the same code twice, you’re better off refactoring down to one use (perhaps referred to from multiple places). At one end of the scale this is the concept behind using maths libraries instead of writing your own. At the other end, some rather religious XP types won’t let any block of code appear anywhere twice no matter what.

My take is that this is an excellent guide that should be followed most of the time. However, if I’m writing a script to parse a couple of files that I know I’ll only ever use once, I’ll probably cut-and-paste the solution for two files rather than write a slightly more elegant DRY solution. It’s faster, easier, just as easy to read, and gets the job done.

YAGNI

You Ain’t Gonna Need It. Another spin-off from the Agile movement, this principle says that you shouldn’t build something just because you might need it some time later. Carried to the extreme it means that you wouldn’t put subtraction in your maths library if you only need to perform addition today. In practice, it means that we shouldn’t second-guess what’s required next month when writing our code this month. It’s (usually) not too hard to refactor for extension to the code. The time may well come when new functionality just doesn’t fit the current code and a major overhaul will be needed, but it would probably be a good idea by then anyway. Of course, if you know that you’ll have to persist data next month there’s no harm in making sure that this month’s code can talk to a database, but be reasonable.

(Side note: this principle seems to be violated by every J2EE project I’ve ever had the misfortune to come across.)

Example

Recently I was comparing Content Management Systems; let’s apply these three principles to a comparison of Joomla and Silverstripe.

KISS: Joomla has been around a while, and has a plethora of plugins and extensions. It changed the internal naming structure a few versions ago, so the online documentation (such as it is) is not as clear as one might wish. Silverstripe is a younger player with a smaller market share. It does the basics very well, and has a few plugins free available. Joomla is hugely configurable and has a variety of WYSIWYG editors available, while Silverstipe is simpler (and in my mind, cleaner and sleeker). Silverstripe wins on KISS.

DRY: As far as could tell from the quick assessment I had the time to do, both allow configuration to be done once to set the site up. Equal.

YAGNI: Clear disparities here. Silverstripe has either inbuilt functionality or plugins for basic requirements. It allows for reasonably straightforward development of additional plugins for other tasks. Joomla has a large amount of inbuilt functionality and about a zillion plugins (written by people of varying talent) available. There are dozens of ways of doing everything. It’s unclear what the “best” (or even “good enough”) approach is, and new users are either overwhelmed by the choice or try to install every plugin under the sun, with predictably poor results. Silverstripe the winner by a country mile.


Feb 25 2009

More on peanut desensitisation

When I wrote about the recent peanut desensitisation trials in the UK I said

This is the first real breakthrough in the search for a cure for food allergies.

I should clarify that.

There is no cure. At the moment there is no sign of a cure. What the British trial demonstrated is that it is possible to raise the threshold of sensitivity — where a child had previously reacted to a very small dose of the allergen, they could now tolerate a lot more before a reaction was triggered. However, the allergy remains. If they eat enough of the stuff they can still have an anaphylactic reaction.

What the desensitisation treatment does is remove the worry of what can happen through accidental exposure, and that’s an excellent thing.


Feb 25 2009

Successful peanut allergy desensitisation

Previously considered too risky, a peanut allergy desensitisation programme has been successfully trialled in the UK.

Desensitisation — a process where the patient is injected with increasingly large doses of the substance they are allergic to — is often used to treat allergies such as bee stings and hayfever. No trial for peanut allergies has ever been successful, though, because of the high risk of a catastrophic (and potentially fatal) anaphylactic reaction when the substance is injected.

In this case, the doctors put down their syringes and gave the desensitisation treatment orally — the children ate very small amounts of peanut. After a course of treatment where the amount of peanut given was slowly increased over time, children who previously had anaphylactic reactions to very small amounts of peanut could safely consume several peanuts at once. One child who had an anaphylactic reaction while being assessed at the start of the study was able to eat 10 peanuts by the end.

This was an initial trial with only four children participating (there’s a larger trial under way), but the results give hope to all of us who in one way or another are living with the risk of anaphylaxis always at the back of our minds. This is the first real breakthrough in the search for a cure for food allergies.

Needless to say, this is not something you should try at home.

Background

Food allergy is an increasingly common issue, due in part to greater publicity but also to an increasing incidence of reactions. Sufferers must strictly avoid all contact with the food to which they are allergic. In many cases this is very difficult, and special allergen-free food must be purchased.

In severe cases sufferers carry adrenaline auto-injectors (“Epi-pens”) with which they can inject themselves should a severe reaction occur. While relatively easy to use, these are expensive and have a short shelf life.

Support organisations are staffed by people with experience and knowledge of food allergies and are a good source of information and resources.

Seen at the Telegraph.

Feb 24 2009

A sandwich worth dying for

I know it would probably kill me, but this is a sandwich worth dying for.

The Sandwich of Knowledge

The Sandwich of Knowledge

More cholesterol than an entire Army mess. The bottom tier contains eight strips of bacon, six sausages and four burger paddies; followed by a second tier of black pudding; topped by a third tier comprised of two diced chicken breasts and six fried eggs.