geocoding cell id into google maps …

Ok, I think I’ve reach that point where I need to stop and catch up on lost sleep …

There seems to be a lot of recent interest in location based technology, and now with the latest MyLocation functionality in Google Maps for Mobile (GMM), it wont be long before businesses start chomping at the bit to get their products/services mapped to make it easy for Joe Public to navigate to a shop or restaurant, using just a humble GSM mobile phone without GPS fitted.

So I thought I’d join this race and get myself up to speed with the latest tools and development ideas – hence the insomnia and radio silence (haha pun not intended!). Anyway, I’ve written a number of PHP scripts to geocode LAC/CID data from the RIL module on my Windows Mobile WM6 PDA into a seachable AJAX google map – in English, this means that my PDA is continuously updating my webserver with the GSM cell tower information which I am currently connected to, and I then turn this into geogaphical references (Latitude & Longitude) which are plottable on Google Map. And just for fun, I nicked someone’s code to reverse geocode the Lat/Long into Street Name, Town, Postcode, Country etc … click here to see my last reported position, click on the pushpin to get details of timestamp. Next step, a J2ME app that will work on most GSM phones to query the RIL for cell data, do some triagulation onsignal strength to determine the hotspot (cell towers don’t provide GPS accuracy) and update a MySQL database with an ‘invisible’ http session. Now that will be an interesting project …

Those of you who want to try this out, I’ve also knocked up a prototype script which you can access from http://fiftyone.no-ip.org/files/geocodecelltower3.php?lac=10&cid=16701 – you just need to put in the LAC (Local Area Code) and CID (CellID) – if you know what these are …

Happy locating!

beauty is skin deep …

I can still remember feeling squeamish whenever J channel-flicked onto one of those edutainment programmes on Sky that show live surgery. If I had my way, even Nip Tuck would have been committed to the TV naughty corner, had it not been saved by surprisingly creative dialogue and provocative plots … not to mention the tanned bodies and strong jawlines. Call me shallow, but I pledge my full support to the producers of that TV show when it comes to flaunting feminine curves and 6-pack torsos … because beauty (and I herewith make an advance apology to any hirsute lesbians/feminists and Lionel Richie lookalikes who may be offended by my next pronouncement) is skin deep. And whereas the external human form has immense sex appeal, the insides of a human body and its workings are about as interesting as the contents of Margaret Thatcher’s handbag. That is, unless it is your body … and then, it suddenly becomes the most intriguing thing since Kate Moss’s purse and the most bloggable subject in the world!

Last Wednesday, I gave birth to twin gallstones – an achievement that would not have been possible without the skill and professionalism of the very competent team at Bath Clinic, particularly Messrs Hardy (anaesthetist) and Britton (surgeon). While Hardy knocked me out and made sure I stayed under, Mr Britton (whose dry and boyish bed-side manner reminded me of Stan Laurel) stabbed me 4 times in the abdominal area in a procedure known as a laparoscopic cholecystectomy (that’s gall bladder removal for the medically challenged among you) which comes under the curious medical vernacular of ‘key hole’ surgery. Key hole – now that’s a bit of a misnomer! What surgeons fail to explain to patients during pre-op consultations is the size of the lock they will be dealing with, and judging from the length of incisions on my tummy, it would appear that my surgeon was attempting to pick-lock the portcullis of Warwick castle 😉

But it is all good, as they say and I am now bed-bound and signed off work for the next two weeks with little prospect of social interaction to feed my blog, and yes, I will spare you loyal readers any write up on the frequency of bowel movements and other bodily functions. However, I’m giving serious thought about a paper comparing the coefficient of transparency between Egyptian cotton pillow cases and my nylon anti-DVT stockings. Ummmm, maybe I should save that for next week. Suffice it to say, the prescription drugs, in particular Tramadol, are doing wonders for pain management and inducing some very interesting and florid dreams – an added bonus of being an opiate derivative, I guess. Kids at home, say NO to Tramadol ok … unless you’ve been stabbed.

Meanwhile I’ve made a start on a programing project – a piece of extra-curricular work set by my boss to develop an eBay software tool that will allow sellers to do some statistical analysis on historical auction behaviour in order to predict (read: artificially inflate) the best final sale price for an item. I thought I might write it in Java, but being bed-ridden and having no access to any good books, I’ve decided to plumb for Visual Basic 2005 Express. Progress to date includes the GUI mini-browser functionality (which was a doddle), and today’s task is to work on the ‘state machine’ of valid eBay HTML responses, before diving in to the nightmare of parsing HTML code to extract valuable data from the noise. That should keep me out of mischief for a couple of days …

mac phoenix …

My Mac Mini is back in action … the doctors could not revive the dead hard drive so it was back to square one for my WordPress blog – an experience almost as painful as the chronic abdominal cramps of recent nights from my errant gall-stone(s). They say Revenge is a dish best served cold, and before I am through stuffing it with new chores (e.g. Asterisk PBX, CCTV, Media Streamer etc), my Mini will be wishing it had been reborn as sushi.

Navigation to the fixed menu pages is still a known problem, as are categories … but please bear with me. Torture is only pleasurable when there is no prospect of surrender 😉

dead mini …

Sorry fans, but as an emergency measure, I have reverted to this out-of-date blog following the recent demise of my Mac Mini … which until last night, was hosting my most recent blog on WordPress.

It’s off to the doctors today with a suspected disk ailment, so until it is returned (hopefully fixed) sometime in the future, you and I will have the to put up with the pleasure of blogspot.

Update: Ok, I’ve backfilled previous posts from cached copies lurking on other PCs around the house, so we should be up to date now …

new toys …

So it’s been a while since my last post. J and I were looking forward to a period of unadulterated chilling out which we did manage to achieve despite the chaos created by our earlier accident with the water tank. As a bonus, our respite ended on a materialistic high with some new toys for SWMBO and me: J bought a new car, and I’m now the proud father of this little bag of wizardry. The O2 XDA Exec (the Universal from HTC a.k.a. T-Mobile MDA Pro, Vodafone VPA IV, Orange SPV M5000, Qtek 9000, i-Mate JasJar, Dopod 900) is a replacement for my XDA II and Nokia 6630 – I now retain full PDA/MP3 functionality with TomTom 5 satellite navigation plus the added bonus of 3G high-speed data services including 2-way video conferencing with J’s Sharp 902 (Ferrari limited edition) – an early birthday present from yours truly. With the Blackberry Connect client expected imminently, I shall be in a position to get rid of the 7100v too – taking me down to a single device. Oh happy days!

It’s half term next week. The kids are home and I’m planning to take some time off to do some DIY on the house, addressing other parts that are not being worked on by the builders/decorators who will be onsite again repairing the walls and ceilings from our recent accident with the water tank. If they finish before the week is out, we may emabark on our annual pilgrimage to Disneyland Paris for Halloween and if not, well there’s always something here that needs doing. An old house is very much like an old car – when the fixing is done, one is instantly bowled over by the beauty of the finished product, but while it is being worked on, the monotony of repairs is just unbearably tedious

Which is why we needed some retail / gastronomic therapy today. Fresh & Wild (we visited the branch on Queens Road, Clifton) is fast becoming a mecca for the discerning foodie while providing instant gratification to those shopping for natural remedies / alternative skincare products. While J fiddled with rose-perfumed face cleansers, I rooted around the organic veg section (pah! don’t you just hate it when people do that and then add the detestable caveat of No pun intended) for some butternut squash for soup-making later … ummmm, I’m really into soups at the moment, particularly veggie ones. Afterwards, we popped into the new branch of Space.NK – a super-modern apothecary with Habitat-inspired decor, stocking the latest skincare products from Eve Lom plus other pricey items, but if you’re on a tighter budget especially after paying for so many new toys , then I recommend the relatively affordable Kiehl’s Lip balm. Oh, and the Men’s eau de toilette is just divine – Santa, are you taking notes?!

future nav …

Is this the future of web navigation? Feeling the need to tear myself away from bid documentation, I decided to check out Google Earth. Now a really cool interface for me would involve overlaying Big Picture over Google Earth, with an option to communicate directly with your handheld GPS device (which also happens to be a mobile phone, PDA, espresso maker, etc.) Picture this, having trawled the net using this new interface, read the reviews and decided on the latest toy you absolutely cannot live without, you can zoom into the retail outlet nearest you and check out the traffic situation before leaving the house and have the location details sent directly to your GPS system cum coffee maker. Oh, if you are really astute, you will have programmed additional criteria into Big Picture to ensure that the gadget shop is adjacent to purveyors of female fashion goods, thereby earning extra brownie points from the significant half who will be chuffed to bits by this sudden display of generosity. And if she does murder you after discovering how much you have spent on said gadget, you will at least be posthumously awarded the Nobel Prize for Marital Reconciliation. Alternatively, you can sit on your fat arse, break open a six-pack and buy it through eBay. It will save you a new pair of shoes and (if you are really unlucky) a handbag.

Speaking of gadgets – if you haven’t yet discovered Gizmodo, check it out here.

live from the field …

Ok boys and girls, we now have mobile blogging from my Nokia 6630! What a PITA this has been to set up, locating a suitable wp-mail.php script that could understand the weird MIME content chucked out by the Nokia email client. In the end, I resorted to Profimail for the S60 and this works a dream. Anyway, this photo of a very large chandelier was taken under one of the arches in Camden Town market / Chalk Farm at the week-end – an ex-flea market now transformed beyond recognition into a fast food mecca (in quantity only, but not necessarily in quality I hasten to add) with a few interesting new age / fetish clothing outlets, but in the main, still full of the usual assortment of weed tokeing down-and-outs, punk rockers (most of them now in their 40s), purveyors of magic mushrooms and the occasional goth. It was certainly an interesting day for the boys!

Look out for more live reports from the field (literally) next week …

test.JPG

some WordPress pointers …

Ok folks, after wrestling with permalinks and mod_rewrite, I’ve deciphered a number of well-scribbled Post-Its to give you some pointers on how to ‘tune’ your WP blog.

Firstly, your Apache build needs to include mod_rewrite – if it doesn’t, fix this then come back here. mod_rewite is required to enable permalinks and improve the aesthetics of your URI so instead of a messy URI that includes references to hard-coded page entries in MySQL database e.g. …/blog/index.php?p=xxx, you get a nice URI referenced by the title of your post e.g. …/blog/my-post/. Permalinks also create a more constant reference for search engines/RSS feeds, especially if you intend to reindex or change the underlying database of your blog later.

Problem 1: Permalinks do not appear to work.

1. Check your Apache httpd.conf (in /etc/httpd/) and make sure that within the ‘Directory’ tag, Allow Override is set to ‘All’
2. Check for existence of a .htaccess file in your blog directory, if not create one by touch .htaccess
3. Make sure .htaccess has correct permissions, chmod 666 .htaccess should do the trick
4. Go back to WP admin, and under Options/Permalinks, select a template tag for your structure – if you’ve done all the above, WP should edit the .htaccess automatically.

Problem 2: Trailing slash is missing in the header URI.

This is a really irritating problem. In WP 1.5 (upwards), the trailing slash has been removed (ostensibly for consistency!) such that when you click on the header hyperlink to take you back to your blog’s index.php page, you get a 404 error instead. There are a couple of ways to fix this:

1. add the trailing slash yourself in themes/header.php wp-register.php and wp-login.php (not very elegant since this requires constant changes if you use multiple themes)
2. add a ReWriteRule in your .htaccess file as follows:

ReWriteEnginge On
ReWriteBase /your-blog-directory-name/
ReWriteCond %{REQUEST_FILENAME} -f [OR]
ReWriteRule you-blog-directory-name /your-blog-directory-name/index.php [L] *** add this line

What this does is everytime Apache gets a URI request pointing to the directory of your blog with a missing trailing slash (if there’s no /, Apache thinks you’ve requested a file rather than a directory), the rewrite rule appends /index.php to the URI, thus avoiding the 404 error. The [L] then tells the rewrite to stop after executing this rule.

Tomorrow, I shall tackle themes to improve the ‘look’ of my WP blog but for the moment, this blog has been imported into WP from blogger.com