Spot any errors? let me know, but Unleash your pedant politely please.

Tuesday 13 December 2011

Rivers of London (Peter Grant, #1)Rivers of London by Ben Aaronovitch

My rating: 3 of 5 stars


Picked this up at the airport last week. It's an odd mix. Like a Mark Billingham rewritten by Robert Rankin. It also reminds me of Neil Gaiman's Neverwhere.

The main sticking point is that there's a lack of balance between historical background and complexity of plot. It feels like 100 pages of plot and 250 pages of historical/geographical filler.

It's closer to Rankin or Pratchett than Gaiman. So if you like that kind of thing, you'll probably like this.



View all my reviews

Tuesday 13 September 2011

Trying out ifttt


Really interesting and nicely designed new service called ifttt. It lets you link web stuff. I'm giving it a whirl right here by linking my blog, such as it is, to Twitter. I partly chose this because I don't update the blog often, and so it shouldn't annoy people too much. I'd also probably tweet about most blog posts anyway.

I haven't read T&Cs yet. I'm mostly positive about this, but I can see how it could potentially be abused.

Sunday 15 May 2011

Cube Destroyed

We acquired a new bed to replace the one in my son's room, which was a temporary stop-gap gratefully received from Freecycle. I have instructions to put the new one in my daughter's room, and move the one in my daughter's room into my son's room. I'm not quite sure why. I just do as I'm told.

I got a bit pissed off because there were a number of my small geek screwdrivers on the floor, no in their box, and a couple of them were broken. There was also a greasy plate under the bed.

That was nothing though, compared to what I found when I lifted the mattress. No, not a jazz mag, they have teh internetz for that these days, what I found was my Apple Cube, which should've been in its box in my bedroom, ready for eBayinig, or put to some other use.

It was old and had a couple of faults: USB and modem on the motherboard were broken. Ethernet was OK though, and USB via ADC worked. So it was a functioning, but old.

What I found was basically everything stripped to the smallest possible component. This is what's left of it:

Saturday 14 May 2011

nightCoder

I'm currently working in Switzerland, commuting weekly, flying out on Monday morning and back on Friday afternoon. Last weekend, my colleague Charles and I elected to stay for the weekend. It meant an additional day of work by not losing Friday afternoon and Monday morning travelling.
We took Saturday off to explore Milan a little, worked on Sunday morning at the client's office, and then had an afternoon on the terrace with cheese, ham, bread an beer for lunch. We had a problem sharing the ADSL, but I wanted to do a little more work on a test tool, so Charles surfed, and I worked.
We took a break to use the hotel pools for an hour or so. I had the chilly outdoor pool to myself. Charles had the heated indoor pool to himself. Then we drove into through Lugano, out around and back through Paradiso and back to the lake. We ate at a chain restaurant, The Spaghetti Store. It's not as nice as the restaurants in the surrounding villages, but it's right by the lake, and it was a warm clear night.
When we got back to the hotel, there were beers left if the fridge, so we repaired once more to the terrace. We tried open unencrypted sharing of the ADSL via WiFi, which worked. Charles surfed and I surfed a little but mostly continued to work on the test tool. I had neglected to plug in my power supply, but finished what I wanted to to do with 10% battery left. Charles was still surfing, but was reliant on my Wifi. I decided not to plug into the power, it was an opportunity to run the battery completely flat. I caught up with a few RSS feeds and gave Charles a countdown on the power situation. I think it finally died at 1:30am.

So here I am, coding, at night, not in a cubicle (or equivalent). It was pretty sweet:




And yes. It was Python.

Wednesday 9 March 2011

Offensive.

I've just been reading a Grauniad article: Not quite a paedophile' – John Humphrys' strange correction in which Tanya Gold has written:
Mainstream porn actresses – I will not call a woman who is a paid-for receptacle for semen a "star".
Yes. Really. In a written piece about poor choice of words on live radio, one woman calls another woman a spunk bucket.

I'd love to hear Anna Span or Belle de Jour's opinion on this.

Sunday 30 January 2011

Python FTW: Clearing an FTP folder.

I'm doing some testing that involves kicking off a lot of concurrent processes. Some of these write files to an FTP server. I don't need those files once I've checked that they exist, but FTP doesn't allow deletion of multiple files (AFAIK). The first time we cleared the server, we took a directory listing and wrote an FTP script from that. It worked well enough, but we'd need to write that script each time.

So a little play with Python gave me this...


from ftplib import FTP

def clearFTPDirectory(address,
username,
directory):

server=FTP(address)
server.login(username)
server.cwd(directory)

directory=[]
server.dir(directory.append)

# list comprehension, baby!
filenames=[entry.split(':')[-1][3:] for entry in directory]

for filename in filenames:
try:
server.delete(filename)
print 'Deleted:%s'%filename
except:
print ('failed to delete "%s"'%filename)

server.quit()
…it should save a fair few cumulative hours, but more importantly, it'll save a fair few hours of tedium.

The bit that tripped me up for a little while was server.dir(directory.append) which takes the append function as a parameter. Makes perfect sense now.

Note: if you use this, you may need to check the format of the strings returned by dir(), and adjust the line that extracts the filename.

Briefly Sexist Dad

I caught myself being an old-fashioned gender-stereotype father this morning. I have a chest of drawers to put together for my daughter's bedroom. Last night I thought that I'd see if my son would like to help put it together. Then this morning I realised that was a bit daft. There's no reason why my daughter shouldn't help put it together. It's for her room after all.

So I asked her.

"Nah", she said, and turned back to watching some crap on the Disney channel.

Sunday 2 January 2011

When i became a skeptic

I've sometimes wondered whether I've ever had faith. Ever believed in God. I don't think I ever have. I don't have any memory of faith. I went to a church pre-school, to Sunday school, to state schools that did the obligatory Christian service each morning at assembly. But I don't think I ever believed it.

I do recall though, the first time I thought faith was bollocks. It was in an R.E. lesson with Mrs Stone, aka Ol' Ma' Brick. She explained faith in terms of the chairs the class was sitting on. That we had unquestioning faith in each chair's ability to support us. I couldn't articulate why I thought this was bollocks at the time, but bollocks it most certainly was. I'd have been 11 or 12, I think.

We don't have blind faith in chairs. We have years of experience of chairs and knowledge of the physical world to inform us that the chair will support our weight. Sometimes a chair will break. A old and brittle plastic garden chair might lose a leg. A wooden glued chair may have joint that's worked loose and come apart.

Sometimes we might see a new design of chair that seems impossibly flimsy, perhaps made of wire, that becomes stronger when we sit on it. Or that appears not to have a full complement of legs. When we sit on these, we don't do so with blind faith, we do so tentatively, half expecting it to collapse, preparing for it to break, and being pleasantly surprised when it doesn't.

Saturday 1 January 2011

Another iPad Epiphany

My wife bought a traditional compendium of games for the family for Christmas. A nice wooden box with Chess, Draughts (Checkers), Backgammon, Othello (Reversi), etc. The pieces for the games are hidden inside the box, the lid is reversible with different game boards painted on each side.

It's like a primitive, manual iPad.

Looked at another way, the iPad is like a compendium of apps, but the box under the board is like a TARDIS, and you can't lose the pieces in or under the sofa.

I'm going to start saving for iPad II.