Got your attention?

All right, then let me start.

Actually, before I start, let me set the record straight, just in case some Jobs-nuts out there were already playing with the trigger of their reply button:
No matter how much you think you can vouch for your loyalty to King Jobs and his court of Cupertino, no matter how much you think you’ve earned your right to sit with the Knights of the Golden Apple, no matter how intimately attached to your Powerbook you are… Thou doth not even come close to my level of Macitude, OK? Just don’t try.
I learned to draw on MacPaint with a 512k before I knew how to hold a pencil, I was making killer games on Hypercard when you were still playing Mario Bros. on your brother’s NES and I had written enough useless Mac-PC flamewar postings on Usenet to fill a newsgroup within the first year of my first “Internet” account (yea, I know that’s pretty pathetic… but remember we are talking about a faraway time where nobody had yet figured what to do with this internet thing beside trolling and browsing for porn… not that anybody has, ever since). The total value of all the Apple equipment I’ve bought, had my employer buy, or stollen from heavily-guarded warehouses at great risk for my life, would likely pay off the debt of a small African country, and short of getting a position as Steve’s personal poolboy, I’ve been involved in about every aspect of the Mac-related development industry you could think of.

So before you start yelling at me for disparagingly commenting on your beloved brand and tell me how much you really like your iMac, just make sure we are on the same ground, ok?

Right. So, why do I hate Apple and their products?
Where do I start?
How about here… and there

Now of course, maybe I’m just a very unlucky person who happen to have bought the only two products coming from Apple this past year, ridden with defects and design flaws. Maybe I am an incredibly unlucky person and the models I bought belonged to a minority of factory defects, in no way representative of the overall high quality of their products.

Or maybe, just maybe, most of the products released by Apple these last few years are low-quality, margin-gnawing, under-tested pieces of crap, thinly disguised under [admittedly very pretty] professional designs.

Now, these are the kind of stats we won’t ever see unless somebody breaks into Steve’s office safe, but a little bird tells me these defects occur a bit more frequently than you are entitled to expect from devices paid well over market price. Actually, my little bird has a lot of friends who have purchased either an iPod or a Powerbook G4 in the last year or so, and a quick roundup on their level of satisfaction with their machines indicated that the group of those experiencing huge white blotch on their laptop LCD or comatose battery life on their nearly-new iPod far outnumbered the happy-customer group. call that a coincidence, but I was barely surprised when my own equipment started failing in the announced fashion after less than 6 months of intensive-though-careful use.

And don’t tell me this is no big deal, “as Apple will magnanimously accept to take care of these small impediments, at no charge for me”, and return a functioning unit, “in less than 2 weeks”… Do you think I paid such an inflated price for a laptop, just in order to spend a day backing up its data, figuring how to mail it in one piece and part with my main work instrument for a period of 15 freaking days?!? All that because Apple did not deem useful to do basic testing on their products and have been selling entire series of defective products ?!?

Even though my quasi-religious loyalty to the brand is waaay long gone (nothing like an internship somewhere 30 minutes south of San Francisco to help you bury that kind of pre-adolescent infatuation) and work has long been switched half off the mac (ever since the difficultly defensible years of MacOS 8-9), using OS X had given me a lot of hope for the future. And I was happy to have a decent alternative to that increasingly bug-ridden excuse of an OS, 90% of the planet insist on subjecting themselves through.

But right now, I really do not see how I could ever buy another piece of Apple hardware any time soon. I doubt I am the only one. And somehow I got the feeling Steve doesn’t really give a damn: he’s much too busy selling iPods and iTunes tracks to my grandma and my little brother, and he’s probably right considering the cash opportunities in either market.

Let’s seriously hope for some hardware overture (“overture”, you know, as in “intel version” or, gasp “mac-compatible clone”) before Apple kills its OS for good along with its hardware…

Update: When I told you I’m not alone

Update 2: And the fun only begins… what do you know… this morning, the super-cool magnetic latch on my PB just died… meaning that, on top of having white blotches all over the screen, a semi-faulty charger and a frame unexplainably skewed, I am now unable to properly close my laptop… I feel like killing somebody.

Keitai PictureYet another entry that our non technologically minded readers might want to skip (read: any person sane enough to keep nighttime exclusively dedicated to sleep and/or reproductive purpose rather than inane technological musings and script coding).

First is a little contribution to this massive venture in ego stroking that are personal websites. Or ego-crushing, as the case might be, but that’s none my business if nobody cares about your collection of vintage dr Pepper bottles from the 70s and your logs remain desperately empty (tip: try incorporating a sex angle to the whole thing). Anyway, if you have a site and want to monitor who comes and see what, I put together a small php script to parse and display log results matching a specific text string.

Why bother when there are many much more advanced log parsing utilities out there? Well, because, oddly enough, Awstats, that I use a lot and thanks to which I know that at least one person a month gets here by searching for “pokemon rape pictures” in Google, Awstats is unable to give me something as simple as the number of single visitors to a specific URL on a daily basis. Despite the fact that it’s sometimes damn useful. For example to know how many so-called friends have been checking our announcement for this great party we are throwing in Yoyogi next week. Hence this script.
You can download it here.
Using it is ridiculously simple (provided you know what PHP and Apache logs are, otherwise I strongly suggest doing a bit of research beforehand). Drop as many Apache log files inside the “data” directory as you want. Direct your browser toward the “quicklogs” directory, appending “?match=something” to look for a specific word or expression. Results should come neatly presented with little horizontal bars for each day.
Oh and yea: as usual, Creative Commons GPL 2 license blah blah blah etc.

In other totally unrelated, albeit not any less geeky, news: I’ve been playing with fsv, a “3D File System Visualizer” for X-Window (for trivia fans out there, I reckon this is a clone of the actual SGI program used in the movie Jurassic Park… you know, when that girl knowingly explains “This is Unix! I know this.”). It does what you would expect and display directories and files on your desktop in a cool, though slightly dated, 3D look. You can move the camera around, zoom and explore directories.

Playing with fsv got me thinking about all these alternate file-browsing system and why nobody had come up with more insightful ways to present organized data yet. Explanation: while fsv or XCruise 3D navigation systems are definitely neat-looking and in fact somewhat useful, the major turn-off is that they use file size to decide what importance to give files (e.g. how big, how bright or how close to the camera it should be). In an era where most hard drives are filled with files of disproportionate sizes (a 15 megs MP3 here, 600 megs movie there and a 30k text file in the middle), this comes with little use and ends up creating useless scales where a few files take all the visual field and a myriad of others are barely visible.

Further more, most visual implementation (not all, but most) still rely entirely on the file hierarchy (i.e. what file is in what directory) to display files together, be it as 3D block (fsv) or stars in a virtual galaxy (XCruise). This is also thoroughly unproductive in those days…

Why not, for example, incorporate criteria such as:

  • Creation and last modification date/time. Both to judge the relevance of a given file but also to create artificial contingences between files: if you’ve edited two files, each one in a separate location on your HD, on the very same date and time, chances are they are somehow related.
  • File type: not just a dumb extension matching or similar, but a classification by type of media. If you start heading toward a jpeg file, chances are you are looking for a picture on your hard drive, therefore the system should privilege files that belong to that type (not only jpeg: any graphic files, possibly even movies or less closely related file types).
  • File Content: of course, that would become more of a performance issue, but, using a smart keyword indexing system, we could get files of similar content presented closer together.

Another thing of importance, I think, is that these criteria should be evaluated dynamically (or cached whenever possible, but it’s not a good idea for a file-system browser to take a half-hour parsing the HD each time it starts): navigation should never be interrupted to scan the content of a folder or read metadata. Relevant data should be integrated progressively as they are read and file representation morphed accordingly to fit their new status (e.g. for a program like fsv, block should grow or shrink, change color and move around when their contingence and relevance becomes clearer to the system).

It would be essential that such a system integrates a powerful search tool to help navigating or filtering. This should be easy to do but I have not seen much of this in any projects lately. With HD routinely containing thousands if not millions of files, it is just vital to have ways to query a certain file by its name or type.

All these features, conjugated with one of these 3D file-browser project could give a seriously kick-ass software and help get past their sole purpose as futuristic eye-candy.

And now for the complaining about how little time I got and how I’d love to implement such a thing one day soon… yea whatever…

Movable Type 3 Developer Edition is out.

Stirred quite a controversy and lots of anger, huh…

While I think it’s perfectly reasonable that a company start trying to make some serious money off their product (gotta pay Mie after all :)) I think what most people are complaining about, is the steep pricing mechanism: of course there still is a free version, but if (like so many) you happen to have more than one author and/or more than three blogs on your site, the first price comes to $70 and goes very quickly up with each new blog/author.

Problem is, for as much as I like MT and appreciate the work that’s been put into it, $70 is, both psychologically and in regards to the competition, too high to justify such an investment. I mean, MT is a fine product, but let’s face it, most of its core could be coded (better and faster) by one or two people in less than a week (granted: with an interface nowhere near as polished). The only feature that really makes it stand apart is its flawless handling of multiple blogs/authors and good support of web standard technologies (xml, atom, xml-rpc etc). If you remove the former from the free bundle, it doesn’t hold a candle to some other free solution out there.

Further more, I personally think (and seem to be one of many), that a revamped commenting system is a tad light as the only prominent feature in a major update. It makes it hard to justify an upgrade.

To conclude, it might be more realistic and in tune with the market to offer a personal use license for under $30 that covers up to a dozen blogs/authors, while charging “real” commercial prices for corporate use. As for me, I think I will stick with this version for a while and might consider switching to WordPress in the future: its architecture is definitely nicer, and the fact it is open-source and written in PHP makes it infinitely more appealing to my inner-geek (plus the moral bonus of being able to contribute by coding)…

Using the internet on a daily basis and coping with the hoi polloi of the digital era makes me long for the days where the web was frequented mostly by CERN scientists and people knowing what the fuck they were doing. I ardently pray everyday for the institution of a mandatory Internet License granted to would-be users on the sole condition that they can justify an IQ somewhat half as high as my cat after he’s smoked his morning maui-wowi 3 incher (granted: the ability to roll a 3" with his paws altogether makes him a rather smart cat, but still)…

And I’m not talking here about spammers and other Nigerian sons of the General Abu-Ati who want to present you with an offer you can’t refuse. These are just low-life parasites of the net, unfortunate consequence of the flaws inherent to a network that was designed to resist nuclear attacks, but not insanely high doses of human stupidity mixed-in with greed. Everybody hate these guys, and they are the one most likely to get lynched when the falling apart of the North-American backbone eventually send mobs of angry slashdot nerds in the streets.

No. I’m talking about the one users who *think* they are using the Internet properly. The ones who do not hide.

First, there was the “friend” who’d forward you half-a-dozen emails to warn you about the impending “Internet sales tax to be voted any day now” and other bits of news that had usually been sitting on HoaxBuster or Snopes for a few months/years already. When tired of propagating inane Urban Legends, he would forward you insipid questionnaires quizzing you on particularly uninteresting details of your life, just in order to bore you with his own answers.

Sometimes, he would also send you [insert random spiritual figure name’s here]’s advice on Life, Love and the Universe… obviously written by some uninspired anonymous self-help guru but always finishing with the ominous imprecation to forward these cheap pearls of wisdom to at least 20 other morons, lest you end up like the poor chap who last ignored this friendly advice and perished the following night at the hands of a dozen sex-starved male gorillas freshly escaped from the nearby zoo.

One day, the same nitwit usually ends up opening one of these “Please open the attached file, there’s is something you’ll like in it”-type of email, figuring somebody has eventually caught on his idea to send useless pieces of junk to semi-strangers. When his infected computer starts spamming half the planet and slows down to a crawl, he barely notices, simply assuming that the chips are probably getting old, need some oiling or something…

But, with the magic of exponential growth and successive waves of viruses, there is a slim but nonetheless quite appealing possibility that one of the next virus to hit and spread through that endless ring of bonehead-operated computers will put them all out of order. I mean, what if, for once and for the good of the Internet community, we were to put ourselves together at work and create a mail-virus similar to the ones in existence these days, except instead of the usual pimply-teenage-hacker stuff they are usually meant to do, it would irremediably anihilate every infected host-computer all at once on a given date. Now I know it’s not that easy to destroy hardware through a software virus, but nobody said we had to look for faulty processor instructions or elaborate things like that: considering the kind of users we are dealing with, displaying a neat MS Windows-like error message:

Alert !
Your left processor has caught on fire. Please throw a bucket of water on the central unit and call 911 immediately.

… should do the trick… And simultaneously free-up my mailbox from its daily intake of pointless virus-infected mails sent through the computers of these second-class internet users.

But the email masses are not the only one polluting the net with their flat brainwaves. Nowadays, the same morons have expanded their realm to the Web. I am not talking about the overall subterranean level of most homemade web-pages and other acneic discussion boards: everybody has a right to express themselves (see: I’m not so radical after all), even if “expression” here consists of endless strings of LOLs, smileys and other sugary icons: as long as they don’t do it in my garden (or in my comments), I have no issue with it.

It DOES however become an issue when the aforementioned cyber-hemmingways start trying to embed nifty pictures in their messages (so far, so good), opt for a picture from my website (can only be flattered, really), although they do not deem necessary to ask for my permission (that’s much less nice, quite rude and stupid — especially given how I’d probably say yes in any case; but actually, I can live with that too) AND have the bright idea to spare on their own bandwidth by hot-linking directly to the files on my server (in a nutshell: displaying pictures as if they were on their server, while still having the files being downloaded from my server in the background, in essence, having me pay for their traffic)… And THAT, I really do NOT like.

I only caught on to it over the past few days, noticing some abnormal bumps in bandwidth usage (and by bumps, I mean literrally doubling or tripling over a few hours) and dissecting the weblogs, only to find out that a bunch of graphic files were being constantly queried directly by a multitude of pages on miscellaneous message-boards (probably people using them as signatures or something).

Luckily, there is an easy fix to this irritating habit: of course, one can have fun renaming the incriminated files, so that whatever picture originally lifted from your website gets replaced by some nasty image, wherever it’s been used on the Net. But I’ve got better things to do with my time than keeping tracks of hot-linking morons and renaming my files all the time. In fact, adding a few lines to Apache .htaccess file for the website does the same job beautifully.

So from now on, anybody hotlinking a picture from this website on a message board or any other external websites will get this image instead of the one targeted…

And by the way: It goes without saying that, although I retain copyright on any pictures I put here, I will quite gladly grant use to nearly anybody provided they ask first.

In a move likely to unsettle even the most avid readers of this site, I’m gonna break a record and boldly post my second entry in a month featuring somewhat, gasp, useful stuff…

This is not gonna become a habit: I swear I’ll be back to incoherent, immature, egotistic rants soon enough.

During my painful, NTT-induced, crossing of the cyber-wilderness, I had to find alternate ways of connecting to the mothership for daily instructions: wifi sounded like a good option. So, I asked around what were the best/cheapest/most convenient hotspots to download wireless broadband porn in Tokyo. I got a few pointers from friends as well as some very useful suggestions from the nice folks on the JapanBloggers mailing list…

Here is a short summary of my modest experience with the whole WiFi thing in Tokyo, hoping that can be of use to some people.

This is by no mean an extensive list of hotspots, not even close actually; more like general comments on the different wifi options available in the city (but if you have any cool spots to recommend, by all means, post a note)…

War-driving is a nice concept and all… definitely appealing to my inner-geek and my outer-cheapskate… BUT, it’s just not really convenient to walk around crowded Shinjuku streets, navigating with a 15 inch half-opened laptop in one hand and a reception antennae in the other hand… and as for walking the residential neighbourhoods, more likely to host some unprotected wifi home-network: I think I do get stopped often enough when just riding my bike home, I dare not imagine of what would happen if the cops were alerted to some weird gaijin roaming around while waving heavy pieces of electronic equipment (they’d probably unleash the SDF or Godzilla on me). Not to mention you then have to sit on the ground in tokyo’s winter and typing your emails with mitts on might take out a lot off the euphoria of not paying for it.

Paying hotspot aggregator, such as Yahoo BB, Docomo etc. do not sound overly expensive and give quite a nice coverage (most Doutors and McDs are covered by Yahoo BB)… but I guess they are really afraid to clog their bandwidth, because no amount of goodwill, tenacity and patience will be enough to get you an account within that lifetime. I thought the whole idea was for people on the go to get an easy connection, and therefore, that it made sense to offer fast and seamless account creation. Obviously, this point-of-view is not shared by the people at Yahoo BB:

– First, there’s no way you’ll get an account (like a rechargeable card or whatnot) by just walking in a Doutor and asking for it: that’d be just too ridiculously easy. Actually, ask the guys at the counter how you are supposed to get one, and you’ll get the same look as if you had just ordered a triple-cheeseburger with extra salad… it took about three guys to finally get an answer along the line of: go to yahoo’s website.

– Then, you manage to get an internet connection and, instead of doing essential stuff like checking and responding to emails, you spend about 5 hours trying to navigate through Yahoo BB’s idea of a website. Their concept is that, if you are still there after half-a-day, they might be able to pitch you a dozen services in replacement of the one you were originally trying to purchase. Let’s just say that, even though there is supposedly an option to get a WiFi subscription without going for the whole crappy ISP package, I have yet to find it.

Actually, going by some people’s account, setting-up Yahoo broadband altogether requires an incredible level of determination: “See, Yahoo’s so filthy rich we don’t need your damn money, ok? Beside, we sent all the sales people and the webmaster on the street, dressed in sailor suits, to give away free yahoo cellphone keychain: they’ll take care of your order as soon as they come back.”

Since nobody would take my money, that left me with Free Hotspots: there are a few…

Only problem with most free hotspot located in trendy bars and cafés is that, while they are useful to get a quick glimpse at your mails, if you start setting-up your mobile cubicle and get into a 5-hour mail writing session, you might end getting a few sideway glances from the personel who do not fancy their place turning into a lair of salaryman geekitude…

Nonetheless, one really cool place to go drink a beer while accessing the net, is Good Day Café in Omotesando, which is equipped with an outdoor patio, a nice selection of import beers and decent food. I can already foresee a few super-casual-friday work afternoons spent there this summer…

Café La Voie, in Shinjuku (inside Kadoya hotel, near South Exit) is also a rather good spot with tasty pastries and complete drink-menu, though slightly expensive for any prolonged session.

In the end, Manga/Internet Cafés turned out to be the no-brainer solution when in need of easy, quick and cheap connection for extensive periods of time…

Maboo Café (sporting a logo suspiciously close to Yahoo’s), a corner away from Café La Voie in Shinjuku will get you the usual combo: free soft drinks plus private connection booth, for about 300 yen/h. You can supposedly use your own laptop, but you ought to bring a pair of scissors in order to discreetly free-up the extra length of ethernet cable, rolled and tied behing the desk with these iritating plastic thingies, and plug your laptop rather than attempt to use their poor excuse of a wifi network.

To recap: if you are in need of a net connection in Tokyo, I’d recommend going first for free hotspots (even if you don’t mind paying), and consider internet cafés (usually they are mixed-in with “Manga kissaten” places and serve more as porn repositories than roadwarrior headquarters, but they do the job) if you need a more steady connection without having to worry about hogging out a seat in a coffeeshop all afternoon long.

A few links and recommendations (most from the JapanBloggers forum: thanks guys!):

  • A list of internet cafés in Tokyo
  • Hotspot locator
  • MapFan also has a convenient hotspot-indicator feature (in Japanese).
  • Did not have a chance to try myself, but somebody recommended Linux Café in Akihabara, which is actually a Pronto with Hotspot and power. Come 5pm they turn into more of a bar.
  • Also according to a fellow blogger: Tully’s in Akasaka has free net access (maybe others?).

    Definitely mail me if you got any good suggestions that deserves a special mention…


    I figured it was hight time to give a little back to society, and make up for all that money I’ve been stealing from the donation box in the buddhist temple next-door.

    So, here is something useful for a change.

    Well, the usefulness of this script is rather limited if you do not operate your own website onto which you regularly place new content… but hey, I’m sure it can find its public.

    I was inspired by this guy (website worth a check: the rants get old quick, but some of the pictures just embody japanese freakiness) and his moaning that he could not manage to code a bunch of drop-down menus that let you jump to each topic directly.

    This is simply what this PHP script does: write down the name, URL, category and date of each of your page in a simple text file and, each time the page is displayed, it will parse the file, organize the content in different menus, by date, by category etc.

    simple. easy. somewhat useful (provided you are set on not using any of these easy-to-use ready-made blog&bbs systems out there).

    You can download it here.

    To install it, you just need to drop the files on your webserver (provided it has PHP support, of course). Here is a brief description of what does what:

    • side.php: the only essential file here, this is the code for the frame that contain all the menus… if you are used to play with HTML and can work around PHP, feel free to change its layout to fit your needs (colors can be changed separately through the css file, see below).
    • styles.css: controls most of the styles for the sidebar. This is the only file you need to edit if you wanna modify the way the bar looks (colors, fonts etc)
    • data.txt: that’s where you put your list of pages. Basically, it must be a text file containing a list (one per line) of pages you want to see in the menu. Check out the example for details.
    • The rest you barely need:

    • index.html: is just a frame to hold the sidebar and the main page (where each page is loaded). Feel free to change the layout and size, but keep the frame’s name.
    • intro_page.html: is the page that will be loaded first by index.html. Replace it by whatever you want.

    And because I consider that even my most ridiculously small 30-line projects are worthy of trendy militant-geek labels: the whole thing is released under Creative Commons GPL 2 license, which means you can do pretty much whatever you want with it, except claim your grandma made it or sell it to IBM for a million bucks.

    Share and Enjoy!

    The translator is unavailable for a few days. I am currently porting it over to my new server, and rewriting it using PHP along the way… Stay tuned for an update some time soon.

    Like everybody here, I heavily rely on keitai mails for my communications.
    Unlike most people though (well, that is, unlike most locals), I have a really hard time deciphering the kanji-laden mails my friends send me. Especially given the evil pleasure some of them take into using particularly rare and nasty kanjis.
    Of course, there is Jim’s Breen awesome WWWJDIC dictionary out there, and it even has an i-mode version. But given the limitation of my phone (no easy way to cut and paste), it’s rather useless when I need to decrypt a whole email.

    Since I was only working like 27 hours a day this week (who need a social life anyway), I decided to write a small script to help me with that.

    In a nutshell:

    The script works by taking any incoming email and replying with a word-by-word translation, as provided by Jim Breen’s WWWJDIC. In order to make the translation a bit more legible on a phone’s screen, it strips any unnecessary text and replaces HTML tags the best it can.

    For the time being, I’m leaving it open for use by anybody as long as it doesn’t start hogging my server’s resources. I’ll probably even release the code for it, although it’s not that impressive and certainly won’t make it into this year’s best hack’s nominees.

    To use it, simply forward any email in japanese (kanjis and kanas) from your keitai to: jp2eng @

    You should receive back a translation right away.

    It’s most definitely a beta version, so it might, and certainly will, have tons of bugs… if you encounter one, and you are so inclined, send me a note and I’ll look into fixing it.

    Any incoming mail is logged on the server for security purposes, which means technically I could read them (then again, so could your local ISP with your regular emails), though I certainly have better stuff to do with my time. Nonetheless, if you feel uncomfortable with the possibility of somebody reading the mails you translate, do not use this service.

    I’ll appreciate any feedback.

    As you can tell, I’m having a lot of fun playing with colors and my page template…

    I eventually came to terms with reality, depressing though it might be: black-all-over, with hues of neon blue here and there, is only really cool for insecure teenagers who like to listen to depressingly bad goth music and took for the safest route in terms of noncommittal fashion decisions. Furthermore, it made it literally painful to read my already laborious ranting.

    Beside, white is the new black.

    It was high time for a change.

    Hence, the current “experimental” aspect of my site… I’m in the process of finalizing a palette of subtle pastel tones that accurately reflect my impeccable tastes and preferably match my delicate complexion. Lots need to be done in terms of harmonizing the code, so bear with me and the many weird visual glitches in the meantime.

    And by the way, since I was at it, I decided to try and give a crap about how bad the css looked on certain browsers and platforms that we won’t name so as not to bring any more shame on Microsoft. Thanks to some research and the experience of other users dealing with MS inept support of common Web Standards. I was able to topically disable unsupported css depending on browsers.

    Now the page looks ok (or not any worse) on every platforms and browsers I could put my hands on (which means IE, Mozilla and Safari on Windoze and OS X: I’m not the kind of guy who’s gonna go check if his page supports Opera, WebTV and Hitachi Microwaves Oven)… Need I say it definitely looks its best on real browsers.

    After much, much, much fiddling and tweaking with bits of perl, PHP and MT configuration, I am now finally able to post text and pictures from my new keitai

    The phone itself is pretty sweet, with tons of options that I am only slowly discovering at the pace of my limited Japanese decryption abilities (the whole interface is entirely in Japanese). Of course, it has all kind of nifty features, including a built-in camera that can take pics and short videos…

    It also comes email-equipped, so the whole deal was “simply” to put together a nice little bridge to post these pictures in a special weblog that can be seen either as a separate weblog or as a side bar to this one…
    Oh, and did I mention that it even display a small map if I send in GPS info generated by my phone? yea, it also has a GPS built-in.

    I won’t get into the details of the implementation itself, except to say it was pretty gory, involved lots of small hacks and with dead pieces of code scattered all over the floor. I also made heavy use of this very handy perl script, although I had to move lots of stuff around to fit my needs and limitations…

    Incidentally, this great piece of code was written by Dav Coleman, who used to be roommate with Cheu Koh (a friend of mine who seems to be somewhere in between Singapore and Sao Paulo at the moment). His girlfriend, Mie, used to have a really cool moblog where she posted pictures of her life in Tokyo, which she keeps doing from SF, in her new moblog. Her moblog was the first of the kind that I saw, about a year ago, when I moved to Tokyo…

    I’ll try and release any useful piece of code I might have hacked for this, as soon as I have had a chance to clean the mess…

    Anyway, thanks to this new addition, I’ll probably be posting a lot more pics in the near future…

    Been busy becoming a real cartographer these last few days… Much less straightforward than I would have thought (duh) but also quite interesting.

    I would seriously advise the casual reader to stop reading right here and skip this entry altogether, if you are scientifically-challenged or otherwise adverse to weak attempts at explaining the wonders of the world we live in through mathematics and geometry.

    The idea is to implement a few DB components (within a much bigger system I am working on) that will generate nifty little maps complete with geopolitical data and layers containing additional sets of relevant data. All this for environmental audit (risk assessment) purposes.
    Example: you want the details of a project involving the site of some kindergarten school precisely located at: Yokohama-shi, Kanagawa-ken, 4-14-2. You will first go and fetch geographical coordinates (e.g. lat/lon) matching this street address (using a geocoder component), then will extract a map of appropriate scale/size/boundaries from our map files, and finally will edit the map by placing waypoints for any other relevant data (the nuclear plant 2 miles north, the prison facilities across the street, the military training field 300 meters south etc etc).

    Seems easy, doesn’t it?

    Well, it’s not.

    God, who would have thought that placing a point of a certain latitude/longitude on a map would be so hard…
    Actually, who would have thought lat/lon measurements depend entirely on who you are talking to and where they stand in the chaotic world of geodetic standards…
    My poor innocent little self was under the foolish impression that, once you get the appropriate geocoder that will spit out the lat/lon for any of your entries, you just apply a bit of high-school geometry to convert that into usable Cartesian coordinates that lets you place some “you are here” marker on your map and everything is fine… Well, it turns out that not two measurement are compatible together, in the wild world of cartography.
    First, whatever lat/lon you got, it’s meaningless as long as you do not know in what datum (see below) it is measured. Same goes for the map, which is only valid for measurement made in the same datum, and, of course, same for conversions between lat/lon measurement and any usable Cartesian coordinates (what you’ll use on a flat map). The latter requiring the use of pretty ugly mathematical formulae that sent me back to the worst days of my topological math studies.

    The essence of the problem lies in two things:

    • The fact that, not only the Earth is a very imperfect sphere (flattened at the poles, as most everyone knows), but the mathematical parameters of its exact shape (an ellipsoid) were until fairly recently not precisely known and only reached through approximations. This added to other parameters affecting the way the Earth may appear to cartographers (uneven gravity repartition, magnetism etc) meant people only had approximated models for the Earth (what is called a geoid).

    • Because of the lack of precision in defining the general Earth shape, any measurement done using a certain geoid would lose its accuracy as you’d get farther from the point of origin of your measurements. To insure they were getting accurate distances and useful results, cartographers throughout the world decided to use an origin within their own country for their work, hence the birth of a few dozens different coordinate systems (such as NAD27 and NAD83 for the US).

    The combination of a specific geoid and a coordinate system is what we (that is, me and my good friends at the International Geodetic Association) like to call a datum. There are tons of them (each country usually has a few, as both geoid and coordinate systems were refined over the years).

    The geoid used is extremely important, as it directly affects the projection. Projection is basically the transformation of 3d coordinates (e.g. lon/lat and altitude) into 2d coordinates that can be used on a flat map. The map itself needs to be projected, and that’s where it can become ugly, as there is, to put it simply, no easy way to properly squash a pseudo-sphere into a perfectly flat accurate representation.

    The problem might be presented as such: if I draw a small map of the world on an orange and give you a knife and ask you to get me a flat map of this world… How do you do?

    Of course, there are tons of ways to go about it and a good way to picture them is to imagine you have a semi-transparent earth globe, a flashlight and big sheet of paper that you can fold in any shape you want (basically, it’s gonna be a cone or a cylinder). You then shine the flashlight through the globe and can see the projection on the paper. Something a bit like that.

    As a result of all this, you must imperatively know in which datum any of your data/maps has been measured. Any conversion (including from lat/lon to flat map Cartesian coordinates such as UTM) involves the datum.

    To spice things up a little, one must add that there is now a more or less universal datum with a geocentric origin and a geoid defined using the latest information provided by satellite cartography. It is called World Geodetic System (WGS84). This is the datum in which GPS coordinates are usually given (or, actually, one of his close cousin, as there are a few different variations, depending on the precision required, but let’s not be too picky here).

    All in all, these coordinates issues and specificities of each country (just for fun: in Japan alone, there is about two or three datums commonly used on top of the international one) makes it a fascinating nightmare to do any kind of cartography works with real-life data, involving enough mathematics to wake-up deeply repressed fearful memories of frightening topology classes…

    And I thought this would only be boring down-to-earth computer stuff…