Skip to content


Surprise Dining Algorithm Problem

All I have to do is organise 16 dinner parties… how hard can it be?

The Rotary Club of Reading Abbey have a season of Surprise Dining, each couple signed up will host one dinner party and go to three others. The host of the dinner party does the main course, the other guests do the starter, pudding and cheese. Each couple involved will cook an entire meal but in stages.

Paris
The Rules
- Each couple will attend 4 dinner parties
- Each couple will do the Main Course once, Starter once, Pudding once, Cheese once
- Each couple should only encounter the other guests once at the dinner parties (you only have dinner with couple A once, not meeting them again)

So… is this possible?

If So… there has to be an algorithmic answer to this… I look to you stats-based people for help!

I need 16 combinations of the letters A to P where each letter is in position 1 (starter), 2 (main), 3(pudding) and 4(cheese) only once. AND there are no repeating combinations of letters – so a,b,c,d and b,a,e,f wouldn’t work as a and b have already seen each other the previous week.

Any and all ideas gratefully received!

Posted in Food, Tech Musings.

You’d be amazed what you can do with a frozen banana

Humans are wonderful creatures, almost any issue you have, someone else will have had it before you – and now thanks to the internet, you can find these people and read blog posts about how they dealt with it, you can message them on twitter and talk to them about it. Sometimes we forget just how amazing this is.

This is amazing, even when we’re talking about the rather bizarre problem of what to do with frozen bananas.

We are all familiar with the concept of testers, these are wonderfully honest people that go though your applications and find all the bugs, niggles and irks for you to fix. They can be frustrating people but oh-so-useful. I am lucky enough have my own panel of testers -  dedicated, hard working people that, for the sake of friendship and honour, allow me to try out new recipes on them. I love each and every one of them. The "mmmm, that’s not bad" from them is the highest accolade a cook can have, it’s like an addiction – alas this is something I have given up for the moment…

My good friend Ben is currently taking part in a very worthwhile challenge – Lay off the Cake – he and his colleague are competing to see who can lose the most weight. Out of respect and in support of this I have refrained from baking fat laden goodies when I know he will be around – it’s been surprisingly hard – but last week I discovered something rather wonderful…

For reasons too mundane to go into here I had shoved some rather ripe bananas into my freezer before going away for the weekend. The natural consequence of this is that last Monday found me googling (Yes, Googling….) the phrase "Frozen banana recipes". What I found was rather remarkable.

How To Make Creamy Ice Cream with Just One Ingredient! – from http://www.thekitchn.com

It turns out that if you blend a Frozen Banana and nothing else it turns into something with the texture and taste of ice cream.

I know… that’s the exact expression of incredulity I had.

After this expedition into the crazier side of the internet I met up with Katherine “The Sorceress” Robinson and told her this tale. She also instantly screwed her face into the classic ‘You can’t make ice cream from frozen bananas’ expression but we thought it was worth a try. Home we went and – as all good scientists must do before an experiment – made tea.

With the comforting wafts and warmth of Yorkshire Tea to bolster us we went for it. The first thing we learnt – pealing a frozen banana is not an easy task.

frozen

Eventually the chopped frozen banana was in the plastic prison of my Kenwood Mini Chopper, lid in place. We shared the by-now familiar expression of ‘You can’t make ice cream from frozen bananas’ and pressed the button…

 chopped

We got chopped banana. We were significantly underwhelmed.

But we had gone too far to give up now. After the effort that went into peeling the thing it was personal. So, more blending… This time we got finer chopped banana. The cause was lost, we were just making a mess now. We silently vowed to never believe anything the harpy that is the internet said ever again. That purveyor of broken promises and dreams was dead to us.

Without any hope in my heart I gave it just one final blast of the blender and the magic happened. Suddenly. Peacefully. The chopped banana collapsed in on itself and turned creamy with barely a sigh as it let go if it’s solid form and relaxed into creamy goodness.

cream

We had ice cream.

Teaspoons. Tasting. Raised eyebrows. Incredulity. This was ice cream! This was Fat-Free ice cream. This was Ice Cream with all the nutritional merits of a banana and nothing else. In that one taste we forgave the internet and let it back into our hearts.

Then the best bit. Ben arrived. Once again I got to do something I love – feed something yummy to someone who loves their food and suddenly, all was right with the world once more.

final

Posted in General, cooking. Tagged with , , .

Peppers

Posted in General.

Dutch flag cake by @stitchersue for the football

Posted in General.

The FizzBuzz Problem and Diving in Too Soon

One of my developer friends – Nick Telford – tweeted this article about Programmers and the lack of those that seem able to programme.

Will The Real Programmers Please Stand Up? http://retwt.me/1NEBw // another example of how diluted our industry really isless than a minute ago via TweetMeme

This article linked to anothe one – Why can’t programmers…program? – which mentioned the FizzBuzz problem.

The idea is simple, all you have to do is write a program that prints out the numbers 1 to 100, but for multiples of 3, print Fizz instead of the number and for multiples of 5 print Buzz. If the number is a multiple of both, FizzBuzz should be printed.

So here’s my answer – in php of course.

  1. <?php
  2. $x = 100;
  3. for ($i=1; $i<=$x; $i++) {
  4.     $msg = "";
  5.     if ($i % 3 == 0) {
  6.         $msg = "Fizz";
  7.     }
  8.     if ($i % 5 == 0) {
  9.         $msg = $msg . "Buzz";
  10.     }
  11.     if (strlen($msg) == 0) {
  12.         $msg = $i;
  13.     }
  14.     print $msg . "<br/>";
  15. }
  16. ?>

This complies with all 4 of the requirements (numbers, Fizzes, Buzzes and FizzBuzzes), which is the point – many developers when set this task miss out one or more of the vital parts clearly stated in the specification.

It all goes back to what your mother told you when you had your first exam at school – remember to read the entire question first before diving in.

So did I miss something? Can you do it more efficiently?

Posted in Tech Musings.

see, *this* is what I wanted a tablet for, recipes @jamesbmarshall

Posted in General.

The Lure of the ‘New Shiny’ – Satisfying Gadget Lust

Everyone has an array of guilty pleasures that they indulge in as and when. Something that makes them feel alive. Sends the tingles down to the very tips of their fingers.

An act that not only makes you feel every so slightly, but also deliciously wicked –  makes your toes wiggle, hidden in your sensible shoes under your desk just thinking about it.

I’m about to indulge in one of my (oh so very few) weaknesses – the one I internally refer to as ‘new-shiny’.

Yes, I admit it. I’m sitting here doing the refresh-tracking-page dance in-between metaphorically running my fingers though lines of code trying to debug a particularly bizarre error.

Any moment now… either today or tomorrow my new shiny will arrive on my desk. And it’s been a long wait, almost 3 weeks! I don’t know how I’ve been this patient – but now it’s almost here I can’t wait!

It doesn’t matter that I’ve been derided from all sides for ordering this particular gaget – James Marshall has been particularly scathing, but then this is the man who has a blackberry – a device that I have no love for for No Reason.

@amykate I still think you are beyond crazy for parting with ANY money for that device. It’s a pile of plastic, unreliable, cr*p. :( less than a minute ago via web

So what am I waiting for with such bated breath – possible caused by the garlic in last night’s meal?

An aPed – yes, a tablet PC that runs Android. No, not an iPad which, at their cheapest, are currently retailing at £429, something for less than a quater of that price that will give me the functionality I want.

Was this a sensible decision? Should I have used this money to pay off my mortgage instead? Oh yes, there are, I’m sure, infinite options of more sensible things to do – but can you, a fellow geek – blame me for giving into the lure of the Shiny?

Might just go and check in at reception again and see if anything’s turned up….

Posted in General.

starter #coachmakers

maincourse #coachmakers

pudding #coachmakers

starter #coachmakers

pudding #coachmakers

Posted in General.

The day after the fair, dress rehearsal

Posted in General.

A Rant: Stop Being Late

If when you have an appointment with someone and you arrive on time just to be told they will be ‘down in five minutes’ – do you take that to mean 300 seconds or ‘I’ll be there when I get around to it, may be anything upto half an hour’?

Washing up
Why do busy people refuse to tell the truth to people they make arrangements with? Why can’t you say – ‘I know you’re here to meet me now but I really need to finish this email first, I’ll be with you as soon as I can’ or even ‘I can’t be bothered with you, I’ll swing by after I’ve had a coffee but only if I don’t get distracted by something shiney’ also works – at least it’s the truth.

Yes, it’s been that type of week.

If you’re always late for the weekly X meeting, the one that’s in the same place at the same time each week, maybe it’s time to think about how much importance you place on that meeting, if you really don’t care about it – and believe me, you actions show the rest of the team that you really don’t – then maybe it’s time to think about why you attend? Is it just an ego trip? Do you enjoy keeping people waiting for you? Do you really want to be that person?

Do you?

And if you’re trying to imply that you’re amazingly busy by always beening late for everything that doesn’t work either, the people you keep waiting just assume you’re late because you’re hopeless at telling the time and motivting yourself to get out of bed, they never ever spend the time you have wasted for them by keeping them waiting by imaging you’re doing something more worthwhile.

So why are people late? Maybe it’s time to face the harsh reality – you are not superman. You can not do it all, something will slip – and do you really want your reputation with your fellows to be that something?

Reading Station - Trains are late too

Take a look at your life, the people that you inconvenience have lives to – just because they don’t make you suffer doesn’t mean their schedule is less important, it just shows that they repect you – for the time being.

Just think about it.

If you’re sitting there thinking that you’ve never met anyone like this, then it’s you. So now what? Either start communicating with people – tell them as soon as you know you’re going to be late so they can regain that time they might have wasted waiting for you and to prevent damage to your reputation – or tackle the underlying problem – why are you always late? Do you really get engrossed in everything you do and lose track of time or do you really not care about getting to some places? If you don’t care, cut them out of your life.
You’re the only one that can work this one out I’m afraid.

And in the mean tine, if you want me, I’ll be over there getting on with my life, call me when you’re ready to have our meeting but don’t be supprised when I leave on time to make my next appointment after only getting though half of your agenda.

Posted in whining.