Paperwork Hacks

22 June 2009 in notes

marco:

With iPhone OS 3.0, Apple introduced in-app purchasing. The idea is that applications can charge for additional functionality (or game levels), content subscriptions, or pay-per-use features.

There are two interesting caveats, though:

  1. An app can only offer in-app purchasing if the app isn’t free.

If you want to charge money for your app, you have to jump through a lot of paperwork-shaped hoops with Apple about tax and other very boring things. The same will obviously be the case for apps that want to offer in-app purchasing. But charging money for an app up-front is part of the iTunes Store process, and is hooked into your developer account. Using the ‘paid content download’ API is part of the developer tools, and is probably very hard to detect without using debugging tools, which aren’t part of the iTunes Store process.

This feels like a legal hack. It’s a short-term way to make sure that developers have done the paperwork required to collect money. Once the problem is solved properly, I’d expect this restriction to be relaxed. Maybe even you’ll be allowed to charge money for downloads if you have any paid-for app in the store, that might be easier to implement first.

I’m guessing that Apple got to shave a chunk of time off the release date of a feature by hacking their own license agreement system.

disqus comments  

Twitter timeline

19 June 2009 in notes
tagged with [twitter]

Yay twitter. You launch a small fun social chatter app. It falls over during WWDC, hillarity ensues. You gain an adorable downtime mascot! Next WWDC, you’re better, things stay up. Much handwaving happens about business models, never goes anywhere. Spammers arrive - you must be a real web service! Yay!

US elections happen! Major political parties use Twitter to do.. things. You start appearing in major newspapers. Every company suddenly has to have a Twitter account. Hardcore userbase grumble about how people aren’t using twitter ‘properly’, it’s just microblogging/broadcast. Noone notices them because their grumbles are buried under the firehose. You turn off some features, tweak others, there’s a little grumbling, noone actually stops using it. Future looking rosy! Though that might just be the burning servers.

Then the State Department asks you to move downtime to not clash with elections. Today, you’re a tool for Iranian propaganda.

Personal thoughts on this.

a. Twitter are a lot bigger and more important than I thought they were, apparently.

b. If I worked there, I’d be terrified.

disqus comments  

iPhone twitter clients and Push

17 June 2009 in notes

I guess iPhone push notifications might be annoying. But you can always turn them off. This isn’t what worries me.

The biggest problem with this Twitter/push thing is that we’re not going to get it for Twitter apps any time soon. Obviously, Twitter won’t do it natively, it’ll be left for third parties. So some third party will have to run a server that polls Twitter for your updates, and pushes them to your phone.

This will have scaling issues. The first person to launch this will get all the users (because shiny!!1), and their server will melt. Unless it’s huge.

They will have to charge money for this service. Probably monthly.

The leap from ‘I have written a pretty Twitter client’ to ‘I have to run infrastructure and bill monthly for it’ is huge. Push isn’t just a bullet point feature. It’s almost a harder problem than writing the iPhone app in the first place.

Also you’re now polling Twitter for all of your users all the time. and holding auth credentials for them on your central server. So

  • Twitter API usage lurches upwards again, because now this service is polling them every 5 mins for every user, and all these users are polling Twitter from their phones (unless the phone client is polling your server for updates, in which case now you have to scale for that as well. At least if the only thing you do is poll/push, it doesn’t matter if you fall over for 5 minutes. or indeed for an hour).

  • This third party server now has usernames/passwords or oauth tokens for all of their users, rather than these tokens staying only on the client apps. yay security!

Now, Twitter seem to be growing some sort of streaming API. Not sure if this helps. If I have 100,000 users, I hope I don’t have to hold 100,000 simultaneous HTTP connections open to my server, that might be tricky.

disqus comments  

It’s easy to pick up chicks when you ha...

It’s easy to pick up chicks when you ha…

15 June 2009 in notes

It’s easy to pick up chicks when you have big ears.

Via

disqus comments  

Twitter is useless

10 June 2009 in notes
tagged with [fail] [twitter] [useless]

as archival systems go, Twitter is beyond useless - the shift to the infinite-page ‘More’ button and the complete lack of any sort of dated archive mechanism means finding things you’ve said in the past is almost impossible

http://notes.husk.org/post/121140032/twittering-everything

Hmmm, suggestion. Twitter is as popular as it is exactly because archiving is useless. It’s so shitty that it almost approaches an actual conversation in terms of forgetteability and deniability, and this is valuble.

Of course, it only feels like that. Things are hard to find if you’re looking for them, but not actually gone, so we have things the dangerous and nasty way round, rather than the useful-to-monkeys-with-overdeveloped-social-lobes way round. But it feels safer.

disqus comments  

OpenSocial

08 June 2009 in notes

Tomseriously, opensocial is one of those 'can be used to solve any problem _except_ problems caused by too much javascript bogging everything down' solutions.
Tomyou just extend the container API with some verbs that describe your service.
Tomfor instance, dopplr public pages with embeddable widgets written by 3rd parties that can get your trip data and display pretty graphs.
Aaronevery webpage a portal
AaronOF QUICKSAND
AaronOF TIMESPACE
TomAlso, once you cam EMBED WIDGETS IN OTHER WIDGETS..
Aaronthe web will eat itself
TomActually, I can't even think of a _bad_ use for that.
Tomit would be a more ELEGANT DESIGN to implement your entire site _as_ an opensocial widget!
TomPERFECT
TomI will now go looking for VENTURE CAPITAL
Tomand maybe SLEEP.

disqus comments  

Abuse of Twitter reply behaviour

08 June 2009 in notes

jerakeenproposal for twitter bot that public announces position changes from, say dopplr.
jerakeenit just says '@blech has just landed in SFO'
jerakeenbut flags it as a reply somehow (handwave)
jerakeenso I only see the travel movements of people who I also follow
blechif you went to its page, you'd see everything, surely?
blechso it'd have to be opt-in
blechalthough depending on how it's fed it'd have to be opt-in anyway
blechstill, kind of a nice idea
jerakeensure, ignore the privacy angle
jerakeenI'm just wondering about clever things you can do with the twitter limited distribution thing
jerakeenalso, note that its utility would be _totally_ dependant on twitter not randomly changing things again
jerakeenyou can design all sorts of clever things using conceptually very fragile bits of 'API'
jerakeenwhich twitter can change at any moment.
jerakeenTWITTER IS NOT INFRASTRUCTURE
jerakeenetc etc
blechindeed

disqus comments  

Peggle for the iPhone

Peggle for the iPhone

05 June 2009 in notes
tagged with [games] [iphone] [peggle]

I like Peggle for the iPhone. A lot of it is that it’s a fun game. But it’s also a genuinely nice iPhone port of the thing. It’s a landscape game, but works both ways round, and flips sides properly. It has background music, but if you’re playing music off the phone already then it’ll start up with only sound effects, without asking you anything. It uses touch very nicely, as a direct ‘aim here’ interaction (backed up with a fine-tuning control) but double tapping anywhere will zoom in on that spot as you’d expect on the iPhone. And it flawlessly resumes from exactly where I last left it every time I start it up, so I’m not worried about leaving a half-finished game when the train gets to my stop.

Also, unicorns!

http://www.popcap.com/games/iphone/peggle

disqus comments  

Hosting toy Rails and Django apps using Passenger

Hosting toy Rails and Django apps using Passenger

28 May 2009 in notes
tagged with [django] [hosting] [passenger] [python] [rails] [ruby] [sysadmin]

I like writing small self-contained applications, and I like writing then using nice high-level application frameworks like Django and Rails. Alas, I also like being able to run these services for the foreseeable future, and that’s a lot harder than writing them is. Running a single Rails or Django application consumes an appreciable chunk of the memory on my tiny colo, and I currently have about 5 projects I really want running all the time (this could easily grow to 50 if I had a sufficiently good way of hosting them). Ideally, I’d never stop hosting these things. Otherwise what’s the point?

It’s sometimes tempting to just write all my toys in PHP. I’m certain that PHP has the mind-share that it does primarily because it’s so incredibly easy to deploy. Ease of development is utterly trumped by ease of deployment for anything not written for internal use only for a large company. tar is easier to use than mongrel, so there are more deployed PHP apps than Rails apps. But I’m not that desperate. I like my nice frameworks.

I tried Heroku as an external host for my apps for a bit, and it’s great. Very easy to start things, very easy to leave them up, and the free hosting plan is perfectly adequate for your average web application. Alas, there are a couple of raw edges that only really became apparent after using them for a few weeks. Firstly, they want to charge me for using custom domains, and I’m not willing to park my apps on domains that don’t belong to me. Secondly, their service goes through odd periods of 500 errors. This doesn’t bother me - what does bother me is that there is no official reaction to any of the complaints about it on what seems to be the official mailing list. Finally, quite a lot of the things I do need cron scripts, for polling services, etc, and the heroku crons (a) aren’t very reliable that I’ve found, and (b) cost money. So I’m edging away from them recently. Would still recommend them for prototyping, not sure I’d want to host anything Real there just yet.

(An aside - I’m not unwilling to pay any money at all. I will happily pay money for things that matter. But these apps are toys. The average number of users they have is ‘1’. I’m not willing to pay a fiver a month per application to be able to host them on my domain rather than Heroku’s domain. A fiver a month for all of them at once? Sure. But the Heroku payment model assumes that you have a small number of apps that you care about, rather than a large number of apps that you don’t.)

Anyway, my current attempt at solving this problem is Phusion Passenger (via mattb), which does exactly what I want, for Rails apps. It’s an Apache 2 or nginx module, and it’s trivially easy to install, unless you’re using Debian, which I am. Short verison? It was a lot easier to totally ignore the debian packaging system except to install ruby, then build rubygems and everything else I needed from source. Sigh. I understand there are horrible philosophical differences underlying this pain. But it’s still pain.

Once installed, you can just point your domain’s DocumentRoot at a Rails app’s ‘public’ folder, and the Right Thing happens - files in public are served directly, other requests will cause a rails process to be started, and serve your app. Enough idle time, and it’ll shut down again. Magic. My favourite part is that it’ll start up the application server as the user who owns the ‘environment.rb’ file of your application, meaning that your app is running as your user, and can do things like write files into temp folders that don’t need sudo to be able to delete again.

Not all of my projects are Rails apps, though. jerakeen.org is a Django app, for instance (this week, anyway). Unexpectedly, it turns out that Passenger will do the same thing for Django apps, though it’s not as well documented. I have a file called passenger_wsgi.py in the root folder of my Django application folder. It looks something like this (if you use this, you’ll need to change the settings module name):

import sys, os
current_dir = os.path.dirname( os.path.abspath( __file__ ) )
sys.path.append( current_dir )
os.environ['DJANGO_SETTINGS_MODULE'] = 'mydjango.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

And in my Apache config file, I have this:

<VirtualHost *:80>
  ServerName jerakeen.org
  ...
  DocumentRoot /home/tomi/web/jerakeen.org
  PassengerAppRoot /home/tomi/svn/Projects/mydjango

and thus are all my toy projects now brought up and down on demand. I’m happy again. Till next week, probably. ONWARDS.

disqus comments  

birthdays

27 May 2009 in notes

blechoh, today is the actual birthday? that explains all the cake!
blechhyvää syntymäpäivää, as someone said on Facebook
blechI hope they weren't just being rude in Finnish

disqus comments  

« older entries