Good life at Happy Meal Central

It’s been about a decade since the last time I had a meal at McDonald’s. I heard that they’re trying to change their image, and indeed it turns out that they’re nothing as stuck to their singular success recipe as I had assumed:

Vegetarian McDonald's meal in Helsinki

That’s a vegetarian McFeast with rye bread; fresh apple slices instead of fries; and orange juice instead of a soda.

These options don’t cost extra over the standard fare. This was actually a very decent meal for the price, so I don’t think McDonald’s will have to wait another ten years until I bring them another 6 euros.

This begs the question — is it like this everywhere? Or does Finland, by some strange twist of fate, have the best McDonald’s in the world?

Posted in Uncategorized | Leave a comment

The opposite of thrifty

Spending is a key component of modern life. The biggest victory in post-war history was achieved not with guns and steel, but through spending: the United States successfully outspent the Soviet Union, as the latter went bankrupt trying to keep up with ever more extravagant and expensive military gadgets like stealth fighters and Reagan’s “SDI” space war initiative.

In recent years of economic crisis, spending has become more like a postmodern TV hero. He is the Magnificent Bastard who is also a Double Reverse Quadruple Agent: an inscrutable two-faced object of desire that plays the roles of angel and demon at the same time. On one hand, ever-increasing spending on credit is clearly the culprit behind the crushing debt woes faced by the United States and the eurozone countries. On the other hand, spending is a commonly accepted solution to avoid a looming recession. Opinions disagree whether it should be governments doing the spending to stimulate the economy, or whether we should figure out other ways to get individual consumers and companies to spend more, but the reasoning is fundamentally the same: spending equals growth.

Thriftiness has long been out of fashion. The following graph illustrates the household savings rate in some important developed countries, just before the latest economic calamities begun:

Household saving rates for selected countries

(As usual, just because an infographic is prominently displayed doesn’t mean it’s telling the whole truth: newer reports indicate that the US savings rate has jumped back to 1993 levels within the past two years. But I’m trying to make a point rather than report numbers objectively, so I’m happy to use this graph as it is.)

The focus on spending belies a belief in a one-dimensional scale: either we’re thrifty and scrimping (which easily means losing out on everything but the bare and boring essentials), or we’re spendthrift and profligate (which often becomes wastefulness and outright squandering).

But is it really that simple? Growth economics doesn’t merely look at who’s parting with their money, but also its destination. Not all ways to spend are equal.

We are a growth-oriented society, and so we seem to be constantly looking for something that could provide an inspired mindset for growth. Preferably it would be a singular banner word to gather around; a palatable opposite of thrifty that could fuel the growth we want. But it now seems pretty clear that the right answer isn’t spendthrift.

I’d like to propose generous for this vacant post. I know that he’s more than a century out of fashion; the theorists of modern economic life, from Trotsky to Friedman, didn’t think much of him. Yet this should work more to his advantage, if anything – at least generous is completely unsullied by the long path of development that has lead to the current crisis. (Ever since the French National Assembly decided to execute Louis XVI in 1792, generous has spent most of his time on various Pacific islands, making occasional appearances as Santa Claus.)

Here is another infographic which explains the current position of generous, and highlights some of our misunderstandings about him:

Donald may not fit the traditional image of generosity. He’s moody, selfish, generally lazy. But under pressure, he never fails to help his family as well as others. He takes care of three orphan nephews and helps his rich, thrifty uncle in his quests for ever more money and resources, even though these riches never benefit Donald directly.

His generosity is creative and infective: instead of moaning about not being able to buy the expensive thing, he comes up with his own solutions. Sometimes these are so good that he becomes temporarily popular in one field or another, but inevitably something goes wrong; the duck’s human weaknesses win or circumstances conspire in incredible ways, and his designs fail.

That doesn’t make his effort any less worthy, though. We only need to compare with the total lack of societal impact by his cousin Gladstone Gander, who never puts in any effort. He doesn’t produce, doesn’t take care of anyone, doesn’t give away, but doesn’t hoard either – he just lives to spend riches as he gains them through sheer luck.

And here comes the conclusion which you, dear reader, have surely anticipated long ago just by the date stamped on this post. In this season of giving, on which axis of the above graph would your efforts be marked? Are you being generous, or just spending?

Happy holidays to everyone!

Posted in Names, Society | Leave a comment

Why the Mac App Sandbox makes me sad

Apple announced today that, starting in March 2012, all apps on the Mac App Store will be required to run in the so-called “App Sandbox”.

The sandbox is an environment that locks down the Mac in ways that match (and exceed) the limitations found on iOS. A sandboxed app doesn’t have direct access to any files or frameworks on the system. It can’t access the network or any devices.

For the app, nothing else exists on the system except for those files and APIs that the operating system explicitly makes accessible to it:

By default, the sandboxed app doesn’t really have anything of its own. Even files in its own Application Support subfolder may be deleted by the operating system if it wants to e.g. reclaim some disk space. The sandbox analogy is quite fitting indeed — inside it, an app’s data has all the permanence of a sand castle.

Do you feel entitled, punk?

Since the Mac isn’t a phone, most apps need to do something more persistent than e.g. rendering a nice image of a collapsing sand castle. To enable these apps to perform their job, Apple has created a list of permitted capabilities called “entitlements”.

Here is the complete list of available entitlements:

  • Read-only access to the user’s Movies folder and iTunes movies
  • Read/write access to the user’s Movies folder and iTunes movies
  • Read-only access to the user’s Music folder
  • Read/write access to the user’s Music folder
  • Read-only access to the user’s Pictures folder
  • Read/write access to the user’s Pictures folder
  • Capture of movies and still images using the built-in camera, if available
  • Recording of audio using the built-in microphone, if available
  • Interaction with USB devices
  • Read/write access to the user’s Downloads folder
  • Read-only access to files the user has selected using an Open or Save dialog
  • Read/write access to files the user has selected using an Open or Save dialog
  • Child process inheritance of the parent’s sandbox
  • Outgoing network socket for connecting to other machines
  • Incoming network socket for listening for requests from other machines
  • Read/write access to contacts in the user’s address book
  • Read/write access to the user’s calendars
  • Use of the Core Location framework for determining the computer’s geographical location
  • Printing

That’s it. (There are also a couple of temporary exception entitlements that will be going away. If your app uses Apple Events or Mach ports, Apple may grant you a temporary license to keep doing so, if you can make your case convincingly.)

Need to access hardware using something else than USB, for example Thunderbolt, FireWire or Bluetooth? Tough luck. (Just because these interfaces are on your Mac doesn’t mean Apple wants anyone to use them via 3rd party software.)

Need to communicate with processes that your app didn’t directly start, or perhaps take screenshots? Not going to happen.
Update: Gus Mueller, author of the Acorn app to which I linked, reports that screenshots are allowed in the sandbox. My apologies for the mistake. (Taking screenshots essentially means an app can read the contents of other applications’ windows. This is clearly a security risk in the same vein as opening arbitrary files, so I had assumed that screen capture is disabled in the sandbox.)

Maybe you’d like to read and write files in a known location on a network disk? Not possible, unless you pop up the Open/Save dialog for every file.

It’s important to note that these entitlements are granted by Apple, not by the user herself. App developers must provide justification for their entitlement requests when submitting an app to the App Store. If the Apple curator thinks that your app is not deserving of accessing the Pictures folder or interacting with USB devices, she has every right to turn down your request without additional justifications. (We’ve seen many Beckettian variations of this scenario played out on the iOS App Store over the past years.)

Goodbye plugins

One side-effect of the sandbox model which makes me particularly sad and nostalgic is that it kills the notion of plugins. This will also affect many of Apple’s own pro apps on the App Store.

Traditional plugins are binaries that are installed into a known shared location. On startup, a host app that supports plugins will look for them in the shared folder, and if they’re deemed compatible will make the plugins available within the app. Typical plugin scenarios are image and video filters, file format import/export, and providing direct interfaces to web services.

Many professional apps have a thriving plugin ecosystem. Adobe Photoshop started the boom back in the mid-’90s. Photoshop plugins have faded in popularity since those days, but plugins continue to be important for video and visual effects work, where users tend to have very specific and complex needs that the host app developers can’t possibly anticipate. Plugins are also great for apps like Aperture that focus on workflow management rather than editing tools, allowing 3rd parties to “fill the holes”.

In the brave new sandbox, this is not going to be possible. For starters, sandboxed apps can’t see the shared locations where plugins are traditionally installed.

Even if the app could see the plugins, it wouldn’t be able to load the code because sandboxed apps are code-signed. The sandboxed app binary contains an encryption signature inserted by Apple that tells Mac OS X that this code is safe to execute. Third party plugins wouldn’t have this signature, so they wouldn’t run.

I’m curious to know what will happen to Apple’s own applications that support plugins, including Final Cut Pro X, Motion and Aperture. These apps are only available on the Mac App Store. There is no way to even get a temporary exception entitlement that would allow plugins (at least for 3rd party developers).

If Apple were to keep plugin support in these apps, it would make it obvious that they don’t need to play in the same sandbox as everyone else. I don’t think they would want such a blatant example of two sets of rules on the App Store. Hence, I’m afraid that the days of plugins in Apple pro apps are numbered.

So what?

The obvious counterargument is that it’s Apple’s store, they make the rules, and nobody forces developers to submit their apps. This of course remains true. Mac apps installed outside the App Store will continue to run and enjoy the access privileges that, by and large, have allowed these apps to exist in the first place. (Think of a Mac app that you’ve loved over the years. I’m 99% sure that it does something that is not covered by the App Store entitlements.)

However, the Mac App Store is increasingly the place where Mac users discover apps. Apple’s big push with making Lion and the pro apps exclusive to the App Store has guaranteed this. Since Apple now considers the App Store such an integral part of the Mac platform, they can’t simply pretend that the other stakeholders in this ecosystem don’t exist.

Furthermore, the necessity of requesting entitlements from the App Store curators for basic things like Open/Save dialogs has got me slightly queasy. Until now, I’ve always thought of the Mac as a platform that has enabled me to excel as a developer and make a living. I’m extremely grateful to Apple for building Mac OS X into such a great software environment.

Yet now I feel worried to even speak up about this. If someone at Apple decided they didn’t like me, they can soon take away my ability to show file dialogs. I know I’m just being paranoid… But that’s how people start to behave in situations where they feel they don’t have any power over what’s being done to them.

Is this a shadow of what it felt like to be a sharecropper? I’m reminded of this 3-year old blog post by Tim Bray:

“I don’t want to write code for a platform where there’s someone else who gets to decide whether I get to play and what I’m allowed to sell, and who can flip my you’re-out-of-business-switch any time it furthers their business goals.”

Posted in Business stuff, Mac-related | 119 Comments

Canvas smartphone support hits 100%, video slightly behind

Microsoft has finally given a date for the release of Windows Phone 7.5, also known as Mango. The update will start rolling out “in the next week or two”, depending on operator and hardware vendor processes. Hopefully it won’t be long until all Windows Phone 7 devices have been updated to Mango.

Windows Phone 7 is a fluid and appealing operating system, but that’s not why I’m posting about it. Mango’s release is significant for web developers because it includes Internet Explorer 9 and hence substantial improvements to HTML5 compatibility.

This calls for celebration: with Mango joining the fray, all currently shipping smartphone operating systems now have support for the <canvas> element! This means you can design animations in Radi using Canvas and deploy on mobile without worrying about missing API support.

The complete list of mobile platforms with Canvas support is as follows:

  • Apple iOS
  • Google Android
  • RIM BlackBerry (since OS 6)
  • Opera Mobile + Mini
  • HP webOS
  • Samsung Bada
  • Nokia Symbian (since Anna release)
  • Microsoft Windows Phone 7 (since Mango release)

I’m hoping to do some performance testing with Canvas on the latest mobile platforms to support it, Symbian ‘Anna’ and Windows Phone 7 ‘Mango’. Stay tuned…

The situation with the <video> element, also part of HTML5, looks nearly as good. Mango has added support, and it should be able to leverage the H.264 video decoding acceleration available on all Windows Phone 7 devices for smooth playback with minimum impact on battery life. (Of course iOS and Android already do this, AFAIK, but it’s great that Microsoft offers the same level of functionality.)

Unfortunately Symbian still doesn’t support <video>, even though the recent ‘Anna’ update did a pretty good job of modernizing the browser otherwise.

(As an aside, Nokia’s decision to fork WebKit back in 2005 was a pretty bone-headed move. The resulting Nokia S60 browser was decent for the time, but quickly fell behind as Apple and Google rapidly pushed the mobile browsing state of the art forward. Nokia was stuck maintaining their own messy branch at a snail’s pace while upstream WebKit zipped ahead. The Symbian browser is still catching up from this mess. Unfortunately this was only the tip of the iceberg of Nokia’s broken software development processes… I’m glad they finally saw the writing on the wall, gave up and switched to Windows Phone 7. Well, I digress.)

There is another Symbian update coming shortly. The codename is Belle, and it will ship on a handful of mid-range devices within the next month or two. (The update will later become available for earlier Nokia Symbian devices back to the N8.)

I couldn’t any info yet about whether Belle supports <video> or not… But hopefully there will soon be another virtual-champagne-popping post on this blog, as I celebrate 100% support for <video> on smartphones.

Posted in Web | Leave a comment

Why Radi uses Canvas – comparing CSS-based animation and immediate rendering

The market for HTML5 design apps has heated up lately. The number one question that I now get asked about my Radi application is: How does it compare to Edge and Hype? Isn’t it the same kind of app? On the surface that is the case – all three are animation tools that target the modern web. But there are important differences under the hood. Although the apps look similar, they answer a different need and have a different growth path going forward.

Comparing Radi to Edge and Hype is pretty much “apples to oranges”, as the old saying goes. Fruits are not a very informative analogy, though. For a more useful comparison, we could think of these apps as akin to musical instruments: if Edge and Hype are the electric guitar, then Radi is the software synthesizer. Unless you’re a genre purist, neither kind of instrument is objectively “better”. Either can be used to create a brain-wrecking cover version of Stairway to Heaven, but that doesn’t mean they are inherently flawed instruments…

For more sophisticated uses, the guitar and the synthesizer are more likely to complement rather than overlap each other, and so there are many individuals and creative groups that will want to use both together for the best effect. In this post, I’ll try to explain how the difference between Radi and other HTML5 apps, and how they can complement each other. I’ve got some simple content examples to illustrate things. (I’m also planning to write a second part that will concentrate on Canvas performance and WebGL, so stay tuned for more.)

First, a brief overview of the apps under discussion. My own Radi is at radiapp.com; check out the details there. Edge is a new application by the world’s most venerable content creation software company, Adobe. It is available as a free preview from Adobe Labs, and is also cross-platform (Mac + Windows). Hype is also a new application, but Mac-only. It’s created by Tumult, a company founded by two ex-Apple software engineers (who clearly know the Mac better than their own pockets).

As mentioned, Edge is free for now, but it stands to reason that it will eventually be included in Adobe’s Creative Suite because it’s clearly meant to complement Adobe’s other products rather than stand on its own. (For example, it seems unlikely that Edge will ever have vector drawing tools, with Adobe preferring instead to leave that task to Illustrator). Meanwhile Hype is available on the Mac App Store for $29. This is a limited-time offer upon its first release, which presumably means that Hype will cost more in the future.

Moving divs – how CSS-based animation works

Both Hype and Edge are CSS-based animation tools. This means that everything that is to be animated must be represented as style properties on actual HTML elements. When you create a layout (called a “stage” in Edge or a “scene” in Hype), the layers that you see in the app are directly equivalent to <div> elements on a web page. When your layout is eventually published and loaded into a browser, a piece of JavaScript code is included which takes care of the actual animation. At each frame, this program modifies the div elements’ style properties to reproduce the animation that you designed on the timeline.

This kind of CSS animation represents one extreme of the web animation spectrum: you’re using the full browser engine to move things around, with complete access to the layout and styling capabilities provided by the browser. Hence we could also call this “DOM animation”, as it uses the browser’s Document Object Model (DOM) to represent the objects to be animated – in other words, everything that moves must be accessible through the DOM.

This kind of animation on a web page is not a new idea in itself. DOM animation has been possible since Netscape 4, all the way back in 1996. What’s new right now is that the number of CSS properties supported by browsers in the real world has significantly increased in recent years. Whereas the old browsers were pretty much limited to moving elements around, changing fonts and making stuff visible or completely hidden, modern browsers can apply many kinds of more discreet transformations and visual tricks to elements: rotation, alpha blending, gradients, text shadows… Armed with this “CSS3” toolset of properties, it’s finally possible to animate elements freely within a web page.

(In addition to Edge and Hype, there are a few more horses in the CSS-based animation race. Sencha Animator is a competent-looking alternative. It’s a Mac desktop app but with an interface that’s built entirely using web technologies, so it doesn’t really feel native. Sencha has said that price of Animator will be in the “low hundreds of dollars”, so it will likely be more expensive than Hype but cheaper than Adobe Creative Suite. There are also some web-based options like Edit Room – I haven’t tried it, so I can’t tell you anything more about it. A few other web apps have been announced, but are not yet available.)

Painting primitives – how canvas-based animation works

On the spectrum of web animation, modifying the DOM is one extreme. The other extreme is to use the <canvas> element for animation. This element represents a single drawing space that occupies a fixed rectangular area on the web page. It’s actually a lot like the familiar <img> element (which represents a still picture), but for one crucial difference: you can – and in fact must – draw the contents of the canvas element yourself using JavaScript; by default, it’s merely full of empty pixels.

Although <canvas> has only recently become a de-facto web standard in the sense of being widely supported by all major browsers (Internet Explorer added support in version 9 this year), it’s been available since 2005. The original specification and implementation of <canvas> were created by Apple. The Canvas API was first included in Mac OS X 10.4 where it was offered as the method that Dashboard widgets could use to draw their contents. Subsequently it was incorporated into Apple’s Safari browser – and not without a fair amount of protest from friends of web standards, who saw the addition of <canvas> as an example that Apple is following Netscape’s and Microsoft’s lead of adding their own incompatible extensions to HTML.

Luckily, Canvas didn’t end up in that <blink>ing graveyard of forgotten misguided proprietary extensions… The main reason is that it’s a really useful element. It provides the precise pixel-manipulation functionality that nothing else in HTML can provide, but which many have tried to approximate by using arrays of 1-pixel divs and other awkward concoctions. Canvas also offers a reasonable set of modern vector graphics capabilities – Bézier curves, antialiased fills, gradients, clipping paths, basic compositing modes. The Canvas JavaScript API is very small and easy to learn, with few gotchas or weird combinations of properties that might lead to unexpected results. Lastly, Canvas maps nicely to the 2D graphics capabilities offered by current operating systems, so it’s easy for browser vendors to implement. (The fact that Canvas maps directly to OS primitives is no surprise considering the origin of Canvas as a feature-enabler technology in Apple’s operating system.)

So, how does one render animation using Canvas? The principle is simple: when something interesting happens on your web page, a piece of JavaScript code must access the canvas element and draw the new stuff in it. This “something interesting” can either be an UI event, for example in the case of a paint program where the canvas is updated every time the user moves the cursor, or it can be a timer event. To create a canvas-based animation that renders at 24 frames per second, we can simply create a regular timer that is called every 1/24th of a second, and perform the update in that timer’s callback.

What Radi does in Canvas

As the above description of canvas-based animation implies, it’s quite low-level. The browser doesn’t really do anything to help out your web page to get those pixels moving; the JavaScript code on the web page must model everything it needs to update its animation.

This is where Radi comes in. It provides a readymade framework of elements that can be rendered using Canvas and animated from one frame to another. The user interface in Radi allows you to build up the contents of the canvas from layers with graphical manipulation and drawing tools, and animate their properties with keyframes and curves. For a lot of things that you might want to do with Canvas, this is much more fun than having to write out the code in JavaScript. (Ever tried drawing vector shapes in Canvas by writing out coordinates in raw JavaScript code? It’s ridiculously painful for anything more complicated than a triangle.)

However, Radi doesn’t limit you to only using its own framework of layers. You can also create Canvas Script layers in Radi, and these have full reign over the canvas element in which they’re being drawn. Want to draw some particles? Maybe erase a part of a vector shape on a layer below? Do some pixel manipulation? A Script layer in Radi can do all of these things using regular JavaScript code – it’s standard Canvas, there are no special APIs to learn.

For this reason, Radi is also a development environment rather than just an animation tool. You can combine both visual manipulation and custom algorithms to get the best of both worlds.

(I’ve only talked about using canvas elements in Radi, so it’s worth mentioning that Radi is not limited to just Canvas. It also has full support for producing videos, and this goes beyond what other web tools can do. The same layers that you use in a canvas element can be placed in a <video> element, and Radi will seamlessly render the content into a video file instead. Additionally, Radi has a very limited form of DOM animation known as ‘element behaviors’. It’s meant for interactive situations rather than timeline animation. Currently you can only use this to animate the opacity of elements, but in the future the feature will hopefully accommodate more of CSS3’s possibilities.)

SVG, the hulking standard that falls between DOM and Canvas

With DOM at one end of the web animation spectrum and Canvas at the other, there remains a third option in the middle. SVG, Standard Vector Graphics, is a technology that aims to be the HTML for vector graphics – a standard markup language for representing vector images and other types of graphical content that HTML intentionally doesn’t handle.

SVG’s development started back in 1999, and is directly based on an earlier effort called VML by Microsoft (in fact VML is still supported in Internet Explorer). It is visually and conceptually similar to HTML. It uses similar tags and attributes. Like HTML, SVG doesn’t directly contain a full programming language, but instead relies on declarations for representing dynamic content.

Hence the way to create animation in SVG is very different from Canvas. You don’t just pop up when something interesting happens and draw whatever you want in an SVG image. Instead, the SVG standard expects you to declare your animation using the tags and properties provided by the standard. For example, if you have a shape that needs to move across the screen in 2 seconds, you must tell the SVG engine that beforehand. The SVG engine will retain your animation declaration and will perform the display updates “behind the scenes”, without any direct influence from your code.

A terminology intermission: retained vs. immediate

This example is a convenient opportunity to discuss two words that often pop up when discussing animation frameworks, “retained” and “immediate”. The SVG engine uses a retained model. Once you give it the SVG code that declares the shapes and the animations, the engine is like a bus driver with a route: it knows where it’s going and doesn’t need your input.

On the other hand, the Canvas drawing model described earlier is a perfect example of immediate rendering. The canvas element is just a “dumb” bunch of pixels; it doesn’t do anything on its own (except ensure that the pixels stay visible if the browser window gets redrawn). To draw something, you must actively do it yourself. As your code uses the Canvas API to draw, the results are applied immediately into the pixels in the canvas – hence the name “immediate rendering”.

This split between two approaches is essentially as old as computer graphics itself. Immediate rendering is where it all started. As computers gained more memory capacity and processing power, a retained graphics model became attractive. It seems like a good idea to let the graphics framework handle things automatically as much as possible, instead of being actively prodded by the user’s code.

Despite the theoretical advantages, retained graphics hasn’t exactly been a triumph in the real world. The big problem is that the graphics framework needs to be designed so well that it can accommodate whatever needs the user code may have. As graphics tends to be a field where everyone is looking for a “hot new thing”, anticipating needs hasn’t been easy. If the retained framework doesn’t support the kind of rendering you need to do, it can have a huge performance impact or may even prevent you from rendering your graphics altogether.

A poignant example of a failed retained graphics framework is the original Direct3D. This GPU rendering framework by Microsoft has been a tremendous success, with many top game titles being designed exclusively to take advantage of Direct3D, but it didn’t start out that way. The original version of Direct3D, back in 1995, used a retained model that turned out to be a major impediment for game developers trying to take advantage of new graphics accelerators. In version 3.0, Direct3D moved to an immediate model that gave more control to game developers, and the retained model was deprecated. (The competing GPU framework, OpenGL, had used immediate rendering from the start.) The retained model that Microsoft had perceived as an advantage of Direct3D turned out to be a flawed design because the field evolved so rapidly.

In my opinion, SVG suffers from a similar fundamental design problem. In many ways it’s a kitchen-sink API from an era when XML was thought to be the answer to everything… But because SVG is not the topic at hand (as it’s not used by either Edge or Hype currently), I won’t dwell more on its design in this post. Instead, I’d like to discuss what I perceive as problems with the DOM animation model.

The weakness of DOM animation

It’s clear to see why CSS-based animation is so popular amongst tool developers. It’s conceptually simple. It’s straightforward and clean to implement, because the native engine in the web browser handles all the messy details of how elements interact. It’s also optimized, because browser vendors have put a lot of work into making sure that elements are rendered as quickly as possible.

One could also argue that CSS animation is “native to the web” because it deals with the basic elements of a web page. A bunch of <div> elements is as standard as you can get, right…? But in my opinion, that’s where CSS animation goes wrong. The problem is that div elements already had an established meaning in HTML, and now they are being used for a purpose that has nothing to do with the original intent.

Consider the Adobe Edge demos that look like motion graphics. Each moving element is a div. What happens if you view these demos in a browser that doesn’t support the necessary CSS and JavaScript features? Instead of an animation, you get a pile of disjointed elements, laid out one after each other on a web page. The elements are being displayed by the browser in a way that is in accordance with the original meaning of <div>, yet has nothing to with the intention of the designer who was making an animation.

When something is expressed in HTML elements, there is a built-in expectation of graceful degradation: the user should be able to access the content even if his/her browser doesn’t support specific non-HTML features (e.g. CSS properties) that the designer of the page had in mind. Using CSS and JavaScript to turn divs into motion graphics fails this test.

“I’m sorry Dave, you can’t do that.”

DOM animation also has all the limitations of retained graphics, as discussed above. This is perhaps even aggravated by the somewhat haphazard way that CSS has evolved towards animation. If something is not directly available as a CSS property, it’s usually not possible. Traditional retained graphics systems try to prepare for this problem by providing a design of generic concepts that can be repurposed and combined to produce results that the framework’s designers could not have anticipated, but this is not the case in CSS: there are few features available as style properties that could provide this kind of generic functionality. (The CSS3 transform matrix property is probably the closest thing, since it can be used to create transforms outside the straightforward scale/rotate/translate ones.)

With CSS3 being capable of so much already, is this such a big problem? I feel that it is. The following is an example of an animation created in Radi that is trivial to render in Canvas, yet essentially impossible to duplicate using DOM animation:

(Please excuse the lack of artistry; I produced this animation as a tutorial example, and it acutely reminded me of why I’m a programmer instead of an animator…)

In the above example, one big and obvious feature that can’t be accomplished with divs is masking. The bird consists of several shapes that are being masked by a circle. At the end of the animation, the circle expands to reveal more layers. (In Radi, this animated circle is a clipping layer.)

There could be an extension to CSS to allow masking. Indeed, WebKit has acquired an extension that does something along those lines. But will it ever be supported by any other browsers? And if a masking CSS property were available, would it be possible to mask several elements using the same mask?

How about animated vector content? In my example, the mask’s edge stays sharp even as the circle expands. I don’t see any reasonable way to extend CSS so that this could be accomplished with just a styled <div> element.

Another big feature of Canvas that’s not set to be available in CSS any time soon is blending modes. To be fair, Canvas doesn’t really excel in this department: of the dozen modes available, only a few are really useful. (Too many of the “compositing operations” in the Canvas API are theoretically derived with few practical uses and definitions that are much too complex to remember. For example ‘destination-atop’: how often does one need to render a layer’s content outside the transparency of the content already in the canvas, while also clearing the canvas where the layer is transparent…?)

Still, Canvas has the ‘lighter’ compositing operation, which is basically the equivalent of Photoshop’s Screen blending mode. This alone is way better than what the DOM provides, which is basically “use normal blending, or go home”. (For an example of what you can do with this type of blending, check out Silk which uses blending in a Canvas to render some amazing generative shapes.)

Poking pixels

Masks and blending modes could be added to CSS in some way, and SVG also supports them, so these capabilities are not exclusive to Canvas. However there is something in Canvas that the other types of rendering fundamentally cannot support: getting and setting actual pixel values.

Here is an example. It’s the same Radi-produced animation as above, but a script has been added that processes part of the canvas into greyscale:

This was accomplished in Radi by adding a Script layer at the top of the Canvas:

What this script does is to read a part of the Canvas as pixel data, calculate new pixel values, and write it back. This is effectively like an adjustment layer, but written in custom code.

This program is small enough to fit into a screenshot of Radi’s Script Editor:

Adding this kind of low-level capabilities to CSS or SVG seems extremely improbable at present. The way to approach it would probably be through a separate programming language for processing pixels; this type of special rendering programs are usually known as “shaders”. (They are common on GPUs, where they get executed in hardware. Adobe Flash also includes a CPU-executed shader language known as Pixel Bender.) This could be a nice feature, but realistically, how soon could we expect browsers to support a common shading language in CSS – maybe by 2025…?

Small API, small worries

Compared to SVG and CSS3 (which usually needs to be extended by browser-specific extensions), Canvas has one more huge advantage: it’s small and orthogonal.

Orthogonal means that there are not dozens of ways to accomplish the same thing. Small means that the API that browser vendors need to implement has as few public entry points as possible. This greatly reduces the possibility of incompatible rendering from one browser to another, which has been the plague of CSS and SVG since day zero.

The risk of the API getting fractured is very real. For a while, it seemed that Microsoft’s IE9 would ship with an incompatible implementation of Canvas (see this MSDN blog post, issues 2 and 3). Happily Microsoft was able to resolve these problems before the release, and IE9 shipped with a <canvas> that renders just like other browsers. This happened largely thanks to the small size of the Canvas API. If it instead were a humongous spec like SVG, there would be dozens of missing or half-broken features in every browser, and Microsoft would not have felt a similar pressure to ship with a 100% implementation. Small is good because it makes the omissions really stand out.

Like Goldilocks’ porridge, Canvas is not “too hot” with complicated features or “too cold” with theoretical purity — it is “just right” for the web. A nice indication of this is that the entire API fits on a single printable sheet that you can put up on the wall: Canvas Cheat Sheet by Jacob Seidelin.

What next

What about Canvas performance — does it need to suck on mobile? How about 3D rendering? I hope to cover these topics in an upcoming post.

Want to learn more about Radi? Check out the website and the documentation (the latter very much a work in progress…)

I’ve been making frequent updates to Radi lately. The best way to keep up with the progress is to sign up for the Radi email list – you can do it here.

Posted in Animation, Mac-related, Web | 1 Comment

The Ten Abominations

A site called Test Your Vocabulary was a small hit on Hacker News today. The test takes only a few minutes, and you get an estimate of the breadth of your English vocabulary as the approximate number of words you know. In other words, it’s the perfect Sunday entertainment for all of us who get strange kicks from having our intellectual capacity rated and quantified…

The site got me thinking about the last time when I encountered an English word that was completely unknown to me. This was a few days ago; the word was contumacy, and it appeared in a particularly famous telex written by George Kennan. An online search revealed that ‘contumacy’ is the stubborn refusal to obey orders, and more specifically refers to contempt of court in modern English-speaking law practice.

Well, nothing particularly interesting there. But thanks to the wonders of hypertext, the word led me to discover the Ten Abominations, of which contumacy is one. These Abominations are a list of offences that were considered most serious under traditional Chinese law. They were regarded as the most abhorrent and hence necessitated the gravest penalties, even including the omission of some legal processes that were otherwise given to an accused. The list of abominations derived mostly from the writings of Confucius and even older archaic Chinese tradition. For over two thousand years of Imperial rule, the Ten Abominations were recognized as a moral baseline for justice, not unlike the role of the Ten Commandments in Judeo-Christian tradition.

What’s striking about the Ten Abominations is how precisely described and entirely non-abstract these offenses are. The ancient Chinese certainly didn’t practice relativistic handwaving when it came to morals. Specifically listed offences include damaging royal palaces, murdering government officials, having fun during grief periods, and having a sexual affair with one’s grandfather’s concubine… At least you can’t say you weren’t warned if grandpa catches up.

If the Ten Abominations were rewritten as “commandments”, it seems to me that they would come down to a mere three:

  • Don’t rise against the crown. (Abominations 1, 2, 3, 6 and 9)
  • Don’t rise against your family. (Abominations 4, 7, 8 and 10)
  • Don’t be a serial killer or a witch. (Abomination 5)

I’m quite fond of Abomination #5. It’s like a tossing bin for sins that are undoubtedly really big, yet don’t quite disrupt the Confucian order of unwavering respect for authority and elders, so they don’t deserve an abomination of their own:

Depravity (曰不道): to murder three or more innocent people; to disembowel a victim’s body after committing a murder; to produce gu and use it to cast curses.

One must deduce that murdering two innocent people is not an abomination – unless of course those people were your elder relatives or superiors, in which case it counts as contumacy or unrighteousness.

The Abominations may strike us as ridiculously archaic and imprecise in their specificity. That’s because we are so used to the notion of axiomatic law: the more fundamental and unchanging a law, the more abstract it should be. This applies to both institutional law – the American Constitution being the canonical example – but equally to the laws of science. Newton’s law of gravitation is so important in science history because it’s simple yet universally applicable. Before Newton, there had been other attempt to formulate the laws of gravity. But those attempts by Ptolemy and other classical Greek thinkers ended up being more akin to the Ten Abominations of gravity: a list of special cases that actually managed to explain the movements of planets pretty well, but lacked the elegance and consistence of an axiomatic solution.

Because my blog has an implicit programming bent, I need to end this with a coding analogy, so here it comes. Think of the program or system you’re working on. Its operation is determined by a set of laws that are intrinsic (your code) or extrinsic (the APIs you link to, for example). Working on the system, you must evolve the system within the existing laws, while usually also trying to “meta-develop” the laws themselves – for example by codifying shared modules into clearly defined frameworks, or even modifying the programming language you’re using.

Is your system more like Chinese traditional law, with your code’s primary aim being to work around a mysterious set of possibly contradictory “abominations” that are taken as given? Or is your system more like the laws of physics, with a set of axiomatic principles from which everything is derived? I think the Haskell and Lisp guys would confidently put themselves under the latter banner. For the rest of us, it’s probably somewhere in the grey area in-between.

(Out of curiosity, I tried to see what Google’s image search would come up with for the Ten Abominations. Here’s the closest thing I got, and I’d like to share it for your pictorial entertainment: Ugly Chinese Cakes.)

Posted in Uncategorized | Leave a comment

Radi updated to v0.6

I’ve just updated my Radi application to version 0.6. It’s still a free download.

If you’re interested in the possibilities of HTML5 content creation, give it a try!

There’s a bunch of interesting new stuff in this release — anchor points, keyframing improvements, publish for HTML embedding, a new popup help system, among others — so I figured the version number should be bumped to 0.6.

For more details, check out the release notes: What’s new in Radi 0.6 (…Now with 80% more screenshots of new features!)

I’m hoping to increase the release pace from now on. The 4-month lag between this release and the last was too long. I’ll try to concentrate primarily on bug fixes and manageable, incremental feature updates. If you have any ideas about what you’d like to see in Radi, don’t hesitate to contact me (my email is in the About page).

Posted in Uncategorized | Leave a comment

On Naming Things, and the CEO-Programmer

I started this blog a few months back, but it didn’t have a title except for Pauli Olavi Ojala’s Notes. I’ve discovered that the lack of a title makes it extremely difficult for me to come up with things to write. In a way the title represents the audience, and the lack of a title makes it painfully obvious that I don’t really know whom I’m writing for.

Hence I’m renaming this blog to Naming Things. This title is directly borrowed from my favorite programming-related saying. It was coined by Phil Karlton, and slightly paraphrased it goes like this:

“The only real difficulties in programming are cache invalidation and naming things.”

(At Netscape Communications, Phil held the title of Principal Curmudgeon. He clearly took his advice about the importance of naming to heart.)

The wording of this aphorism is such that it remains utterly impenetrable to non-programmers. The concept of ‘cache invalidation’ and its applications and challenges are not part of most people’s daily experience, and perhaps that’s all for the best… Yet I feel there is a kernel of wisdom here that could benefit a wide range of disciplines outside of computer science. Programmers have accumulated tremendous practical experience in dealing with complexity and information flows using only the sticky, slow-but-wide tools of a single human brain. There are many fields where these lessons could be applied if they were translated to a more generic language.

Let’s take an example from the global shadow society of large enterprises. In a company of more than a hundred thousand employees and thousands of projects, how can a CEO hope to stay on top of the big picture, much less shape it?

If the CEO viewed herself as a programmer, she could take solace in the ‘caching and naming’ adage: relentlessly work on these two things, and the risk of failure is already diminished.

Caching is all about information locality. Invalidation means explicitly considering and developing the signals and data flows that are necessary to keep the cached information sufficiently fresh. This has an immediate meaning for the CEO. She can’t hope to read everything produced by everyone in the organization. She can’t even access most of it because she doesn’t know what to look for. Thus each organization creates its own forms of caches. The ‘executive summary’ – a purposefully glanceable one-page memo – is a well-known method of enterprise information caching.

But caches aren’t just documents and databases. For the CEO, her most important cache is probably the vice presidents that report to her. These human caches are valuable because they have solved the invalidation part of caching – each vice president makes an effort to stay current; in other words, has developed a personal mechanism for keeping his information cache fresh. Of course the challenges of caching don’t end at the VP level. Both information and the associated metasignals must consistently flow through the organization, because a weak link will spoil the caches in all the layers above it.

This is where the second part, naming things, comes in. An organization can’t deal with raw data. It needs to be refined into information and signals that furthermore need to be able to withstand organizational noise and other obscuring factors. This requires a language suitable for talking about the data at various levels of abstraction. These levels are required so that the essential parts of the information may remain even when lower-level data is peeled away as the information is translated in and out of personal caches in the organization hierarchy.

In most enterprises, things are named based on two external factors. First is the customer’s language. A successful company is constantly talking with its customers, and it’s only natural that things within the organization tend to be named after things in the customer’s organization. The other ever-popular external factor is fashion. Every couple of years, someone writes a popular book or does a round of inspirational seminars that end up breeding new language in enterprises. (I’m sure you’ve heard words like ‘disruption’ and ‘agility’ once or twice in recent years.)

There is a huge risk with adopting external language: it may render the organization unable to actively review and develop its own nomenclature. A successful company can’t be molded as the mirror image of its customers, for it risks becoming unable to seek out new customers and eventually drowning with the old customer as a new wave comes in. The language used within the organization should be on a level of abstraction that’s one higher.

And here is the pitfall of adopting fashionable language: it may seem like a solution for achieving abstraction, but it’s not suitable for naming things because it tends to lack nouns. Words like ‘disruptive’ and ‘agile’ are adjectives. If a VP uses them in a powerpoint, she’s not naming anything and hence not talking about anything real within the organization. The programming-inspired CEO who obeys Karlton’s maxim will insist that her caches are not polluted with empty language.

Coming up with names is hard, and adapting them over time is even harder. Most programmers are familiar with the frustration of seeing poorly-named classes sprawling in an object-oriented software project’s class hierarchy. Initial naming decisions can eventually be rendered incorrect by increased requirements or complexity, but refactoring these poorly-bounded things into new kinds of things is usually a challenge and may be hard to justify in face of ‘actual work’. Often the only way to get this ‘actual work’ done is to pile on more bad nouns. A software project that’s littered with too many SomethingControllers, TheOtherStuffManagers and VagueAbstractBuilders is like a company with too much middle-management: these opaque work-translating layers have a tendency to ingrain themselves into the structure of things where they should have no role, making it extremely difficult to tear them out.

Some in computer science feel that this represents a fundamental failing of object-oriented programming. They advocate avoiding nouns and preferring verbs instead. This is sensible advice when applied in moderation, but we can’t get rid of nouns altogether. Verbs don’t allow for adaptation and progressive iteration of concepts, as they are too stuck in the immediacy of the present action. Think of how we imagine cavemen talking: “Hunt. Kill. Eat. Now sleep” –  it’s nearly all verbs. Sophisticated names are the building blocks of intelligence and progress. Getting rid of nouns would be throwing out the baby of civilization because the bathwater has got stale from jargon.
It’s tempting to continue this hacking-the-enterprise analogy further. (For example, could we apply the Model-View-Controller paradigm to a company? Would salespeople perhaps be the externally presented ‘View’ in this structure? Does that mean we could apply some user interface concepts to sales?)

But too many throwabout analogies will wear you down, dear reader, so I stop here. Next time, I hope to write something about naming an ideology and an empire – who gets to pick the name when the choice is between the familiar and the foreign?

 

(By the way, are you wondering about the status of my Radi HTML5 animation app? It’s been a few months since the last beta release, but I haven’t stopped work on Radi – far from it. I simply haven’t found the time to complete another release since I was on vacation and have been swamped with other projects.

I hope to return to Radi soon. There’s a couple of features and fixes in the pipeline, and I’ve got plans to write a manual and make some help available directly in the app. If you have ideas about what you’d like to see in Radi, I’m all ears – you can find my contact info in the About page of this blog.)

Posted in Business stuff, Names | 2 Comments

The rich old couple and the adopted prodigy (a parable of a tech romance)

Have you seen the Hollywood romance-drama everyone’s talking about this weekend?

It’s about two rich middle-aged people, a man and a woman. He is a very successful business executive; respected, even feared, yet he’s convinced that behind his back, the kids at the office are constantly mocking his old-world thinking, his lack of charisma and modern people skills, his ’70s style suits and fake hair, his I-let-it-go-two-decades-ago physical appearance. Buying the Harley-Davidson a couple of years ago seems to have done little to improve his faded outlook of himself.

She is a very successful shoe designer. Having barely escaped from Stalinist Russia as a kid, she’s a tough lady who has seen it all. She got her business started by making practical rubber shoes in the rainy town where her family had settled, and over the years her company’s range has grown to cover everything from faux-Italian business loafers to crystal-encrusted bridal accessories. She even successfully managed closing down the factories in her home state and moving all production to China. Her wares are now sold everywhere in the world.

But lately things have taken a wrong turn. People just don’t seem very interested in her products anymore. She’s puzzled. It’s as if everyone’s feet had suddenly changed shape — what else can explain why they suddenly don’t want her shoes? It can’t be for lack of selection, for she’s got a hundred different kinds on the shelves.

The two of them met years ago when their businesses were competing for the lease of an important factory property. They hated each other on sight. She thought that he’s a bludgeoning, sweaty, bossy idiot who can’t dress. In his eyes, she had merely got lucky on a fad and had no understanding of real business outside of shoes. Well, at least that’s what they told themselves — to an outside observer, a different kind of chemistry was obvious even back then…

As it happens, they both have estranged kids. His daughter is an art prodigy. When she wanted to go to a design college, the father’s initial reaction was that it would be an expensive indulgence; an artsy ego-trip to nowhere; a futile evasion of her destiny as the inheritor of his business empire. But a few years down the road, she’s done extremely well. Her teachers love her work. She has received praise for her projects in esteemed foreign publications. Even her distracted father has begun to absent-mindedly notice that he may have been wrong about his daughter’s talents.

What about the kids of the shoe designer? At least it can’t be said that she hasn’t paid them enough attention, but unfortunately the outcome has been very much the opposite of the desired one. Her older daughter is a loner with little interest in people. She is obviously smart but doesn’t readily communicate. If she ever had passion for anything, it was for researching the hidden lives of Amazonian spiders, not managing shoe inventories and organizing spring-summer collections. Because it was seen as necessary, she has been in charge of running crucial parts of her mother’s business for a long time, but everyone knows that she has only barely managed to get the job done even with the extensive help of her mother’s experienced underlings.

The other child is an even stranger case. He’s only in his late teens, but has already changed his legal name a couple of times. He’s heavily into Japanese costume play, Indonesian cooking, and programming games on decommissioned mainframe computers. To cultivate his interests and keep him motivated, his mother has made sure that he has space to work at the shoe company’s premises. Truth to be told, even she has no idea how his slightly worrying hobbies relate to the family business… But to her employees and the board of directors, she keeps telling that he’s the best imaginable person to take over the business, and it will work out in the end because his sister will be there to complement him.

As the drama unfolds and Act One comes to a close, she is diagnosed with cancer. With only nine months left to live, she now faces the decision she has been avoiding for years: who can take over her ailing shoe empire? Can her children even get along, or is it time to call it quits before they destroy it?

She is painfully reminded of the time, not long ago, when she hired a renowned Norwegian designer. She had such high hopes that this respected elderly European would usher in a new direction for her company and her inheritors. The reality turned out more disappointing. True, the new designer did keep making excellent niche products that were eagerly bought by his existing customer base, but nothing of his staid genius rubbed off on the owner’s company. She had the patient Norwegian give weekly lessons on design and business to her kids, but they didn’t seem to understand much. The young son even insisted that selling shoes was the opposite of everything that “the open cosplay spirit” stands for. She had no idea what his son meant by that, but the message was clear: these kids were not interested in going where she needed them to go.

Even at this hour of despair, she’s not about to give up her yoga habit just because she has cancer and her business is going down the tubes. At the yoga club, she encounters a new but familiar face — and belly! — trying to bend into unlikely positions. It’s her old nemesis, the business executive! In his search for relevance, he has coincidentally joined the same yoga club where she has been going for years. Despite her initial dislike and mistrust, the two quickly grow closer. He seems to have changed somehow. He’s genuinely interested in her recommendations about training shoes and mats. By the end of the next class, they have a date for drinks.

Brought to unusual honesty by her illness, she tells him everything about her situation. She knows his reputation for crushing opponents and deceiving partners, but doesn’t care anymore. He listens with unusual restraint. Truthfully, he doesn’t even view the two of them as competitors anymore. The lease they fought over so many years ago is now forgotten, meaningless in a changed world. New companies have taken over the city. Those new competitors are different, harder to read and outmaneuver; they don’t even make and sell stuff in the same way as the two of them used to. His business has been safe for now, but he can see the clouds on the horizon — her present could be his future soon enough. But what could he offer her? A flash of inspiration comes over him and he interrupts her, saying: “Can I introduce you to my daughter? You might find her work interesting.”

The next day, they meet at the daughter’s college workspace. The shoe designer is taken aback by the quality of her work. It’s clearly by a student, lacking the meticulous, conservative detailing she would expect from her own designers… But there’s definitely something unique here, an austere quality, a conceptual clarity that she didn’t know could be applied to these products. She now realizes that the shoe is not just a scientifically derived foot-shaped object covered by an arbitrary layer of fashion ornamentation. Seeing the work of the business executive’s daughter, she realizes how much there is that she doesn’t understand about how the shoe relates to the person wearing it and how that person, in turn, is part of a society which provides the true context for the shoe. From this moment of insight, she now understands why her shoes aren’t desirable anymore: it’s precisely because she became so good at making shoes that her products became “just shoes”.

Fast forward to the end of Act Two. The business executive and shoe designer are ready to announce their marriage. The executive’s daughter will be appointed as the head of design for the shoe company. Her student work will provide the framework for the shoe company’s future products. The daughter now has unequivocal support from her father and his business experience at her side. The two of them seem closer than ever — you could finally think of them as family. For the first time in years, he actually seems happy.

Yet the daughter remains something of an enigma. She’s got model looks and a sparkling talent, but she’s had a sheltered life. Can she pull off the job that has been placed on her narrow shoulders? How well does she really get along with his father, who ignored her for so many years?

What about the shoe company? Not everyone is happy about this turn of events. The shoe designer’s two children don’t seem to care very much, but despite their eccentricities, the two had built up influential followings that hoped to benefit from their imminent rise to power. These cliques are not pleased by the arrival of a new guard. Others at the company are suspicious of these new, foreign ideas that don’t seem to be very much related to shoes. Many others are doubtful of the business executive’s motives — they feel that the old lady has fallen foolishly in love, leaving the company vulnerable to be eventually taken over by a man who only cares about money, not shoes.

What’s next? Tune in by Christmas 2011 for the unveiling of a brand new shoe collection…

(This story is my take on the Nokia/Microsoft alliance announced yesterday.)

Posted in Stories | Leave a comment

Day 1 for a $1 app on the Mac App Store

(A quick introduction to this new blog: my name is Pauli, I’m Finnish, and I make software. You can find out more on the About page. I started this blog today because I sort of promised that I would publish my App Store numbers. There’s already a blog for my company, but this stuff is not really relevant to the customers of that product. Hence, a new blog. I intend to use this blog as a personal soapbox that will probably deal with esoteric technical topics… Just like a million other programmers’ blogs out there.)

As you probably know, the Mac App Store launched yesterday. Like a prelude to Lion, the 10.6.6 update to the Mac operating system pushed the App Store icon onto the Docks of Mac users worldwide. There, glowing its cool blue light, the App Store icon patiently awaits your curious click, ready to siphon dollars from your iTunes account as you wander wide-eyed through the eye-candy store of a thousand apps and stumble upon impulse purchases too alluring to ignore.

That’s the theory, anyway. The mood in the Mac community before the launch seemed to be a mix of anticipation and anxiety. Most everyone agreed that the App Store would be a substantial usability improvement over how Mac OS X apps have been distributed for the past ten years — have you ever tried to explain disk image downloads to an average user whose only experience with files has probably been to keep everything on the Windows desktop?

On the other hand, there was widespread worry that the App Store would threaten the relatively high end-user prices that have allowed many Mac developers to make a living on the platform. When the iPhone App Store launched in mid-2008, there quickly began a race to the bottom that ended in a significant portion of apps costing $1 — while being worth even less. Would the Mac App Store suffer a similar price war and ensuing quality erosion?

I’m one of these potential bad guys because I published a $0.99 app on the Mac App Store. My app is called Turtledoveland; check out the Mac App Store product page for more details. It’s not the greatest or most useful app in the world, but I’d like to think it’s not the worst kind of $1 app either, because it’s an honest attempt at making something slightly unique.

I originally wrote the image generation code for this app back in 2002. Back then I sold it as a screensaver for a while, never selling more than a dozen copies. I think I charged something like $12 for the screensaver — whoa! Last year, I rediscovered the source code and ported it to the iPad (product page). When the Mac App Store was announced, it was not more than an evening’s work to backport it to Mac. I would have liked to publish it as a screensaver, but Apple has a strict rule against apps purchased from the Mac App Store installing anything in shared operating system locations… And that’s where a screensaver would need to go. So I made a standalone app instead.

(A bit of useless benchmark trivia: when I originally wrote this image generator, I had a PowerMac G4 with a 867 MHz processor. The iPad turned out to be roughly as fast at executing this code as my old PowerMac, and has a better graphics processor! Rationally I knew that the iPad beats a 10-year old workstation, but it’s still pretty amazing to see it in practice.)

Games excepted, there are not all that many $1 apps on the Mac App Store. In fact, the “Graphics & Design” category in which I decided to place my image-making app only had three of them yesterday when the store launched. (The other two $1 apps are an on-screen ruler and a painting program with less features than Windows 3.0 Paint.)

Presumably due to the dearth of cheap apps, my app got a position on the “Top Paid” chart in its category. Turtledoveland started out at #5 yesterday, and is currently at #7.

So what does that mean in terms of actual units sold? Here is the iTunes sales report from January 6:

Turtledoveland for Mac sales report

I’m pretty happy with this. It’s not a lot of money, of course — I’m getting about 40 euros after Apple has taken their cut. But for comparison, 77 units is more than the iPad version of this same app has sold over the past three months…

Even if this level of sales doesn’t keep up, I’m definitely motivated to publish more stuff on the Mac App Store in the future. My plan is certainly not to spam the App Store with $1 apps. For what it’s worth, the rules of the Mac App Store seem to have been designed to give Apple maximum leeway to reject apps they don’t want to have on the store. Therefore I’m optimistic that the Mac App Store will remain a good place to find Mac software. I’m also pretty sure that it will feature heavily in the marketing of Mac OS X 10.7 “Lion” when it ships later this year. The “MAS” is here to stay.

Posted in Business stuff, Mac-related | 5 Comments