Sunday, December 26, 2010

Recipes: Vegetable-ish Stew and Dumplings

Stew n DumplingsThanks to my mum for this recipe, and Larry for spicing it up a bit.
  1. Start by frying off some fennel seeds, cumin seeds and maybe some onion in some olive oil.
  2. Add celery and celeriac.
  3. Chipolatas can be added now if desired.
  4. Brown off small cubes of vegetables such as 1/2 a sweet potato, 1 swede, 1/2 squash, a potato or two, a parsnip and a couple of carrots.
  5. Once the vegetables are brown add enough stock to cover them and some grain type things (tinned or dried) such as lentils, beans and barley.
  6. Season as necessary, maybe adding a bay leaf/cinnamon stick or two.
  7. Cook covered in a hot oven for about twenty minutes.
  8. Make the dumplings by mixing self-raising flour and suet in a weight ratio of 2:1. I use 6oz flour and 3oz suet. Add enough water to combine and divide in to round dumplings, I usually make about 10.
  9. After about 20 minutes take the lid off and add the dumplings and cook for another 20 minutes until the dumplings are browned, adding a little more water/stock if necessary.

Friday, December 17, 2010

Luser Support

From the supportee:
Is there any way we can change the error message to make it a bit more idiot proof?

From me:
I'm sorry, but on the second line it says "XDataProvider:
System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"


1. This is the XDataProvider.
2. This is a network error meaning that I cannot talk to the SQL Server.
3. This might be fixed by checking that the server name is correct and the SQL Server is configured to allow connections.

I really don't think it could be *any* clearer or more idiot proof.

From my colleague:
User error. I'm always right.

Tuesday, November 23, 2010

Property Scams From Gumtree

Marcelo Kluvert <>

Offering a lovely apartment located in "Central London Via fulham" with two bathrooms and either 2 or 3 bedrooms depending on whether you trust the ad or his email more. Rent is £400 pcm total, including all bills. Marcelo is a very busy man but will come down from Newcastle for a viewing once he has seen a Western Union receipt of a £980 transfer to prove you have funds available.

Georgia Washington <>

Scam KitchenetteIs offering a flat "looking very nice and clean" with "well tidy sitting rooms" and home utilities including a lounge, "cable ready", power-shower and an electric shower on "KENSAL RD Kensington". From the photo you might get the impression that the kitchen has a microwave where the oven should be and only has two hobs, but Georgia assures me there are in fact three hobs and an oven just to the left of the photo. Georgia has even removed the ad from Gumtree for you (nothing to do with it being reported as a scam of course), works for Credit Suisse Group and will email you a tenancy agreement. She will fly back from Spain to show you around just as soon as you send her a copy of a Western Union receipt to prove you have the £1000 deposit available. What a nice round number!

Queensgate Berry <>

Queensgate Berry will address you as "my dear", sign himself "Mr.Alan" and has a lovely 2 bed property suitable for 2-6 persons (each bedroom being suitable for three students apparently) in South Kensington with "Cable/Satellite CCTV" and a garage at a total of just £200pw! Including all bills! According to the "Landlord Association" rules, "due to past/bad experiences with the other landlords" and as "there is also a fine of 5000pounds if we don't go through the rules and regulations" all you have to do is forward a MoneyGram receipt of £1300 to Mr Alan to prove you have the funds available. Mr Alan's phone number is 07024031949, note that 070 numbers are premium rate numbers, not mobiles.

If you encounter any of these illustrious people or one of their ilk you may be interested in a fake Western Union or MoneyGram receipt generator or a page of useful scam baiting links.

Tuesday, November 09, 2010

Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' in...

If using Facebook’s PHP library you get:
Uncaught exception 'FacebookRestClientException' with message 'Session key invalid or no longer valid' in..
Try adding the following before the offending line:

Friday, October 22, 2010

Linux on Dell's M101z

I've now installed and configured both Ubuntu and Arch on my Dell M101z and most things work fine. Starting at the bottom:
  • Replacing a Dell M101z Hard DriveThe M101z does not allow hot swapping of the internal hard drive, perhaps obvious as it really is internal (you have to remove the keyboard to change it) but it did mean that I was lucky I still had my old M1330 which allowed for hot-swapping to update the firmware on my OCZ Vertex 2.
  • Suspend (s2ram) works as long as you boot with the noapic kernel option and don't have an HDMI device connected when you suspend/resume.
  • For wireless I've been using the open source brcm80211 driver it seems more reliable on speed and is built into the kernel since 2.6.37, but it's a little bit buggy. Broadcom's own STA driver is stable, but seems very slow at times.
  • Just because the Radeon HD 4225 video card has an "HD" in the name does not mean that you should use the RadeonHD driver as I tried to under Arch, use the straight ATI/Radeon driver as Ubuntu does automatically. Use Arch wiki's xorg.conf settings. I wouldn't recommend the binary driver either.
  • CPU scaling works using the PowerNow-K8 module, again I assume Ubuntu did this automatically.
  • /dev/sdb1 is not created when I insert an SD card. I can create it either by rmmod and modprobe ehci_hcd or attempting to mount /dev/sdb.
It seems like a good little machine, the keyboard's good (I don't have small hands), it's heavier than it looks, the screen is good, it runs quite hot and I'm a little disappointed with the 3-4 hour battery life, I wonder if it would be better under Windows.

Friday, September 10, 2010

Short Reviews: Whitechapel Gallery, London

Larry's ChickenI'd been looking forward to eating at the Whitechapel Gallery for sometime, I think I'd judged it mainly on the decor and a quick glance at the menu. Unfortunately the food (why is it that the more business you give a restaurant the worse the service you get? We had to have the dull roast chicken because there was about 10 of us) and way too familiar, bordering on rude, service didn't live up to the price or the decor. The starter was ok actually.

Saturday, June 05, 2010

Linux Shell Flickr Batch Downloader Script

For a while I've been meaning to write a Linux Flickr downloader, but I've been putting it off and putting it off as I thought it wouldn't be easy. But I hadn't thought about using curl and the Flickr API directly and, rather embarrassingly, happened upon a script a few lines long to do just that.
curl "###FlickrAPIURL###" | awk '/id=/ {print "http://farm"$6""$5"/"$2"_"$4".jpg" }' | sed '~s/\(farm=\|server=\|secret=\|id=\|"\)//g' > p
wget -i p
There are plenty of options for FlickrAPIURL, and Flickr provides a very helpful URL builder, for search for example.

An improved script:
#!/bin/sh # As is this script takes comma separated tags as argument one and downloads all matching # images from a single Flickr user, probably you # To get your API Key and Secret create a Flickr App at: # APIKey='xxx' Secret='yyy' # To get your token you can manually follow the desktop instructions: # # If you do not want/need to sign your call you can remove the MD5ing and api_sig Token='zzz' # Note that *all* parameters in URI must be in alphabetical order, so this may not work # for your method/parameters as is Method='' Params="tags=$1&user_id=YourUserID" # Image size: _s small square, _t thumbnail, _m small, none medium, _b large, _o original Size="" ( IFS='\ ' Page=1 Pages=1 while [ $Page -le $Pages ] do         URI="api_key=$APIKey&auth_token=$Token&method=$Method&page=$Page&per_page=2&$Params"         MD5URI=$(echo $URI | sed 's/[&=]//g')         MD5=$(echo -n $Secret$MD5URI | md5sum | sed s/\ \ -//)         for f in $(curl "$URI&api_sig=$MD5")         do                 TempPages=$(echo $f | awk '/<photos/ {print $3}')                 if [ $TempPages ]                 then                           Pages=$(echo $TempPages | sed '~s/\(pages=\|"\)//g')                 fi                 URL=$(echo $f | awk '/id=/ {print "http://farm"$6""$5"/"$2"_"$4}')                 if [ $URL ]                 then                           URL=$(echo $URL | sed '~s/\(farm=\|server=\|secret=\|id=\|"\)//g')$Size".jpg"                         wget $URL                 fi         done         Page=$(($Page + 1)) done )
UPDATE: Note that if you want to download original sizes you must request the "originalsecret" by adding extra=original_format to the API URL and use that instead of secret. The awk line needs updating to do this, add -F '"' to separate on double quotes.

Tuesday, April 27, 2010

Short Reveiws: Bam-Bou, Percy / Charlotte Street

Remains of the DuckA lovely little* Asian fusion place close to perfection, and Goodge Street.

The duck, smeared with plum sauce so think and sweet it was like jam, sprinkled with sesame and drizzled with tamarind was moist and tender and some of the best I've ever had, the sticky coconut rice was extra sticky and coconutty and the prawns and squid were excellent too.

The service was some of the best I've ever encountered, perfectly timed, knowledgeable and polite. What's more, our waitress didn't try to sell us more than we needed, even when prompted.

* Bam-Bou feels small and intimate but is actually quite big, three or four floors.

Monday, April 05, 2010

Recipes: Chocolate Pots

Chocolate "Soufflé"Along with Salmon en Croute this recipe has one of the highest simplicity to deliciousness ratios I know.
  1. Melt 200g butter with 200g chocolate*.
  2. Whisk 6 eggs with 150g sugar until light (both in colour and density) and fluffy. This can take a surprisingly long time, but be patient.
  3. Stir in the butter and chocolate and 150g plain flour.
  4. Pour into 6-8 ramekins and bake at 180C for about 10 minutes, until the top begins to crack. In my opinion it's much better to undercook them and have a runny centre than overdo them and let them go solid and a little bland, as I did tonight.
  5. Serve with ice cream. The fruit is optional.
*Try using half flavoured chocolate such as Green and Black's Mint or Maya Gold.

Wednesday, March 31, 2010

Short Reviews: The King's Head, Coltishall, Norfolk

Loaf @ The King's Head, ColtishallA good gastropub in deepest darkest Norfolk, the King's Head in Coltishall has a fairly standard menu* apart from the fact that about half of it is devoted to fresh and local fish. Make sure you book ahead as I assumed that in a small town in the middle of winter, in the middle of a blizzard no less, there would be no need, but the place was packed and we had to wait until 8:30 for a table, by which time they'd unfortunately run out of the partridge and the lamb. Be careful of the starters, they are huge. After eating my main sized home smoked salmon fillet on guinness "smelt" bread and half the g/f's portion of fried bree? I was already pretty full. On top of that every table gets its own warm loaf**, most of which we took home with us. I thought that prices were quite average for a gastropub, but that would be for London, so I guess it's slightly pricey for Norfolk, the huge starters were around £6, mains started at £10 for pasta and went up to £18 for the steak.

* Not a criticism.
** More of a large bun really. That's not a criticism either.

Sunday, March 28, 2010

Short Reviews: Fish Fish, Archway/Highgate

I'm often amazed at how difficult it can be to find a decent chippie; how hard can it be to take a piece of fresh fish, dip it in egg, milk and flour and deep fry it at the right temperature? I was especially disappointed with Toff's on Muswell Hill, which apparently has a good reputation and seems to be shut of a Sunday evening. And so it was an extra special joy to find lovely fresh light golden batter around some tasty fresh fish and good (albeit suspiciously regular) chips about 2/3 of the way to Highgate from Archway on Sunday evening. It's not particularly cheap (£6.95 for take away fish and chips, £11 to eat in) and I was pleased to actuality be able to finish my portion for once, ie, it wasn't a huge portion, small by fish and chip standards.

Monday, March 22, 2010

Short Reviews: Plum Valley, Chinatown

A posh Chinese apparently sanitised for western palettes. The crispy shredded beef was nice and crispy but didn't taste like it had ever seen a chilli, meanwhile I seemed to have ordered the Lancashire hot pot, which I'm not fond of at the best of times. It is possible that we chose badly, our neighbours' set meal looked good, though ours didn't look bad. It was quite pricey too if I remember rightly.

Wednesday, March 03, 2010

Google Chrome Browser Issues

I've used Chrome a few times since it was released, and it's very fast, but for me, it's just not quite there yet, there are these tiny little niggles:
  1. Search as you type. I know I can press ctrl+f, and I know it occasionally mucks up keyboard shortcuts, but I don't care, I want it. Apart from that it makes browsing with the keyboard much easier as you can just hit enter on links, instead of having to hit escape and then enter.
  2. Fonts in Linux aren't quite right, see the flickr menu for example, it goes onto two lines.
  3. Little website specific bugs, for example, in flickr's organiser, if you press enter after adding a tag to a group of images it seems to hit the cancel button rather than the "thanks" button.
  4. I'm getting used to using the history page rather than the missing recently closed tabs feature, but the jury's still out on that one. Ah, there is a recenetly closed list on the new tab page.
  5. Would really like to be able to increase the number of thumbnails on the new tab page.
  6. While using the debugger, alt+left/right should still navigate back and forward.
  7. On Linux it has that same annoying issue that firefox has/used to have: if you kill X chrome thinks that it's crashed and wants you to confirm re-opening your tabs.
  8. The spell checker is not as intelligent as firefox's, for example, "exersie" returns no suggestions.
  9. The icon is too similar to Visual Studio's, I get confused :)
  10. It does not check for a site before googling for what you type into the address bar, eg, if you type "intranet" into the address bar you get google results for "intranet", not your local intranet.
  11. The speed boost just doesn't seem as pronounced on Linux.
  12. RSS feeds don't seem to show up like they do in Firefox.
  13. Chrome seems to "steal" Firefox's saved usernames/passwords and history, which I'm not sure I'm happy about.
I also have an issue with Buzz whereby a Buzz that is in both your inbox and buzz-box doesn't get marked as read in one when you read it in the other. I think that it's just delayed, but it does mean that I click on both boxes to see one message. Also, maybe if you're viewing your buzz-box and a new one comes in it should be marked as read straight away.

AND a couple for gmail: gmail search doesn't split words with underscores and the contact autocomplete doesn't search for words after a period.

Friday, February 26, 2010

Self Certificated Sick Leave

Please say briefly why you were incapable of work for the period stated above, words like unwell or illness are insufficient.

I had a fever, slight headache and very sore throat which made it difficult to speak, admittedly not essential to my job but I wouldn't want to pass the illness to my colleagues who need to use the phone without sounding like they'e doing a Barry White impression.

Tuesday, February 23, 2010

Using Outlook Web Access

Since my work seem to be refusing to enable IMAP on their new Exchange server and I refuse to use Outlook, which is just too slow and cumbersome for my simple needs, I've spent the last few days getting to know Outlook Web Access, Microsoft Exchange's webmail offering. Here are some tips:
  1. If you're using Firefox and are miffed to find that you can only use the "light" version of OWA, don't be, I prefer the light version and would recommend it to IE users too. And no, OWA does not work on Firefox if you fake the User Agent.
  2. Don't worry about the missing autocomplete/drop down functionality in the To, CC, etc. fields, type in the names of your recipients separated by semicolons and click Check Names.
  3. If you need to import contacts use the desktop version of Outlook.
  4. There is no Discard button on the Compose form (my one annoyance so far), so go straight to the drafts folder, use the check box and click Delete.
It's not too bad really.

Thursday, February 04, 2010

Facebook Stream_Get, Offline_Access and getFilters Not Working

I am not sure whether I am being stupid, the Facebook API documentation is really bad or the Facebook API just doesn't really work very well, but if you want to display a user's own profile feed on a page (eg, your own feed on your homepage) here are some pointers: (I do not guarantee any of this information is up to date or even correct.)

o) Setup your application on Facebook, it may be easiest to use the sample/example code they give you to start your project. Fill in the Canvas Page URL and point the Canvas Callback URL at your own domain URL. Then visit your Canvas Page URL.

i) To be able to have a page request restricted information from Facebook while the user is not logged in on a particular machine you need to request off line access, you can do this in these two ways, among others:
<fb:prompt-permission perms="read_stream,offline_access">
<script type="text/javascript">
FB.Connect.showPermissionDialog('read_stream,offline_access', ondone);
function ondone(a){ alert(a); }
ii) You then need to grab a persistent session key, in PHP this is available like so:
$key = $facebook->api_client->session_key
$key = $_POST[fb_sig_session_key]
iii) Once you've got this key you (or your script) can "become" the user like so:
$facebook->set_user($user_id, $key, 0)
iv) You can then get an array of streams using stream.get:
$streams = $facebook->api_client->stream_get($user_id, $user_id...)
v) I have not worked out how to "filter" stream_get to return just posts, or links, etc. getFilters will return a list of filters, but I have not had any success in changing the return value of stream_get, at all. There are also apps on the filter that is returned that I am sure I have not installed, Doodle Jump for example, wtf?

The $stream[posts][x][type] value in my streams reflects the following:

11 - create/join? group
46 - post
56 - wall post
80 - link
237 - flickr
none - profile pic, note

Changing the content type of my page rid it of some nasty characters:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Remember that PHP's htmlentities() can also take a charset.

See the result at

The ridiculous thing is that you can save an awful lot of time and effort by using the Facebook RSS feeds, such as:
To get your key (and userid) go to your notifications page and click on the "Via RSS" link, you can then change "notifications" in the URL to "share_posts", "status", etc.

Wednesday, January 27, 2010

The TV Licence Swindle

So I want to buy a TV licence and pay for it monthly. Simples right? Wrong. It is Jan 20th 2010, so my £142.50 licence will run until Jan 20th 2011 right? Wrong. It will run out on 31st Dec 2010 because they backdate payment to the 1st of the month! I am paying per month, so that will be £11.88 per month for twelve months right? Wrong! It's £28.50 per month for five months. And guess what happens then? You start paying for NEXT YEAR'S LICENCE! WHAT. THE. FUCK?

UPDATE I am now (9 Feb 2010) trying again, this time without the direct debit complication, and yet it's still saying valid until 31 Dec! It's not even backdating it to the 1st Feb.

Tuesday, January 19, 2010

Converting Oracle SDO_GEOMETRY Fields To Points

Just because Google didn't help.

SELECT Alias.FieldName.SDO_POINT.X, Alias.FieldName.SDO_POINT.Y
FROM TableName Alias

The alias seems to be necessary.

Monday, January 18, 2010

Short Reviews: Kim Noble Will Die, Soho Theatre

YvonneLet me preface this with the letters I, A, C, N, A, A and C, that is, I am certainly not an art critic. In fact, not only do I not know anything about art, but I don't even know what I like. I do not know if I enjoyed Kim Noble Will Die, it certainly passed a short hour of my time, and I do not begrudge it for doing so, though maybe I begrudge the cost of that short hour.

Was it funny? In places. It was also totally gross and certainly not for the faint of heart. I think I would have found it easier to laugh if I'd known for certain that it was all made up, as it was, any laughter there was was often followed by an uncertain feeling of guilt at what you already knew or shock and horror at the next revelation, many of which were graphic, in at least two senses of the word.

I couldn't help feeling a little bit gypped at being asked to leave when a handful of women and their red capped come jars* were asked to stay. I felt more sorry though, for the guy who'd paid £15 to have a bucket on his head for an hour, and the girl who'd been booted out, though at least she did get the consolation Microwave. I'm sure I am supposed to feel gypped at being told to leave, and scared that I might be the one to be booted out, and it wouldn't work if these weren't real people, really booted out, or having a bucket put on their head, but I'm not sure I like it.

* Yes, that's what I said, red capped come jars, there was a lot of coming, and spewing of other bodily fluids, though not much going.

If you actually want to know something about Kim Noble Will Die check out the Guardian review.

Wednesday, January 13, 2010

Short Reviews: Leong's Legends, Taiwanese, Chinatown, London

Taiwanese @ Leong's LegendsI don't think I've been to any other Taiwanese restaurant, but Leong's Legends (map) is certainly excellent. If you eat pork and don't mind (quite) a bit of fat I especially recommend the braised pork belly, it's delicious. Service is brisk, prices are very reasonable. Props to Kai RufieC for the find.