[107465 views]

[]

[toggle ads]

Odi's astoundingly incomplete notes

New Entries

Stuffed pepperoni with quinoa

It's as simple as it sounds, delicious and vegan. If you don't know quinoa, it's cooked like rice. Unlike rice however it's complete in amino acids.

Use your favourite vegetable for the filling. We used zucchini and soy cream. The red sauce is basically just passata with salt.



posted on 2010-06-14 21:38 CEST in Food | 0 comments | permalink

Why you never develop on a branch

I always tell my fellow coders: never develop new features on a branch.

By branch I mean a stable release CVS branch. That is usually a bit "old". HEAD is quite volatile. New concepts are introduced, old ones removed. Refactoring occurs on the HEAD.

So if you start to build something on the old branch and then port it to HEAD, your code may be based on old/deprecated concepts and will fail to support new features correctly.

Another factor is human errors: forgetting to port a patch between branches. If you develop on the branch, your customer is happy. But in the next release he will be unhappy when he notices that a change has been lost. If you develop on the HEAD you get immediate feedback from a customer when you forget to backport a change.

In general it's easier to write the code for HEAD and then backport it to the branch world. Also the backport should happen gradually and not as a big bang.

posted on 2010-06-10 11:30 CEST in Code | 0 comments | permalink

Excel CSV WTF

Oh what? Surely having an ID column at the beginning is something totally unusual.

posted on 2010-05-17 08:20 CEST in Code | 0 comments | permalink

Tethering with HTC Hero on Gentoo

I have added a section on that to my MacBook Pro page. Also the kernel config has been updated accordingly.

posted on 2010-05-13 16:39 CEST in Updates | 0 comments | permalink

ata failed command: FLUSH CACHE

I got bitten by this problem in a 2.6.31 and .32 Linux kernel:
Apr 28 16:21:53 kernel: ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
Apr 28 16:21:53 kernel: ata2.00: failed command: FLUSH CACHE
Apr 28 16:21:53 kernel: ata2.00: cmd e7/00:00:00:00:00/00:00:00:00:00/a0tag 0
Apr 28 16:21:53 kernel: res 40/00:01:00:00:00/00:00:00:00:00/a0 Emask 0x4 (timeout)
Apr 28 16:21:53 kernel: ata2.00: status: { DRDY }
Apr 28 16:21:55 kernel: ata2: soft resetting link
Apr 28 16:21:55 kernel: ata2: soft resetting link
Apr 28 16:21:55 kernel: ata2: nv_mode_filter: 0x3f39f&0x3f39f->0x3f39f, BIOS=0x3f000 (0xc700c6c0) ACPI=0x3f01f (20:60:0x1f)
Apr 28 16:21:55 kernel: ata2: nv_mode_filter: 0x739f&0x739f->0x739f, BIOS=0x7000 (0xc700c6c0) ACPI=0x701f (20:60:0x1f)
Apr 28 16:21:55 kernel: ata2.00: configured for UDMA/100
Apr 28 16:21:55 kernel: ata2.00: configured for UDMA/100
Apr 28 16:21:55 kernel: ata2.01: configured for UDMA/33
Apr 28 16:21:55 kernel: ata2.01: configured for UDMA/33
Apr 28 16:21:55 kernel: ata2.00: device reported invalid CHS sector 0
Apr 28 16:21:55 kernel: ata2.00: device reported invalid CHS sector 0
Apr 28 16:21:55 kernel: end_request: I/O error, dev sdb, sector 58604962
Apr 28 16:21:55 kernel: md: super_written gets error=-5, uptodate=0
Apr 28 16:21:55 kernel: md: super_written gets error=-5, uptodate=0
Apr 28 16:21:55 kernel: raid1: Disk failure on sdb3, disabling device.
Apr 28 16:21:55 kernel: raid1: Operation continuing on 1 devices.
Apr 28 16:21:55 kernel: ata2: EH complete
Apr 28 16:21:55 kernel: ata2: EH complete
Apr 28 16:21:55 kernel: RAID1 conf printout:
Apr 28 16:21:55 kernel: RAID1 conf printout:
Apr 28 16:21:55 kernel: --- wd:1 rd:2
Apr 28 16:21:55 kernel: --- wd:1 rd:2
Apr 28 16:21:55 kernel: disk 0, wo:0, o:1, dev:sda3
Apr 28 16:21:55 kernel: disk 0, wo:0, o:1, dev:sda3
Apr 28 16:21:55 kernel: disk 1, wo:1, o:0, dev:sdb3
Apr 28 16:21:55 kernel: disk 1, wo:1, o:0, dev:sdb3
Apr 28 16:21:55 kernel: RAID1 conf printout:
Apr 28 16:21:55 kernel: RAID1 conf printout:
Apr 28 16:21:55 kernel: --- wd:1 rd:2
Apr 28 16:21:55 kernel: --- wd:1 rd:2
Apr 28 16:21:55 kernel: disk 0, wo:0, o:1, dev:sda3
Apr 28 16:21:55 kernel: disk 0, wo:0, o:1, dev:sda3
Apr 28 16:21:55 mdadm[5734]: Fail event detected on md device /dev/md1, component device /dev/sdb3
Apparently a cache flush timed out. This leads to a failure of the RAID and the disk goes offline. Just removing and re-adding it with mdadm of course fixes the RAID again. But it occurred a couple of times and is annoying.

The machine is a media PC with an nVidia Corporation nForce2 chipset. Two IDE disks are attached to the PATA bus and running as md RAID-1 volumes. The disks are really old and may not be the best quality (thus the RAID-1...).

There is a patch that may actually address exactly this problem, by simply retrying the command.The patch is in 2.6.34 and will be in 2.6.33.4 and 2.6.32.13.

posted on 2010-05-11 08:40 CEST in Code | 0 comments | permalink

The protein myth

Meat is high quality protein1. Meat gives you all the protein your body needs.

1see bottom for definition


These are the words you have most likely heard. And they are true. They are one of the top facts used by the meat industry to trick you into believing that you need to eat meat. And that is not true. You don't need meat - at all. You can even get rid of all animal products in your diet. With no adverse effects - rather the opposite.

What few people realize:

It's near to impossible to suffer from a lack of protein
Unless you live in a region where famine is a common problem.

Also a vegan diet delivers all essential amino acids.
Because vegans don't eat only a single vegetable. The 8 essential amino acids are abundant in the following plants: And we haven't even listed soy products here. Soy contains all essential amino acids anyway. All this means that it's important for vegeterians and vegan to have a wide diet. A "junk food veg" is very likely to develop deficiency symptoms. A combination of seeds, nuts and cereals is a good source for your protein. And of course eat lots of vegetable every day anyway.

What is "high quality" protein?
The building blocks of all proteins are amino acids. There are 20 different amino acids. All but eight of them can be made by your body by chemical reactions. The other eight you have to eat and ingest. They can not be made by your body. They are thus called "essential amino acids", because it is essential to eat them.

Protein (or a combination of proteins) that contains all the essential amino acids (and any number of nonessential ones) is called "high quality". Animals and the human body store essential compounds in generous quantities in order to compensate any temporary shortage. Thus meat contains a lot of high quality protein.

posted on 2010-05-10 21:20 CEST in Food | 0 comments | permalink

Going veg

I have gone vegetarian since the beginning of the year. I have stopped drinking milk. Although I am not avoiding milk altogether: I still consume milk as an ingredient (like butter in cookies), eat yogurt and cheese. I have stopped eating egs. Although I am not avoiding eggs strictly: I still eat cake, pasta that contains eggs, but not an omelett. I only eat fish when by the sea. The sea is an 8 hour's drive away.

Why? Several reasons: Since I have moved in together with Annika (who is a vegan vegetarian), my cooking has become almost completely vegan these days. Mostly out of practical reasons and respect. But it's also a very interesting experience. And I haven't missed a thing, I must say. Our meals have always been delicious.

So what do I actually eat? This is what this new catgory in this blog is going to be about. Random facts surrounding a vegetarian/vegan diet. Random recipies or notes of what I eat. Random experiences I make while becoming a vegetarian.

posted on 2010-05-10 20:45 CEST in Food | 1 comments | permalink
FWIW, I gave up meat in 1993/4, and actually grew rapidly quite a lot fatter.

I don't expect you need me to tell you this, but try to avoid the grim and tasteless dishes which are just veggie versions of meat dishes. Meat-eaters sometimes lack the imagination (or confidence) to offer anything else, and may need educating. I deal with that by example: my friends, including meat-eaters, know me as a good cook, and take pleasure in proud and honest veggie food.

- niq

WS implementors

Next time you implement a webservice framework, please: Thanks. Most WS infrastructure sucks badly.

posted on 2010-05-05 17:08 CEST in Code | 0 comments | permalink

Jack ok, but PulseAudio?

I heard a lot about PulseAudio. I have used Jack. I read Lennart's post about PulseAudio and Jack. Still I don't see why I "need" PulseAudio. I have never used it. And I am not missing a thing. Audio comes out of my Gentoo box just fine using plain ALSA. No KDE phonon. No arts. No esd. Just ALSA. So what's the point of having PulseAudio altogether? Maybe you can enlighten me.

Notes from readers, my comments appended:


posted on 2010-05-05 10:38 CEST in Code | 3 comments | permalink
- per application volume control
- sane volume control (ALSA presents lots of sliders, most of them doing nothing)
- seamless switching between different audio devices (think speaker -> bluetooth headset)
- mixing audio in userspace where it belongs

and most important: - fixing long-standing bugs in some ALSA drivers...
- sound over a network
for example, PulseAudio help me to fix problem with flash plugin - there was no sound on my debian unstable.

No URL alias in Tomcat?

Is there seriously no way to create an arbitrary (i.e. cross-context) alias for an URL in Tomcat? I don't want a HTTP redirect, I don't want inefficient reverse-proxying, I don't care about cookie security (as cookies are not used), I don't want HTTPD in front. Just a simple stupid alias. That is the alias URL calls the same servlet code as the aliased URL. Also known as URL rewriting.

I want: http://localhost:8080/old-service  -> http://localhost:8080/axis/services/new-service

Filters and not even Valves can do that, because implementations must not "change request properties that have already been used to direct the flow of processing control for this request". Seriously? 2010?

Reason: I have a webservice that has been migrated to a completely different infrastructure, and thus a different context. The clients should not need to be changed. And the clients don't support redirects.

posted on 2010-04-21 08:59 CEST in Code | 1 comments | permalink
Why not run Tomcat in Apache 2.0 and then you can do your aliasing from Apache 2.0... ref aliasing in tomcat, I'm not sure on that (I assume from your rant that it isn't possible).

Best regards

Steve