If only

Note: This entry has been restored from old archives.

sigh A Grade I listed medieval fortified Manor House.

Nappa Hall

It actually seems cheap at 500k, of course nothing is really cheap at that sort of price, not for us plebs. OK, so it has damp problems, is mostly uninhabitable, in fact, it’s bordering on a ruin. So what, I say. Can’t let that get in the way of the dream.

It’s got looks, land, and history: “Mary Queen of Scots was once imprisoned in the house.”

I can imagine limiteless potential, alas, from my PoV the price may as well be limitless as well.

Zucchini (Courgette), Red Leicester, and Quinoa Loaf

Note: This entry has been restored from old archives.

Zucchini, Red Leicester, and Quinoa Loaf

Zucchinis galore! That’s been our life this month, and probably next month as well by the looks of it. I’ve been frying, BBQing, baking, and even broiling zucchini. Zucchini omelette, zucchini scrambled eggs, zucchini pancakes! If you’re going to grow zucchinis, and it is well worth it, be aware that 1 plant may serve a couple well, 2 will keep you well stocked, and 3 will have you well an truly up to your ears in the things!

This recipe only used one large zucchini in the end, not being in Australia these days I should be calling them courgettes I guess. Anyway. One 600g zucchini down at least, and something a bit more interesting to eat. Though not one for those worried about Calories (while I’m usually obsessed about them, I’m on a bit of a break from that for now.) Interest in food often hits you hard in the Calorie budget – so burn more!

The zucchini adds bulk, colour, and moisture, I’m not sure it does much for flavour. The Red Leicester is all about flavour, but also brings great colour. The Quinoa brings in texture and also a great sort-of-beany flavour.

All up the ingredient list is:

Ingredients
  • 600g — Zucchini
  • 450g — Red Leicester cheese
  • 100ml — vegetable oil (I used sunflower)
  • 100ml — extra virgin olive oil
  • 450g — self raising flower
  • 150g — quinoa flakes
  • 225g — semi-skimmed milk
  • 3 — eggs
  • 3 tsp — hot English mustard
  • 1 tsp — black pepper
  • 2 tsp – bicarbonate of soda
  • 1.5tsp — baking powder

Looking evil, no? Using semi-skimmed milk looks like a joke given its brethren in that list! Rest assured that semi-skimmed was used because it’s what we have in the fridge, full-cream will do just fine.

The bi-carb and baking-soda as well as self-raising flour may seem overkill, but given the wetness of zucchini and heavy oil content they’re essential to avoid ending up with a cheesy-zucchini-brick. Most recipes I found along these lines used a lot more actually, as much as twice what I’ve used. But I don’t like the flavour imparted by adding too much of these raising agents and stopped adding them based on taste. In the end I got a light enough texture to suit me (click on the photo up the top for a close-up of the texture.)

Before mixing up the batter pre-heat your oven to 180°C and prepare appropriate baking tins. This recipe makes a large volume, even the photo below isn’t quite all of it as there were 2 muffins that didn’t survive until the photo shoot! Warm muffins fresh from the oven… mmmm. Adjust the amounts to suit whatever zucchini you’ve got I guess, give or take 100g of accuracy on the zucchini shouldn’t be a problem.

Mixed

Making the batter is trivial. Sift the flour into a mixing bowl, and mix in the quinoa, bi-carb, baking soda, and black pepper. In another bowl put the oils, milk, eggs, and mustard. Whisk this well until combined, then gradually mix in the dry ingredients forming a smooth batter.

Grate the zucchini and cheese and mix together. Put all but a couple of handfuls into the batter and stir through.

Now spoon into greased loaf tins or muffin trays. A loaf tin can be filled to 4-fifths volume safely, muffin trays can be filled almost to the top. Distribute the reserved cheese and zucchini over the loaves/muffins as a topping and pop into the oven.

Baked

Muffins are done after around 30 minutes, loaves will take 45 minutes. As usual the skewer-test is the best way to tell where things are at.

Simple!

The loaves and muffins should keep well in the fridge for at least a week, and reheat well, thanks mainly to the high oil content. For the same reason freezing is also an option, we’ve popped most of the muffins in the freezer for future lunch-content which should serve us well for a couple of weeks after our break. (We’ve been on holiday-at-home for a week, and I’m starting a new job on Monday and won’t be working from home any more so I have to start thinking about my own packed lunches!) You can toast slices of the loaf, but be careful getting it out of the toaster as it can break apart easily. Slices of the loaf are actually excellent grilled on the BBQ, serve with some grilled zucchini!

BBQed

In fact I’m off to have a slice for breakfast right now, with a fried egg and some steamed buttery sorrel.

Quick

Note: This entry has been restored from old archives.

“because it’s not compiled, it’s also very quick” [1]

It’s a different definition of quick of course, but somehow I begin to feel disconnected and trolling mode wells up from the darkness within.

But… even in that sense, is it really as quick as we think it is? In my experience it certainly makes it quicker to discover new and interesting types of bugs.

The quote relates to Ruby, but really, be it Ruby, Perl, or Python it seems much the same.

[1] I’ve quoted from the 3rd page of an article there. I’m still not quite sure why these sites bother to separate their articles into “pages.” Even SMH used to be one-page-per-article before this pagination fad caught on.

Bitten by the python

Note: This entry has been restored from old archives.

I play with the snake from time to time, Python having now almost entirely supplanted Perl as my hak-n-slash language. But I’m certainly still learning as I go. Today I’ve been trying to work out what’s gone wrong with something I’m doing. I thought I’d done something strange with inheritance, not understanding some case where inheritance causes data to become static (in the sense of static members in C++.) What was really the problem is that I didn’t realise that default parameters to members are kept and reused, and if you go and use a parameter you can end up with state being held on to where you don’t (well, I didn’t) expect it.

I’ve hit this at least once before I think, it is vaguely familiar. Anyway, it’s a bit of a tricky gotcha as far as I’m concerned. Intuitive? I wouldn’t say so. Here’s the example:

#!/usr/bin/python

class Parent:
    def __init__(self, stuff = []):
        self.stuff = stuff
    def doIt(self):
        print " ".join(self.stuff)
    def addStuff(self, stuff):
        self.stuff.append(stuff)

class Child(Parent):
    def __init__(self, stuff = []):
        Parent.__init__(self)
    def doIt(self):
        self.addStuff("foo")
        Parent.doIt(self)

c1 = Child()
c1.doIt()
c2 = Child()
c2.doIt()
c3 = Child()
c3.doIt()

Execute this and we see:

foo
foo foo
foo foo foo

What? Why is it accumulating “foo”s? The answer is in the “stuff = []” argument to __init__. What is going on, as far as I can garner from the documentation, is that that default argument (a list) is being instantiated once and then kept for future use. What’s more, I’m assigning self.stuff to this, which is kept as a reference and doesn’t create a copy. So I have ended up with a static value for self.stuff, well, within the functionality of this code – it isn’t entirely congruous to a static member.

How to fix it? I don’t know the definitive approach, but here’s a couple of ways. To achieve complete deep copying of the argument whether it be default or passed in use copy.deepcopy:

#!/usr/bin/python
import copy

class Parent:
    def __init__(self, stuff = []):
        self.stuff = copy.deepcopy(stuff)
...

Alternatively, you could use copy.copy for a shallow copy and I guess that might be analogous to this:

#!/usr/bin/python

class Parent:
    def __init__(self, stuff = []):
        self.stuff = []
        self.stuff.extend(stuff)
...

I’m sure there are great uses for this behaviour in Python. What are they? Something more fundamental than “neat tricks” involving incremental/changing default state? Am I the only one to think this somewhat of a gotcha?

Now that I’ve worked out what was wrong I can retrospectively build the right Google magic to get straight to the answer.

No time to read up on more casual chatter about it though. The documented formula is something like:

#!/usr/bin/python

class Parent:
    def __init__(self, stuff = None):
        if stuff is None:
            stuff = []
        self.stuff = stuff
...

I have the netz!

Note: This entry has been restored from old archives.

Finally, I’m ADSL-Internet enabled. Couldn’t have come on a better day, this morning my O2 donglenet refused to connect. O2 had some technical fault I guess (it works now.)

Anyway, this means I can now upload photos painlessly!

Making O2 donglenet more reliable

Note: This entry has been restored from old archives.

In theory my ADSL finally goes live tomorrow. The frustration of trying to work without a reliable ‘net connection has been high. The O2 mobile broadband account has been a life-saver, although it certainly has its failings.

There’s one thing that has been rather a bother. While SSH connections are fairly manageable, the only problem being intermittent disconnections lasting 5 to 10 minutes, HTTP behaves very badly. Even when I did have an apparent working ‘net link, evidenced by the fact that my SSH sessions were still live, HTTP connections would time out and fail regularly.

I have HTTP working pretty well now, here’s what I did:

  1. Forward all HTTP(S) to a remote proxy, in my case running on a machine I have in Germany.
  2. Stop using the O2 allocated DNS addresses, I’m using OpenDNS‘s 208.67.222.220 and 208.67.222.222 instead, though I’m considering just using my own remote DNS server.

The former should be all that is required, however it looks like Opera uses local name resolution for something even when a proxy is set up. The latter alone may be sufficient too, since the ‘net is certainly still there but it looks like name resolution times out or fails.

Linux Freeziness

Note: This entry has been restored from old archives.

I’ve been using Linux for quite some time now. It’s been more than 10 years since my first hesitant install of Debian (from the front cover of a tech mag) in early 1998, and a little longer since I first poked at my cousin’s Linux computers. In the earlier days of my Linux use there was rarely a time I had to power-cycle a locked up machine when I was running a ‘stable’ distro. Sure, sometimes a bleeding-edge X, or somesuch, would lock up – but I was nearly always able to switch to a console or get a serial terminal and kick it in the arse.

Things seem to be a bit different now. More and more often I’ll have to hold down that power button. Sometimes I can magic-sysreq a reboot, but often not. The culprit is usually web browsers, but sometimes other X applications. It does seem to be an X thing. I use an RC Firefox with a beta Flash, so I expect breakage. What I don’t expect is breakage in my userspace apps to lock up my machine irretrievably. Especially since I’m using a stable distro, aside from the Flash and Firefox my machine is 100% Ubuntu ‘gutsy’ (no proper ‘net yet so I haven’t done my dist-upgrade, the 13th I’m told now, Friday the 13th! Joy.)

Linux never used to do this to me. Has robustness suffered in the quest for a snappier user experience? Am I just unlucky? It could be my non-free video driver (nvidia) I guess. I haven’t had the time to try debugging the problem, I should really, since it can be replicated.

Maybe I’m just seeing the past through rose coloured glasses, could it have been worse than I recall? I’ve had to reboot twice this morning, so now I’ll stop trying to play with the Firefox RC and get back to browsing with Opera.

That aside, it looks like Firefox 3 could win me back from being an Opera user. If my bloody Linux stops hanging when I use it!

O2 Donglenet

Note: This entry has been restored from old archives.

My donglenet is cool because I can post this from my laptop while travelling home on the train while passing between a couple of fields.

OK, so it cuts out from time to time, well… a lot, and can’t handle tunnels at all.

Yeah, it isn’t really that good.

But it’s still cool. 🙂

Of course, funny to think that I had access to this very same coolness nearly 5 years ago when I got my first 3G handset back in Sydney. Old tech in new packaging (though definitely higher bandwidth.)