Archive for July, 2008

Starbucks closures in Australia

Thursday, July 31st, 2008

What the hell is going on with Starbucks?

They are closing 61 out of their 84 locations in Australia, but I can’t see why. One of the locations due to be closed I know very well, it’s Starbucks in Chatswood – a rich suburb and it’s the only Starbucks there. I walk past it a lot and it’s always full.

How can you lose money selling $6 coffee to rich Chinese 16 hours a day? I had assumed they were raking in the cash. The Taiwanese tea shop across the road has premises twice as large, charges less, has half the patronage, and they’re doing fine. No other shops around are closing.

Sure, American businesses sometimes misjudge the Australian market. Krispy Kreme has struggled here, discovering belatedly that oil-soaked donuts are not exactly part of the staple diet here – but even so the KK store in Chatswood is still doing fine after downsizing. And it’s not like coffee is unpopular; quite the opposite. In fact I noticed a new café opened just last week, very close to the SB. Something doesn’t add up!

Anyway, my favourite branches (Darling Harbour and George St) will be staying open so it’s not like I care all that much – just amazed that anyone could possibly lose money with such a seemingly foolproof brand. Starbucks Inc has obviously screwed something up in a big way Stateside and are cutting back international operations as a result. Wonder if the Japan stores are next.

UPDATE:

I’ve been thinking about this some more, and factoring in my own purchasing habits to understanding SB’s problems in AU.

Let’s think about my purchasing patterns:

Number of times I have bought prepared beverages, hot or cold, outside the house in the last year: maybe 100+

Number of purchases from Boost Juice: 30+
Number of purchases of pearl milk tea or other chinese drink: 20+
Number of purchases of coffee from a non-SB café: 50+
Number of purchases from Starbucks: uh, 1 or 2, I forget, both green tea frappucinos in summer

I think that, upon further reflection, I am beginning to see the problem.

Maybe Starbuck’s competition in Australia is much stronger than in the USA, or indeed Japan. Here, if I want coffee, I very rarely buy it from SB. There are plenty of other cafés around, and generally their coffee is better than SB.

If I want a cold drink, I will usually buy either a fruit drink from Boost or some kind of chinese pearl milk tea. Both are delicious, Boost is healthy, and both are cheaper than SB. Also more convenient, open later, and I know some very nice bubble tea places with nice gardens to sit and read.

Basically Boost wins over SB 9 times out of 10. If I’m going to pay $5 or more for a drink, I want to actually get something for my money – my favourite drink from Boost has a banana and yoghurt, sweetened with honey and plenty of milk. SB is little more than water, flavour, corn syrup and crushed ice. I like it sometimes, sure, but when I think about how often I actually buy that – not very.

I drank SB much more in Japan and I think that’s where I started thinking I liked it more than now. But upon reflection I only drank it so much there because there simply wasn’t anything else. Plus, it’s cheaper there, and the stores are open later. I remember wishing they had Boost there, and some better coffee places too – now I’m in AU I simply go to them instead.

Maybe SB isn’t such a sure fire success in Australia after all.

UPDATE 2:

Some good analysis here and .

Google translation

Wednesday, July 23rd, 2008

Saturday
Wakatta means “saturday”. Understand?

Blue Marble sphere mapping

Thursday, July 10th, 2008

Using the excellent Modo, I mapped a few of Nasa’s Blue Marble earth image series onto a sphere. Here’s one rendering.

Blue Marble

That’s a 5400*2700px texture map, which was enough to bring this 2GB machine to its knees. God knows how much memory you’d need to use the 21600*10800 map. I foolishly tried it, and force quit the program about 10 minutes later : /

I also did the “earth city lights” map:

Earth at Night

As you can see, I am a true master of realistic lighting. Who needs a stupid “sun”.

Girls in anime getting more realistic

Thursday, July 10th, 2008

I was pleased to see that the girls in the Production I.G. animation Real Drive are drifting more in line with reality in terms of the female japanese physique:

Real Drive 1

Real Drive 2

Real Drive 3

That’s much more in line with the chubby sailor-suited figures you’ll see on the yamanote line than the usual super-skinny animation girls, which stretched credulity even for westerners.

Unfortunately, I have no idea what Real Drive is even about, despite watching 3 episodes so far. Some kind of point about how “diving” (VR access) in the “meta-real” (some kind of cyberspace environment) is analagous to diving in the actual ocean – which, by the way, seems to have come to life? It is incomprehensible. Looks nice, though, and it’s always interesting to see Masamune Shirow and Production I.G.’s vision of the near-ish future.

A more interesting reading might be that ubiquitous networking, now and in the future, is becoming such a fixture in the modern world, and such an unknown technology for the majority, that it is now being treated in fiction as a kind of naturally-occurring environment, with all the emergent behaviour that entails and even being accessed in a similar physical way. This isn’t new, of course – the mapping of physical gestures onto actions executed in a cyberspace context dates back to Neuromancer and maybe beyond. But it’s certainly becoming more common – this is the second animation series I’ve encountered in a year which revolves completely around the concept of unexpected emergent behaviour in an omnipresent networked environment.

On another note, in my opinion, sometime in the last year average fansub animation downloaded using bittorrent has exceeded DVD quality in both picture and subtitles/extras. A 350M mkv file, which typically includes excellent peer-reviewed subtitles and is compressed using H264, is higher resolution and generally just looks, sounds and is excellent. It is available sooner, is typically replaced if problems are found, and has fantastic high-speed distribution. Bluray might be better but is completely unavailable, and would be overpriced and months or years late if it did appear.

Nice going, media companies – another reason not to buy your tacky plastic disks, delivered years late, with shoddy production values and at eye-watering prices.

Too clever

Tuesday, July 8th, 2008

Another in my series of “lessons I’ve learnt as I progress in my journey from rank amateur to serious developer”.

Some time ago I posted a series of articles discussing the use of “advanced” database techniques with Rails, mostly utilising Postgres. See here:

Switching to PostgreSQL
Strict databases are great for discipline
hacking native UUID support into Schema:Dump
UUIDs in Rails redux

Anyone visiting those old articles these days will notice a new update: don’t do this. Why, you might ask? Since I thought it was such a good idea at the time.

Turns out that being “clever” with your DB setup is almost certainly more trouble than it’s worth.

Sure, using PGSQL schemas to share tables between your applications seems like a nice, elegant solution compared to throwing everything in one DB and using table namespacing to distinsguish between them. Sure, using the schemas saves you from having to define table names in every model where you access a “foreign” table. Unfortunately, it’s a giant pain in the ass to maintain and constricts your use of migrations.

Sure, hacking Rails to read and write PGSQL’s native UUID format is elegant and looks kewl in your migrations, etc. However, maintaining it is a giant pain in the ass and kills cross-DB compatibility.

These are examples of me being “too clever”. Not trying to brag or anything here, I’m using the term in a self-deprecating manner. What happened was that I, a relatively inexperienced developer, thought I’d found some “cool” solution to a problem I was having – or imagined I was having. I then “solved” the problem in a manner which was worse than anything the “problem” itself presented.

DO NOT use postgresql schemas unless you have a damn good reason for it. “Making your tables look nice” is not a good enough reason.

DO NOT use database-specific data types unless you have a damn good reason for it. Again, “looking nice” is not nearly enough.

UUIDs are strings, pure and simple. Using a UUID data type in PostgreSQL gains you one thing – checking that anything you try and save in there looks like a UUID. That should be in your own tests. What you lose is cross-platform compatibility, ability to use standard Rails, reliance on hacks to schema dumper, and more. And they’re strings, right? So store them in a fricking String field. Anything else is just not worth the hassle.

Schemas seem cool and elegant, and they are. Unfortunately, what you want isn’t “cool and elegant”, it’s “easy to work with and convenient to maintain and update and migrate and change around when you need to”.

It took me hours, days, to implement the changes to use the above features of PGSQL. It took a couple of hours to undo all of that and go back to standard data types, standard layouts, minimum complexity. Wasted work and time? Sure, but I learnt the lesson I’m trying to convey here – keep it simple, don’t be clever, maintain cross-compatibility and stick to the lowest common denominator unless you have a really, really good reason not to – and mine didn’t count in the end.

I’m still using PGSQL, of course – I like it, and even MySQL 6 inexplicably still doesn’t offer sub-second precision in DATETIME or TIMESTAMP, which I want. And I’m certainly not moving away from the UUID approach, which I firmly believe is best – all of that still stands. But I’ve gotten rid of all the special data structures and non-standard migrations and database-specific data types, because the miniscule aesthetic benefit just was not worth the loss of freedom and convenience everywhere else.

Live and learn, eh.

Cultural Excursions

Wednesday, July 2nd, 2008

As part of my frequent inquiries into what the Other is watching I came across this astonishing video (2:02, 67M) made by an American using Japanese animation & music. It’s nothing unique, you can find hundreds like it on sites like niconico.jp but this is a particularly good example and in high quality.

It’s a music video constructed using scenes from the animation Lucky Star (and what looks like some parts from Initial D) with a background of the music from “Overdrive” by IOSYS, one of those insane Japanese bands that seem to be engaged in some kind of BPM/audio stimulation arms race where the victory condition is to pack as much information into as short a time as possible such that the listener’s brain just kind of collapses from overstimulation.

I don’t know which is more scary: that such a culture exists, that the source material exists, that some fan obviously spent HOURS making this video (although he equally obviously does not understand a word of Japanese; all his attempted matches are wrong), or that I actually kind of like it.

Video taken from here. Degraded Youtube version for the bandwidth-challenged but I highly recommend downloading the full version above for the full experience. It is fucking hypnotising.

UPDATE: Yes I know this is not, of course, the official video. It’s some amateur AMV, which I usually despise. However, this one struck me as representative, somehow, of a culture, so here it is.

Thank you TextMate

Tuesday, July 1st, 2008

Thank you TextMate for rendering my computer unusable for 5 minutes, taking every last byte of RAM available and swapping every other process out while you apparently loaded every file in my project into memory at once (including multi-hundred-MB log files) and then leisurely (but disk- and CPU-intensively) sifted through it after I had the temerity to actually use your “search in project” function.

Next time I’ll remember to use git grep. Oh, and now I love how TM is still using 708M of memory (RSIZE) even after I’ve closed everything.

Isn’t TM about due for an update? How about better memory management and a way to exclude folders from search for starters?

Song of the Week: Darkness and Starlight

Tuesday, July 1st, 2008

By the Black Mages, from their newest album, The Black Mages 3, and is an adaptation of The Opera of Maria and Draco from Final Fantasy 6.

If you are a fan of 15-minute Japanese Rock Opera, click here for heaven. (35M) Also you can find some translated lyrics here.

The rest of the album, unfortunately, is not up the standard of The Skies Above to my ears. Maybe it’s just because I don’t personally like the songs chosen but I feel the ones that were are patchier and less suited to straight rock playthrough than those on TSA. Strange, because there’s a huge wealth of material to choose from – Uematsu can, of course, use whatever FF music he likes, and there’s a *lot* of that. 3 albums and no Chocobo theme? What’s going on!!