What Jessie Did Next...

...being the inane ramblings of a mundane Yorkshire bird.

Tag: geek (page 5 of 13)

Nicky’s 15″ MacBook Pro has been exhibiting some signs of weirdness recently – coloured spinner just sticking on, fans going at full rev. A quick look at Apple Hardware Test (comes on the bundled install DVD) said quite helpfully “error 4SNS/1/40000000:TGOD”. A brief Google search suggested that it’s the logic board that’s gone, so it becomes a warranty repair.

Colin recommended an Apple-accredited repair centre in Armley (Leeds) called Clockwork Creative – a quick phone call and they suggested I bring the machine up. Half an hour later and they’ve got the Mac, suggest it’ll be a few days, and they’ll give me a call depending on parts – it’s a nice small place, seem clued-up and very hands-on.

Now we see how good, and given past support nightmares with other larger companies don’t expect me to remain silent on it 😛

So here I am with a glass of wine in a Premier Inn just out of High Wycombe, keeping warm thanks to the huge table of MSISDNs that my laptop is (poorly) attempting to merge and worrying about tomorrow’s meeting. It’s going to take at least another 10 minutes for this to finish running so I’ve compiled the list of how people coming through Google, Live and MSN found our photo gallery:

Hits Search terms used
75 nicky
7 girls of amsterdam
5 fabulous nipples
4 subnova
4 amsterdam girls
4 girls amsterdam
4 stephen laszlo
3 girls in Amsterdam
2 empress state pictures
2 sue lawley
2 sue lawley pictures
2 dover hoverport
2 windmill
1 lvrom
1 hellset
1 strangers
1 eliminator
1 crosscut
1 Sue Lawley Wogan legs
1 craig


Interesting seeing the Clarence bands still making an appearance, and also people who want to know what Sue Lawley’s legs look like 😛

Mm, I took advantage of an offer at 7dayshop.com the other week and upgraded my Mac’s RAM to the maximum it’ll take – 3GB! Nicky got the same and it only cost us £34 (including the postage!) for a 2G 667 RAM clip each.

Makes a hell of a difference (even just upgrading from 2GB to 3GB) – $contract right now involves me throwing around huge amount of data (tables of 30 million rows or more) and merging them – the coloured spinner is coming up less, although now it sounds like a 747 taking off when the fans start up. Mmmm, toasty.

With the prices being that low, you’d be daft to not take advantage of it – especially since Leopard is so memory-hungry.

With the installation of Logic Pro 8, Apple’s ‘Spotlight’ feature is required: without it weird things happen such as files not being found when loading sounds! You end up having to manually go digging for files (which, when they’re 6 levels down is a pain in the arse).

So, I’d not actually realised Spotlight wasn’t working on my install of 10.5.2 – it’s not something I use that much but suddenly it became crucial. I dug around a bit and found that it was crashing like thus:

Apr 12 18:51:28 trixie ReportCrash[14588]: Formulating crash report for process Spotlight[147]
Apr 12 18:51:29 trixie com.apple.launchd[139] (com.apple.Spotlight[147]): Exited abnormally: Bus error
Apr 12 18:51:34 trixie ReportCrash[14588]: Saved crashreport to /Users/joel/Library/Logs/CrashReporter/Spotlight_2008-04-12-185121_trixie.crash using uid: 501 gid: 20, euid: 501 egid: 20

Bus error – sounds like a memory issue. Sadly not, it was a little more complex than that!

Next step was to find out how to reindex Spotlight. I found quite a few references on Apple’s support website here which referred to mdutil, but sadly this did odd things too giving me a ‘No index found for volume (-107)’.

Right, the gloves are off. Let’s drop the whole damn spotlight system by:

  • Running ‘Fix Permissions’ on the root disk – you never know, something odd might be prodding it.
  • Dropping the Spotlight preferences (they might be corrupt) by deleting /Users/joel/Library/Preferences/com.apple.spotlight.plist.
  • Killing anything cached by deleting /.Spotlight-V100. This actually gave an error but some stuff disappeared. That’ll do anyway.

At that point I thought ‘hang on – maybe something else is upsetting it?’. Just to be sure, I prevented Spotlight indexing anything to do with Parallels – and therein was the root cause. The damn thing was indexing the virtual disk for Parallels, which would send it into a tailspin. Sodding Windows again, eh?

A reboot later and it’s reindexing, and I’ll try the Logic Pro instruments again. We’ll see how it goes anyway 😀

Update: It’s worked. Bed now.

BBC Micro creators Hermann Hauser, Steve Furber, John Radcliffe and David Allen are reuniting at the Science Museum for a CCS reunion “gig”.

I’d love to go to this but finding few details right now – anyone know any more? Also of special interest: “The Science Museum plans an exhibition about the BBC Micro and its legacy in 2009”. Wahey!

For those of you who can’t wait, there’ll be a special 8-bit exhibition (run by me and a few other 8-bitters) at the Wakefield Acorn Show on 26th April at Cedar Court Hotel. I’ll have the Domesday system running, and probably an Econet and a Music-5000.

(Thanks to Ollie who pointed me at the news article.)

Edit: It’s this afternoon. Cocks.

Edit(2): I’ve just realised Sophie Wilson is missing from the lineup…

I occasionally get asked by shell users why, on boxes I admin, do I not allow them to run phpBB. Here’s another damn good reason.

Instead I recommend Lussumo Vanilla or SMF, both of which may be reasonably integrated into other websites.

OK, everyone knows Maxtor drives run hot. Really hot. So this morning Jon had an idea…

[@NavOffice] actually, I bought some crumpets yesterday – if some nutter can design a USB mug warmer then I’m damn sure I can have a maxtor crumpet toaster
[@NavOffice] 2 drives back to back with a 3/4″ gap, then just fire up bonnie 🙂

Now I know he’s crazy enough to try this…

Catching up on RSS feeds this morning I was extremely interested to see this technique for speeding up GROUP BY queries using approximation. In the first example, it knocked down the processing time from over 30 minutes to 30 seconds pretty much (as far as I can make out) because of MySQL’s speed in string comparison operations.

I can see this would be really useful for search tables…

Ben’s in the office with Nicky today and I’m sat at home waiting for my car to be ready.

As seen in another window:

okay – so Ben doesn’t want to play with the games on CBeebies, but he is enjoying looking at the source code for the site.

🙂

I’ve been using 10.5.2 for a couple of weeks now, and maybe I’m alone in this but I’m finding it more unstable than any of the other 10.5 “Leopard” versions:

  • Weird Finder bugs when using two monitors, reproducable by dragging/dropping where it ‘locks’ the destination window. Depending on which screen has the focus window in it, the Finder window ‘slides’ back and forth across the desktop.
  • Frequently my MacBook Pro fails to wake from sleep or – even worse – doesn’t properly go to sleep leaving the fans going while it’s in my bag (since then I’ve learned to check for this).
  • Application switching is a lot slower, there’s a lot more of the coloured ‘please wait’ spinner even when I’ve just got a couple of low-memory applications loaded such as Terminal and Address Book.
  • Occasional keyboard failure, still – all seems to be happening in the USB bits of the kernel (com.apple.iokit.IOUSBFamily or com.apple.iokit.IOHIDFamily).

For a machine that’s got 2G RAM and a reasonable CPU (Intel Core 2 Duo 2.3GHz) it seems Apple is still walking backwards. If it wasn’t for Coverflow/Preview I’d probably sod off back to 10.4 this weekend.

The sort of work I do is usually to do with end user services – websites which allow a user to create a login and password to give them access to larger featuresets, etc. You know the kind of thing – social network websites are a prime example: as part of that I frequently get asked to log information a user may do, recording the source IP address of any messages they may leave in order to protect from abuse.

A frequent mistake folks make in writing code to do this is in the IP address which made the HTTP request. Most larger ISPs enforce transparent proxying on the user, meaning that instead of having the IP address of the end user themselves you’ve got the IP address of a proxy which may handle hundreds of thousands of users! It causes issues not just in traceability, but also in things like bandwidth logging if you’re doing it at an application level.

Enter X-Forwarded-For. It’s an HTTP header which most proxy software will add, giving the source IP address which requested the page through the proxy and preventing proxy servers becoming anonymising services.

This is exposed to PHP through the $_SERVER superglobal, so you can use it like so:

if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ) {
logEntry("User connected from ".$_SERVER['HTTP_X_FORWARDED_FOR']);
} else {
logEntry("User connected from ".$_SERVER['REMOTE_ADDR']);
}

Now there’s a gotcha here. A lot of ISPs such as AOL and NTL allocate ‘private’ RFC1918 IP space internal to their network. That means if you get 10.5.3.4 or similar then you’re on a hide into nothing because you’ve not got the proxy which may be ‘seeing’ that address – so you need to log both when you find a proxy:

if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ) {
logEntry("User connected via proxy ".$_SERVER['REMOTE_ADDR'].
" from ".$_SERVER['HTTP_X_FORWARDED_FOR']);
} else {
logEntry("User connected from ".$_SERVER['REMOTE_ADDR']);
}

But what if users are stringing proxies together? Well, that’s dealt with too. The proxy software appends itself to each X-Forwarded-For header, separated by commas.

Of course this should be treat as a first line of defence – if someone’s really wanting to hide themselves they can, through IP spoofing or fiddling their own proxy software to remove the header. However, it’s a neat way of preventing false positives and – more importantly – finding out who’s really behind stuff, now RFC1918 endpoints are becoming more and more common.

Wikipedia has a bit about X-Forwarded-For here, if you fancy a little more reading.

Some of you out there may remember Granny’s Garden, an educational game for the BBC Micro which was released by 4Mation in 1983. It was a staple of primary-school classrooms all over the country and those who are aged around 30-31 probably played it at school.

In a little experiment this morning I booted up a BBC Micro emulator and loaded Granny’s Garden into it, suggesting to Ellie (aged 6) that maybe she’d quite like to play it. Now before I continue you must remember that this game was prior to any sort of controller or speech synthesis – so there’s no mouse, and you have to read stuff on the screen.

I was actually pleasantly surprised – she cottoned on to reading the prompts instead of having instructions spoken to her; likewise the keyboard, although I had to explain a few times about that (especially when choosing ‘the magic tree’, where you have to type in a grid reference such as ‘A3’ or ‘D1’). She took logical steps involved in solving the basic puzzles such as the word ‘FIG’ on the cottage, and when the witch caught her she was anxious to have another try. Yay for MODE7 teletext graphics and some odd noises from an emulated sound chip!

All in all I’m really quite pleased, and I think I may set up a basic Beeb with the game in the studio – either that or put Beebem on the Mac Mini upstairs.

(Pics here).

Next step: ‘A Day At The Shops’, or some other similar educational game we played in Mr Mordue’s class, aged 10.

Note: I’ve just been asked about a copy of Granny’s Garden being downloadable or distributable – 4Mation got very stroppy the last time someone tried this and won’t enter it into the public domain, so you will need to source your own copy; this is presumably because there is a Windows/Mac version still on sale. I would suggest eBay or somewhere like that – I picked up a legal original in a batch of kit I rescued from a primary school some time back, so YMMV.

With Microsoft’s announcement that they’ll be opening up their binary file formats from Office, I read with interest Joel Spolsky’s reasons why MS Office formats are so complicated – it certainly explains an awful lot.

(I’d strongly suggest reading Spolsky’s books and essays – they’re often insightful and you learn a lot.)

Ben’s lunch had RSS mashed potato.

A rather amusing look at the Apple product cycle. Seems to tick all the boxes 😛

Older posts Newer posts