Or, in other words.

The following is an imaginary dialog summarizing stuff that happened, in longer form, elsewhere.

Loren Brichter at @atebits: “Here’s Tweetie 2. Better, stronger, more beautiful. We decided to make it a separate app, rather than an upgrade, so if you want it you’ll have to pay $2.99 again.”

The Blogosphere: “Yea! But I feel cheated! I just paid for Tweetie 1! You know, you should really have an upgrade price. No! Even better: I know you can’t have upgrade pricing because Apple won’t let you to, so I propose having everyone pay $2 instead of $3, so everyone can get the update price!

Me: “And have Atebits lose one third of their profits? No.

Leave the first comment

Apple Store, Carosello (Carugate, Milano)

See and download the full gallery on posterous

Posted via email from ∞: whispers

Leave the first comment

In queue at Apple Store Carugate

>

>
>
>
>

>
>
>
>

>
>
>
>

>
>
>
>

>

Posted via email from ∞: whispers

Leave the first comment

What’s up with Mover (Early September ‘09 Edition).

Mover’s not perfect. Unfortunately. I’m a one-man band here, working all the time on other stuff. I do listen, though, to all mail and iTunes reviews and Twitter laments surrounding Mover.

Also, more interestingly for you, I act on what I read.

The following two things are currently in Apple’s hands:

  • Mover+ 2.0.3 is in review at Apple. It fixes the two most commonly reported crashes (contacts on all devices and images on iPod touch), introduces crash reporting and streamlines a few things in the engine. This comes out as soon as Apple says yes.
  • Mover (free) 1.0.3 includes new localizations and a limited amount of new features (for example, inline image and contact display). This also comes out as soon as Apple says it does.

After these, Mover+’s third release line (tentatively versioned as 2.1) will include the result of the Adequately Awesome Project™, an effort in replacing the core transmission part of Mover with a new protocol with lesser overhead. I announce it now, even though I have a policy of shutting up until done, because it’s working right now, although with stuff to iron out before shipping, in my development version. It will include progress reporting for large transfers and will be quite a bit faster for images and other large-content stuff.

This fixes the third most common complaint, transfer speed. AAP makes the transfer run as fast as it can possibly do. Of course, it also makes possible transfer of iPhone 3GS-shot video clips. That’s coming too. (I need to make the storage engine a little more intelligent and mindful of RAM and disk space before it can be done.)

The fourth most common complaint is a little trickier. It’s the “doesn’t show up arrows! doesn’t work” one. That’s harder because I have no idea what actually causes it — in fact, there are a ton of possible causes, and I strongly suspect most of the time it’s your network’s fault. (Bonjour can easily be hindered by firewalls or wireless access points that don’t route traffic the right way, by accident or choice). Still, I do see bizarre situations from time to time, and I’m working overtime to come up with theories and workarounds in my code. In that regard, Mover+ on the store is much better than free Mover, although the 1.0.3 update learns some tricks from its bigger brother.

Unfortunately, fighting adverse network conditions is a losing battle; but it’s one I will keep fighting.

That’s it for the future I will reveal. What comes next, it’s a secret that I’ll be happy to show you in due time.

4 comments so far, add yours

Apre Apple Store Milano Carugate (“Carosello”). Inaugurazione sab 5 settembre 2009 alle 10.

Io ci sarò certamente.

Posted via web from ∞: whispers

Leave the first comment

Oh wait I had a Posterous account.

Will use it more. Especially with all the crossposting goodness it seemed to get since I last sent an email to their post address. *wuv*

Posted via web from ∞: whispers

3 comments so far, add yours

Talk Like Warren Ellis

This page randomly generates a Warren Ellis-like greeting based on his tweets. All respect and credit for the words here should be given directly to him, we just thought it would be funny to do this. Please don’t destroy us, Mr. Ellis.

A Six-Sided Space Ninja Production by Scott Vandehey and Miles Johnson.
You can follow us on Twitter: @spaceninja and @sixsided.

Tee hee hee. TEE HEEE HEEE HEEE HEEE.

Posted via web from ∞: whispers

Leave the first comment

NO DUDE YOUR MEDIA CENTER APP IS WRONG

People, wake up! Your media center apps are wrong for me!

They want to bring computing power to the TV. In that, they succeed. But they make that power unavailable to me. Because they’re built wrong!

Apple TV? Built wrong!

Front Row? Built wrong!

Windows Media Center? Awesome! But built wrong!

XBMC, Boxee, Plex… wrong, wrong, wrong.

That’s because they all assume the user is willing to interact with his TV when it’s time to play stuff.

I tried an insane number of media center apps, hoping to find The One. And all this time I’ve been frustrated by the sorry state of consumer video playback on TV. None of them passes my main use case, which is as follows: After five to eight hours spent studying and working, I come back home, get into the living room, turn on the TV and get my sorry ass on the sofa, ready to shut down my brain. I don’t have enough mental strength to get anything but changing a channel on a remote.

Regular TV passes the test: content is right there to be seen and I don’t have to think about it. Except it’s not usually the content I want to look at: I want to see the latest anime on Crunchyroll or my fave podcast much more than I want to see bland, generic TV programming. TV wins on user experience and loses on content quality.

Media center apps surely have the stuff I want. And yet, they lose on user experience, because they INVARIABLY require me to dig into menus and/or organize stuff beforehand.

“NO, DUDE, I’M TOO TIRED. DO IT FOR ME.” goes my head as I throw myself on the sofa after eight hours spent doing something else.

And yet no one does. The computer can and should provide me with the programming I’ve signaled I want. I want to point it into the generic direction of stuff and have it figure out transparently what to do. App! Show me episodes of a series in order. Prepare an hour and an half of programming from what you have. Do not play silly anime back to back with gritty serials; pick by genre, pick stuff I haven’t seen in a while, put the highest-rated stuff first. I want TV channels that are and behave as iTunes smart playlists, except I don’t want to set ‘em up. And when I start you up, do not have me dig stuff and then hit play and then — just start playing right away, dammit! Me interacting with you is an exception, not something I want to do every time I want to play stuff.

I’ll be working on this space in my spare time, believe me.

8 comments so far, add yours

The Way I Do JavaScript.

I borrow from Objective-C. Duh.

No, don’t go away! I promise this post will be worth your time. I’ll be short.

Okay.

With that out of the way, I’ll just say this: I can’t wrap my head around prototype-based inheritance. That is: I can and I do understand it and I would be able to mentally resolve prototype chains easily, but the code is ugly.

Consider the canonical example:

Employee.prototype = new Person();

OMGWTFWHAT?

Why are all Employees referring to a single Person object, whose state is singular? (I know you can redefine state in the Employee objects and the prototype chain for that will work out in the Person methods, but come on!)

Also, how do you get to run the new Person() code in new Employee()? (Answer: you don’t. You have to outsource your constructor call to an initialize method for things to have sense.)

Oh, geeze.

So, what to do? An answer, my friend, is more gun factory methods. By skirting prototype inheritance entirely and using what in the Objective-C world we’d call “swizzling” and in Ruby is called “monkey patching”, not only we can mimic successfully canonical class-based inheritance, but we can even implement trickier stuff like traits. YAY!

Example. Let’s say you’re building a dice-rolling application for yet another certain mobile platform that takes HTML and CSS and JavaScript. RPGistas roll packs of dice of the same kind, where “kind” means “number of faces”: for example, 3d6 means that you roll three six-sided dice (the kind of dice you use in Monopoly — yes, it’s not the only one and the thing can become downright weird. But I disgress).

We want to model that using a class-ish kinda thing in JavaScript. Well, I make a factory method like this:

function Dice(numberOfDice, numberOfFacesPerDie) {
	return {
		roll: function() {
			var i, a = [];
			for (i = 0; i < numberOfDice; i++)
				a.push(Math.floor(Math.random()
				 	* numberOfFacesPerDie + 1));
				// mathematically fair!

			return a;
		},

		numberOfDice: function() { return numberOfDice; },
		numberOfFacesPerDie: function() { return numberOfFacesPerDie; }
	};
}

Ka-zing! Now a (Pythonesque) var threedeesix = Dice(3,6); gives us an object that rolls three six-sided dice when we do var result = threedeesix.roll();. Hurrah! Also note how we exploit the closure to avoid lots of this.’s for private state, also killing the this.numberOfDice = numberOfDice boilerplate code (we still need to define functions to expose this state to the outside world, though).

Two steps further: inheritance and super calls. How do we make an object just like a Dice, but that works differently? Some kind of, say, rigged pack o’ dice? Easy: we make a Dice-built object, then we monkey-patch it to suit us.

function RiggedDice(numberOfDice, numberOfFacesPerDie) {
	var self = Dice(numberOfDice, numberOfFacesPerDie);
	self.roll = function() {
		var i, a = [];
		for (i = 0; i < self.numberOfDice(); i++)
			a.push(self.numberOfFacesPerDie()); // all sixes!
	};

	var super_numberOfDice = self.numberOfDice;
	self.numberOfDice = function() {
		// not too many dice or we'll get caught
		// by the casino guards.
		var x = super_numberOfDice.apply(this);
		return (x < 3)? x : 3;
	};

	return self;
}

Double twistin’ ka-zing! Okay, the super part is not as clean as it could be but, hey, it’s there and it works! Note how this method is organized more or less like an Objective-C init method (down to the return self; at the end). Also note how this takes care of my constructor conundrum above. Also note how this circumvents the other limitation of new — that it must return one object and only one object, which is the one the system just gave us. Enter lots of Flyweight and (in Java) AbstractFactoryFactoryFactories and— well, you don’t have a need to do that anymore, because the “constructor” factory method can return whatever we frickin’ want (again, more or less like an Objective-C init method). We could’ve cached our rigged dice packs by numberOfFacesPerDie, and returned the cached ones rather than making new ones over and over again, for example.

Save the environment!

Ah! Traits! Traits! They’re trivial: just factor out the monkey patching code into a function all its own. For example:

function Comparable(object) {
	// assumes object.lessThan() is implemented:
	object.equalTo = function(x) {
		return !this.lessThan(x) && !x.lessThan(this);
	};
	object.greaterOrEqualTo = function(x) {
		return !this.lessThan(x);
	};
	object.greaterThan = function(x) {
		return object.greaterOrEqualTo(x) && !object.equalTo(x);
	};
	// ... and so on.
}

Ah, the fresh smell of code reuse in the morning. Just define your object, maybe implement that method or two that the trait requires, and a call like Comparable(object); will add the trait. Simple, conceptually clean, not needing any brain twist to understand. Just like coffee. Clean coffee. Not the greatest of metaphors, but you get the point. Not the coffee.

The obvious objection is, “why not skip all o’ this and use the Class or equivalent facility your framework of choice provides”? That I’d recommend, too, in most cases — but say you’re making generic code that must run on a variety of platforms, some of which bundle other frameworks that redefine the same symbols of your favorite one? (And yes, it has happened in real life.) This is 100% vanilla JavaScript. No framework required. And as simple and as powerful as it gets. Which I like.

And that’s all.

One comment so far, add another

Twenty thousand downloads in four days.

Looks like you like Mover.

What else to say?

Thank you.

One comment so far, add another