waffle

Waffle was a weblog that ran for nine years and five days from 2003 to 2012.
The last post has been written and comments will be closed by the end of March 2012.
The author of Waffle, some guy in Sweden, also occasionally writes stmts.net.

(If anything will ever succeed or revive Waffle, it will be announced in this location, and in the feeds.)

Swedish Parliamentary Elections 2010

Today is the Swedish general election 2010. It’s also the Pirate Party’s second parliamentary election ever.

Last year, we took 7.13% of the European Parliament vote (225 915 votes) and one seat. Since the Treaty of Lisbon passed and the seats were reallocated, we should have two seats, but apparently only the posts that aren’t directly electable by the unwashed masses need to be seated expediently.

In 2006, we took 0.63% of the Swedish Parliament vote (34 918 votes) and won no seats. The Pirate Party was formed on new year’s day this year, and the election, like this one, was in September. This is a decent ramp-up for a party started on election year.

In the Swedish Parliament, there’s a 4% country-wide entry threshold (or a yet-to-be-invoked 12% in a district). Just carrying every vote from last year’s European Parliamentary vote and assuming equal turnout as in the 2006 general election would put us just over that threshold. The threshold at 4% doesn’t mean that a party with 4% gets one seat; there are 349 seats, of which 39 are adjustment seats to make the distribution of seats conform closer to the shape of the results. The minimal number of seats varies with the exact outcome (consider the extreme 25 equal 4% parties outcome, along with possible mix-ins of 12% parties), but it seems that winning representation guarantees at least 4 seats.

I’m still unsure whether we have what it takes to win representation. I am confident that we will pass two milestones: 1% wins you sponsored distribution of your party ballots to every polling place (it’s still possible to write-in a party by name, but arranging party ballot distribution takes time and effort) and 2.5% wins you financial party support from the state.

The polls close in 20 minutes of this being written (20:00 local time, 18:00 UTC), but the Pirate Party is not one of the eight parties expected by the Election Authority to win seats, and won’t be broken out by name in the poll night count. We will have the exact number on this coming Wednesday.

Update: Although the Pirate Party isn’t tallied under its own name on election night, the “other parties” tally is tall enough at roughly 1.4% that it could still gather 1% of the votes. In the 2006 election, the extreme right party Sweden Democrats was big enough to be tallied separately in most pre-election polls. In 2006, the Pirate Party and several other parties were usually lumped under that choice by voters. Now in 2010, it seems they aren’t. It looks like the Sweden Democrats will win representation, and I am deeply saddened by the comparative strength of such a xenophobic party.

Andropause

It has been exhilarating to watch critic after critic get the state of Android machinery completely wrong.

Android is a breakthrough in mobile OSes relative to the ones that came before it. It is absolutely something that’s needed. Let’s look at the characteristics of the mobile OSes that came before it:

  • Real-time OSes, made to be able to perform certain tasks under pressure. Fundamentally good, but the backlash was that most phones ran on really poor chips.

  • OSes with a nonexistent, minimal (J2ME) or very stiff application API. Mobile applications worked great as long as they were simple and underperforming. I can name a handful of mobile applications that worked well. There were, even then, more target devices and interested users than iPhones and Android devices put together; there was a market for great applications, but no one was able to produce them.

  • Some OSes were produced with infinite variability across multiple manufacturers, multiple alternate versions of the same fundamental device, and a succession of these devices. You had one version for one phone for every two or three months. Some of these are patches. Some of these have new functionality, some of which actually depends on the capability and some which is just ifdefed out for segmentation purposes.

The identity crisis that the Android platform is going through right now boils down to something very simple: it is compelling to have one big, feature-rich, oft-revved, secure, full-tilt platform, managed by a large company and at least largely open to everyone.

If it sounds like a huge boon for customers, it’s because it is; ideally you can pick and choose from the devices that take full advantage of the latest revision whenever you want to buy, and you get to scoop up many new features over the lifetime of your device because the people who are implementing them are not directly interested in getting you onto the newest device.

The problem is that it isn’t a huge boon for device makers. It used to be, and it still is to a residual extent in that OSes were horrible before. When Android was started, it was the first serious major ground-up mobile OS in years, and from people who had already built a nichepoorly adopted platform where the ideas of cloud storage and apps had taken root. With the alternatives being what they were, and with the device makers being pants at if not creating then at least executing mobile OSes, they would have been forgiven for looking for the next bus to modernity.

But it’s not a huge boon right now. Look at HTC, one of few device makers that has consistently cared about the user experience, to the point of nearly making Windows Mobile Classic livable. HTC do their own thing with their own shell on pretty much every platform, including Android. Look at Samsung, which is taking the hard road building a new OS of its own, Bada, after some experience with Android (and nearly every other OS, it should be said). And look at everyone else, whose long development cycles and penchant for forking ensures that they won’t ship with the latest or second-to-latest release of Android.

The really valuable part of Android, the one that as far as I can tell is not surrounded by the controversy of the loosely-defined “genuine Android” stamp and the one that not only will live on to become its legacy but already is today is the bottom half. The open part. The one that device makers are as free to strip away as the rest of it, but choose not to because they’d hardly have a system anymore.

There’s a case for a line of full-stack Android phones. Google made a good model. But for the device makers, I think there’s no business in providing the scenario that would be the aforementioned boon to customers. This would sadden me deeply if it weren’t for one thing.

The existence of the half-stack Android option leaves it open for device makers to deliver their own take on the second half. Right now, device makers still mostly suck. Eventually, with any luck, the better makers will continue bubbling to the top in a self-perpetuating positive circle. It is true that the best user experience comes from designing the hardware and the software. It just so happens that the industry sucks at the software, but that there are device makers that are actually good at certain aspects of the software. They are given a chance with Android.

You can continue waiting forever for the day when everyone ships the latest versions of their fork of full-stack Android within a month of release. Google can’t force them to. They have some sway; they are squeezing fairly weakly in a dickish kind of way today, and the device makers decide (rightly) that it’s unacceptable. If success for Android is about every device being 2.2 the next quarter, they haven’t reached it. But Android is successful, today, if success is sneaking Android into many new interesting phones or tablets.

There’s another angle to this, and it involves carriers going beyond carriers to become stewards of the phone experience, something that they absolutely shouldn’t do, something that they can’t do well, something that they haven’t ever done a great job of, but something they seem to do anyway in a world where unsustainable growth without focus to please the stock market and inflate egos is somehow regarded as a good thing. This puts a wet towel over anything good with any device on their networks, ever, but just thinking about it makes me too depressed to consider writing about how it affects what I just talked about. I’m sure you won’t have any trouble imagining it.

setDrawsBackground, NSTextField and CALayers

Some of you might know that text rendered by a layer-backed NSTextField label (so, with Core Animation) on Mac OS X onto an alpha-transparent background (a layer with no direct opaque background, regardless of what that background may be, within the same layer) is drawn in a very peculiar way, a way which I will charitably characterize as “shitty”.

There’s a workaround! Like the set-up just described, and like people from the frameworks group at Apple describe, the path to sub-pixel antialiasing is to make sure you draw something behind the text so that it’s on an opaque background. (Having an opaque superlayer, no matter if that layer is of your own making or the backing layer of a containing view, does not fulfill this requirement.)

But you might come to a point where you do everything that everyone says and it won’t help. I did. I tried a variety of tricks, including setting the background color directly on the backing layer itself in code, and setting explicit background colors on every layer up the hierarchy. It just wouldn’t work.

So I tried reproducing it. Creating a new sample project, the effect of Apple’s tips was evident in the XIB in Interface Builder already. By toggling Draws Background, it toggled between the regular antialiasing and the variant even a non-discerning Windows Mobile 5 user with cataracts and gravel-filled goggles would find an affront to humanity. Weird.

I went back to the offending label in my original XIB and saw that the Draws Background checkbox was unchecked. I toggled it and set a color. I deselected the text field, then I selected it again. The Draws Background checkbox had reverted back to unchecked. I continued this, and it wouldn’t seemingly revert directly, but it was as if I hadn’t checked it at all. As soon as I reselected the text field, the truth was reiterated; “I do not want to draw a background”, it said, “and there’s nothing you can do about it”.

On a hunch, I dragged the well-behaved text field from the test project XIB to my original XIB, and it worked. It hadn’t picked up the amnesiac habit of its brethren, and it continued to not do so as I copied its attributed over one by one, and finally rewired the IBOutlet to point to the sane version.

Now, everything works. I have no idea what happened; maybe some sort of strange corruption in that XIB, some saving bug in an old version. Who knows? Anyway, this is how to fix it.

« Newer posts · Older posts »