5
Nov

It is a staple of Science Fiction that once a computer (or computer network) becomes sufficiently complex, sentience is inevitable. And big sentient computers can be bad news.

As both the owner of what is almost certainly the world’s largest general purpose computing cluster, and our self-nominated bastion against evil, I really hope someone at Google is keeping an eye on this.

20
Oct

A helpful co-worker pointed out that one of the links in my previous post that should have pointed at an old article instead pointed to Wikipedia, so I went to Google to track down the correct URL.

Two hours after I wrote it, my blog post is in the index and showing up in search results. That’s just a little uncanny. It’s not even as if I update my blog that often any more.

The Principle of Charity is a rule of debate that states you should always address the strongest possible form of your opponent's argument.

I've touched on this before.

Say you're arguing with someone and there is a flaw in their reasoning, but you also know that their argument could be reformulated to avoid that flaw. If you attack their argument as is, you'll either win a hollow victory with an argument that you know is faulty or you'll just prolong the debate as your opponent makes the obvious adjustment. It's the kind of thing you do when you're more interested in scoring cheap debating points than actually advancing the sum total of human understanding.

Not that there isn't a time and place for scoring cheap debating points.

Beyond straight argument, the principle of charity can provide a nice set of assumptions that help streamline interactions with other human beings.

  1. Assume intelligence. The person you are talking to has a brain, and knows how to use it.
  2. Assume honesty. The person you are talking to honestly believes what they are saying.
  3. Assume diligence. The person you are talking to, when given a task, will approach it with rigour and attempt to complete it to the best of their ability.

You could be wrong on any of these, that's why they're called assumptions. Ultimately, however, you're better off assuming the best and then adjusting your behaviour if you are proven wrong than you are starting off believing people are stupid, dishonest and lazy.

A very simple example. Someone else is working on a problem, and I think of a very simple solution. Do I walk over and ask “Did you think of X?”

If I do, I've just violated assumptions 1 and 3. If I could think of a simple solution, then someone else who is both intelligent and already diligently working on the problem is likely to have already thought of that answer and discarded it for some reason. Chances are I'm not even the first outsider to have suggested it.

If I rephrase the question as “So why didn’t you go with X?”, I’ve gone from assuming ignorance on their part to assuming I'm the one missing something. If X turns out to be something they didn’t think of after all, it’s a surprise for us both, and I sound a lot less condescending.

Now all I have to do is remember this sort of thing in practice.

2
Oct

iMarketing 101

  • 6:01 PM

It's 2009. You're an American-owned packaged food company, but all is not well Down Under. By accident of acquisition you happen to own an iconic Australian brand which in recent years has seen its popularity wane, especially among migrants (euphemistically, ‘New Australians’).

Vegemite is very much an acquired taste; strong and salty. Those of us who love it tend to have either been indoctrinated as children or convinced by friends or family to work through the initial ‘what the hell is THAT?’ reaction.

After some research you come up with a new product that you believe is friendlier to the unfamiliar palate. You hope that this product will bring you new customers, and maybe even act as a gateway to lure people to try the original flavour. So how do you get people to notice?

Some publicity is a given. Any update on a product that is in some ways synonymous with Australia will make it into the nightly news bulletin and the daily paper. If you grease the right palms you might even get a longer segment on a week-night current affairs show. But you're ambitious. Can you make your product launch occupy not one tiny corner of one news cycle, but a whole week of headlines? What about a month of them?

Well, this week we found out.

  1. Hold a competition to name your new product. That will get you on the news on release day, then a few mentions throughout the competition.
  2. When the competition ends, choose the worst name possible
  3. For extra points, pick a name that will be annoy people on the Internet, because ‘people on Twitter are upset’ is a flavour-of-the-month story
  4. For extra extra points, play on nationalistic outrage by announcing your new name for that most Australian of products during the Australian Rules Football grand final
  5. Once you've wrung as much attention as you can out of the “naming debacle”, apologise profusely for your “mistake” and announce a new competition to pick the real name from a pool of obvious candidates.
  6. Finally, announce the new name

‘iSnack 2.0’ was so obviously a name for the week, not a name for the ages. What I find most amusing is that the current generation of consumers are, at least if you ask them, so much more cynical of marketing ploys. We're more clued in to how the media works and the Internet has taught us to mistrust authority and question everything we read.

Yeah, right. Someone in Kraft marketing is on track for a pretty big bonus this year.

25
Sep

  • Return time machine to rightful owner.

23
Sep

The more I look at Google Chrome Frame, the more I'm struck by how clever it is.

For those coming in late, Google Chrome Frame is a plugin for Internet Explorer that embeds the entire Chrome web rendering engine inside IE. Site authors can include a simple meta tag in their HTML that will tell the browser to use Chrome to render the page instead of IE.

(Let's ignore for a moment that when Microsoft introduced a meta tag that changed IE8s rendering mode, the web went apeshit.)

Ask any web developer and they'll tell you the biggest millstone around the neck of the web is Internet Explorer 6. Ask browser users, and they'll tell you the overwhelming reason why they can't upgrade to a more modern, standards-compliant browser is because their work won't let them. Ask IT departments why this is the case and they'll point to the six- to seven-figure costs of upgrading turn-of-the-century Intranets written to work in, and only in, Internet Explorer 6.

Google have provided a way for websites to opt out of IE6 (and even IE7) support without requiring enterprise-wide, Intranet-breaking browser upgrades, something Microsoft occasionally promised but never managed to deliver. In doing so, they've cheekily cut Microsoft out of the upgrade path of their own web browser.

Dear corporate IT departments. Your last tie to IE6 has just been neatly routed around. At my most conservative estimate you have twelve to eighteen months to either bite the bullet and adopt a real modern browser, or make Google Chrome Frame part of your default desktop image. Beyond that, I guarantee large chunks of the public web are going to stop working for you.

Woke up this morning to found the entire city shrouded in creepy orange fog. These photos are not corrected in any way, the colours are exactly as they came off the camera.

‘They’ are trying to keep us calm by telling us it's a dust storm, but I'm not so sure…

Next day, the dawn was a brilliant, fiery red and I wandered through the weird and lurid landscape of another planet; for the vegetation which gives Mars its red appearance had taken root on Earth. As Man had succumbed to the Martians, so our land now succumbed to the Red Weed. (*)

2
Sep

Back in 2002, I wrote the following about the proposal for an ‘enhanced for loop’ in Java 1.5.

Foreach takes probably the most common use of Smalltalk blocks, the internal iterator, and creates a syntactic special-case for them. Once again, it's a band-aid solution. Foreach removes the annoying duplicated syntax for the simplest case, but it does nothing to give programmers the chance to remove duplication on the more complex cases.

So it seems now for Java 7, closures having been dropped from the roadmap, it's time to apply the next band-aid. This time the recipient is the next in the line of usual suspects, resource management:

Absent a language change, you must close resources manually. That is why Java’s competitors have automatic resource management constructs (C# has using blocks and C++ has destructors).

Back to me from seven years ago:

Once foreach is implemented, the precedent has been set: whenever the lack of [closures] causes us to lag behind C#, don't fix the underlying problem, work around it with a variant on what we have already.

The funniest part, of course, is that C# 3.0 has had closures (or at least succinct lambda expressions with type inference) since 2007.

10
Aug

Whenever you use any online service, especially one without a proven business model, you should always ask yourself “is the benefit of using this greater than the cost of it vanishing in a year’s time?”

Can we get an export of our DATA, eg. which tr.im urls goto what fullsize URLS?

So that I can rewrite the thousands of links in my blog which point to tr.im soon to be nowhere.

— A comment on the blog post announcing the closure of tr.im

I’m pretty sure this isn't the last URL-shortening service to be closing its doors over the next year or so.

6
Aug

There are three stories in IT journalism:

  1. New product is set to unseat market leader
  2. Company is about to be bought by another company
  3. Apple might be doing something cool, but we don’t know for sure

All other stories must be spun until they fit one or more of these narratives.

31
Jul

Required?

  • 7:26 PM

“We reject the view that copyright owners and their licensees are required to provide consumers with perpetual access to creative works.” — Steven Metalitz, legal representative of the American motion picture and record industry associations, in a letter to the Copyright Office.

Required? Of course not. But both Apple and Amazon prefer DRM-free content in their music stores as consumers learned repeatedly that any music they bought could stop playing just because the company they bought it from lost interest in the market. That same lesson is now being relearned by early adopters of electronic books.

Required? No. But if you don't sell products people want to purchase at a price they’re willing to pay, you’re going out of business,. Unmourned.

22
Jul

Every so often there's a meme that goes around inviting bloggers and diarists to pen a letter to themselves as a child or a teenager, telling themselves all the things they now wish they had known at that age. Some are well written and poignant, like Stephen Fry’s contribution to the genre, but most I’ve read boil down to “Cheer up, it’s not nearly as bad as you think, avoid [some big mistake] and learn a musical instrument.”

I've always balked at writing such a letter myself because, after stumbling through my borderline depressive self-loathing 20’s, I've managed to turn against all odds into somebody I'm quite happy being. There are all sorts of things I could have done better, mistakes I could have avoided and different directions I could have taken, but all the things I've done wrong contributed as much to who I am today as the things I did right. If I changed them I'd be somebody else, and I don't want to be somebody else any more.

Sure, I could go back and tell my teenage self not to give up playing the piano, but would that just leave me in my 30’s dreading another gig in the bar of some hotel waiting for the inevitable tooth-grinding moment some drunk tourist requests ‘Piano Man’ for the sixty thousandth time? Would I hunch over the keys, bang out those first chords and wish to my core I could go back in time and advise my teenage self to teach himself Perl?

So I pondered. And I thought. And I finally came up with the one important, nay vital bit of advice I would give myself if I had the chance.

Charles,

This is your future self. I'm 33 now and I've been given the opportunity to reach back in time and give you one piece of advice. You won't understand it today but if you hold it close to your heart you will one day thank me for it.

Whatever you do, prefer composition over inheritance.

See you in 17 years,

Charles.

21
Jul

A recent story on Mashable reported of a Facebook user discovering their photo being used in an advertisement for a dating site. After much to-ing and fro-ing it was determined that while Facebook do reserve the right to use your likeness in advertising, this particular ad came from a third party network.

Colour me not particularly surprised. A couple of days ago I spotted this advertisement gracing the right-hand side of my Facebook page:

‘Now you can get six-packs with a new proven method!’

“Wait a minite!” I thought. “That fellow in the picture looks remarkably familiar. I wonder if I can find something like it on the Internet?”

If you were playing at home, you’re absolutely right. It's Edward Norton playing a skinhead murderer in the movie American History X. That little black blob carefully cropped out of the frame? A swastika tattoo.

Oh dear.

Reputable sites often run disreputable adverts, but generally they blame their provider and take steps to avoid the offending ads appearing again. Facebook, though, is the provider. The fact that this sort of thing is a par for the course on the site is a bad sign. It suggests Facebook is so desperate to get anyone to advertise that they can’t afford to exercise any quality control.

10
Jul

Donna: If I had to be trapped on a desert island with only one person, it would be you.

Charles: If I had to be trapped on a desert island with only one person, I'd want someone who looked remarkably like a boat.

Donna: If we ever get engaged, you don't have to buy me a ring. Just get me one of those new iPhones.

Charles: Er… something you’ll want to replace after a year when a better version comes out?

Agnes: So Donna’s into World of Warcraft?

Charles: Yeah. It's like one of those movies.

“Hey, Charles is lost. We’d better send in a search party to find him.”

“Great. Now we’ve lost the search party too.”

22
Jun

Recently in the news, a Commodore 64 emulator with a bunch of legally licensed games was rejected from the iPhone App Store. Normally this would be a simple case of “didn’t you read the license agreement?” except that apparently they had previously run the idea past Apple Europe to positive response.

I was chatting to a developer from a competing phone company at JavaOne, and he was telling me how annoying the competition found Apple's ability to turn the negatives of their platforms into positives.

The example he gave me was security. Other phone manufacturers have to go to great lengths to sandbox third-party applications, building a complex security model to defend against malware. Apple instead said ‘screw that’ and moved the security model up a level into the app store. I'm sure it's possible to get a malicious app approved, but it would involve registering as a developer and writing a potentially commercially viable app that would pass Apple's quality control, and Apple could throw the kill switch on it the moment they discovered it was malware.

This is the root of the ‘no emulators’ provision. Apple needs to control the code running on the iPhone. Emulators open the door to unapproved code. Hence emulators can not be approved.

It is likely a C64 emulator would itself protect the iPhone from malicious apps, since emulated apps already run in the sandbox of emulated hardware. Sure, Apple wants to control the content on the phone, but given the new capabilities of iPhone 3.0, how are downloadable games different from any other kind of in-app purchasable content pack? This is what happens to rules once they are written down and removed from the reasoning behind them.

Certainly, Apple could go the extra mile and build a better application sandbox for the iPhone. But this just turns into the classic software development scheduling problem: ‘Sure, we can do that. We can do anything you want. Just tell me which three features I should cut from the next release to get it done.’

Interestingly enough on the same trip I ran into a developer who was dipping his toe in Android development. He told me his second biggest frustration1 was the hardware. He was developing some cool graphical/physics demos, but even being sure that they could run smoothly on arbitrary Android phones, or even run without crashing, was turning out to be far too much work.

Once more, it's turning a weakness into a strength. Apple controls the iPhone hardware and the software that runs on it, against all the ‘hey, didn’t the open PC platform win?’ logic of the industry. Turns out that's the same logic that attracts games developers to the predictable hardware and software of consoles, despite the license hassles and limited hardware, over trying to tame the beast of PC gaming.

Originally a reddit comment

1 The first, apparently, being the primitive implementation of the Java Virtual Machine. These performance tips read like the sort of advice you'd give a 1990’s era Java developer, which makes sense once you discover the VM lacks a JIT compiler.

17
Jun

I spent most of last week at Apple’s Worldwide Developers Conference. WWDC one of those things I do every couple of years and the first question I always get when I mention this is ‘Why?’ As a Java developer whose only Mac coding is spare-time hobbyist playing around, what's the value to me of going to an Apple developer conference?1

The obvious answer is ‘because I learn stuff’. I can't tell you exactly what because of the blanket NDA that covers everything after the Keynote address, but I can give some idea of where I'm coming from. I've always felt that attending was valuable to my education as a general purpose nerd, but I think the reason only really became clear to me in the [Redacted] session when Bertrand Serlet described how Apple [Redacted].

I'm not going to mention any particular companies or products here, but one thing that seems to happen far too often at major keynote tech conferences is The New Direction. Some great new programming language, environment or set of APIs are unveiled as the great new way that you are going to write software in the future, but it quickly becomes obvious that the people selling you this technology simply aren't using it themselves for anything important.

One of the cool things about WWDC is that for the most part, the libraries and APIs that are unveiled to developers are the stuff that Apple has been using to develop the software that runs, and runs on the next version of Mac OS X, and now feels are mature enough to make available to third party developers. The talks are littered with examples of how a new API allowed some team to delete this much boilerplate code, or allowed them to implement one of the new features showcased in the keynote this much faster.

It makes a refreshing change. It's far more interesting for me to sit in a session about Grand Central Dispatch and learn how it has already made some application I use every day substantially more efficient, than it is to learn that some new API is conceptually better, works really well in this demo, but the vendor haven’t themselves written any shipping code that makes use of it.

So one thing WWDC provides me is a showcase of ways in which a company that controls a suite of applications, the OS those applications run on and the developer tools used to develop those applications solves some pretty substantial engineering problems, and how it turns those solutions into publicly consumable APIs.

Which, I think, is pretty damned useful.

1 Beyond simple fanboyism, which I must admit still plays a non-trivial part in my decision to attend, and the fact that I seem to be in San Francisco at around that time on other business anyway.

8
May

I guess it could just be another case of “Thanks for coming in today” vs. “HTFU”.

A recent comment on an internal Atlassian blog sums up the subtle social dynamics involved in maintaining offices in San Francisco and Sydney.

28
Apr

What is swine flu?

According to the Center for Disease Control, swine influenza A (H1N1) is a flu virus that normally infects pigs. Occasionally the virus mutates so that it can infect humans, and since the human immune system is not properly equipped to deal with the virus it can be quite a serious infection.

Is swine flu dangerous?

The exact danger is not known. On one hand, existing flu vaccinations are unlikely to protect against swine flu. On the other, so far it seems that swine flu can be treated with common retroviral medication. In the USA, the CDC has released a quarter of its stockpile of these drugs to treat the current outbreak.

What are the symptoms of swine flu?

At first the virus presents with normal flu symptoms: a cough, fever, sore throat, body aches, chills and fatigue. As the disease advances sufferers may experience diarrhea or vomiting. Once the disease reaches its final stages, sufferers will experience hair loss, gradual pinkening of the skin, facial swelling that causes the patient's nose to widen and flatten, and an intense urge to roll in mud.

Are there other variants of swine flu?

Most, if not all of the fatal cases related to swine flu have been in Mexico, but it is not yet known if these deaths were caused by a more dangerous strain of the flu, or just because of differences in available medical treatment. In addition, some cases of swine flu outside of the USA have been reported to be thicker and less crispy than the American counterparts. (This variant has been named “Canadian Swine Flu”).

How did H1N1 pass from pigs to humans?

The CDC are performing an in-depth study to attempt to trace the flu back to its original source. So far they have been unsuccessful, but they have come up with the following composite drawing of “Patient 0”. Anyone who knows someone who fits this description who may have recently visited Mexico should immediately contact the authorities.

(the results of an image search for bacon [sorry, this is a visual gag])

…is not like the other.

26
Apr

I never used Geocities, but I can't help agreeing that even if Yahoo! is going to discontinue the service, they shouldn't let all that content just drop into the bit bucket of history.

It’s cute and pithy to say “Well, good fucking riddance to Geocities”.… Many pages are amateurish. A lot have broken links, even internally. The content is tiny on a given page. And there are many sites which have been dead for over a decade. But please recall, if you will, that for hundreds of thousands of people, this was their first website. This was where you went to get the chance to publish your ideas to the largest audience you might ever have dreamed of having.… In a world where we get pissed because the little GIF throbber stays for 4 seconds instead of the usual 1, this is all quaint. But it’s history. It’s culture. It’s something I want to save for future generations. – Jason Scott