Archive for July, 2009

Dear Steve Jobs,

Hi Steve,

I’m an iPhone developer. I’ve got four apps live in the store, one in review, and several more I’m working on. Plus the 3-4 apps that I’ve written for clients that they have listed under their own accounts.

TUAW says you pulled GV Mobile. Not only do I use this app every day, but I’m developing something similar (different service; similar functionality). This sort of thing strikes fear into the heart of app developers. Quite frankly I’m not sure about finishing my app anymore. There’s no place I can go to get Apple guidance on whether it will be approved.

TechCrunch thinks it has something to do with the official Google Voice app getting rejected, but I don’t want to speculate.

Anyway, I think that was a really crappy thing to do. And it was especially crappy that you (according to him) wouldn’t give him written confirmation because (according to him), you were “scared he would post it“. I’ve independently been hearing rumours of a secret cabal of app reviewers who call us when your rejections are too “sensitive” for normal means. If that’s true, it’s not very nice, Steve.

App developers are your friends. Thanks for the increased transparency with the software betas, but my word, all anyone really cares about is transparency from the app store.

–Drew

How to find an iPhone developer

Or: Why finding an iPhone developer is so hard
The answer is simple: all the good people are already busy.

Wow, you just got your shiny new iPhone! You can download all these great apps! Wouldn’t it be great if there was an app that did X? Hey, your company could really use an iPhone app! If Joe Developer on the Street can put out an app, then so can you! All you have to do is find a developer!

Stop right there.

Reality check:

  • No matter who develops your app, if you want it to be sold under your company name, you (this means you) have to sign up as an Apple developer.  This is $99/year, and there’s a (last I checked) 3-week waiting list and a lot of paperwork to fill out.
  • You need to pass Apple review.  Again, lots of paperwork to fill out.  And if you get rejected, you start again.  I’ve got an app that’s been in the queue 4 weeks now.

Okay, okay, so maybe you can’t impulse-commission an iPhone app.

But my app’s really simple!

No, your app is not “simple”.

Let’s take a “simple” app that does two things:

  1. Displays “Hello, world!”
  2. Plays a “Hello” sound effect

How much simpler could it get?  To an iPhone developer, your two-feature app looks like this:

  1. Who is providing your application icon?  All apps need an icon, in very specific sizes and formats.  Do you know what they are?
  2. Do you want to sell this app under your own name?  If so, you need to sign up as a developer.  Hope you don’t need this in the next month or so…
  3. Do you want to actually test this app?  If so, it needs a seperate “testing” codesigning chain.  The Apple documentation on how to do this was (and to a large extent, still is) dead wrong.  And if you screw up, you’ll get a generic error (“Can’t install: 0xe0080018″).  I hope you know where to find help, because the good documentation isn’t indexed by Google.  Oh wait, the tester is running Windows and is trying to upgrade the test version in repsonse to a change?  That fails with a mysterious error, because upgrading test builds on Windows isn’t supported.  Again, not documented anywhere.  You didn’t know that?
  4. Should the “Hello world” message be displayed using UIKit (like a UILabel, or UIAlertView), or with Quartz?  Or with OpenGL?  Is there any chance this app will later be extended to draw “Hello world” to an image, like to export to the photos app or to send in an e-mail message?  If so, you shouldn’t be using UIKit.  And is the “Hello world” text bigger than a certain size?  If so, you shouldn’t be using OpenGL.  But you’ve gone through the design process, and you know that, right?
  5. Are the buttons and appearance consistent with the HIG (Human Interface Guidelines)?
  6. Do you need to adjust/move text around when the app is opened when the available screen size is less than expected (for instance, when you’re on the phone, and the status bar is flashing green and huge)?
  7. How are you allocating memory for this?  No matter how you display the text, there’s memory to allocate, and doing it wrong is grounds for rejection.
  8. What background color should you use to be consistent with other apps?
  9. Who’s providing the “Hello” sound effect?  I have some sound experience, but most developers don’t.
  10. Should the sound effect be responsive to the phone’s volume controls?  (Hint: Apple reviewers have an opinion)
  11. If the “Vibrate” switch is on, should you play the sound, play nothing, or vibrate the phone?  (Hint: Apple reviewers have an opinion)
  12. If there’s already a sound playing (like music from the iPod), should you play the sound overtop?  Should you fade the music down, play the sound, and bring it back up?  Should you fade the music down, pause the iPod, and play the sound?  Should you then resume playback at app quit?  (Hint: Apple reviewers have an opinion)
  13. If the sound is interrupted (like by a phone call or other alert), should it resume playback after?  Or should it die?
  14. What fileformat is the sound in?  Who does the conversion?  Depending on your answers about fading music in and out, you may not be able to use formats like AAC that the phone should support.  Have you thought about the battery life, about performance (app launch times)?  Some formats are hardware accelerated, which may very based on the specific device, what else is going on (music, alerts playing), etc.
  15. Were you aware that apps above a certain filesize can’t be downloaded over a cellular network, drastically decreasing your market?  Do you know what that size is, and which sound file format(s) will keep you in the limit?
  16. How are you allocating memory for this?  No matter how you play the sound, there’s memory to allocate, and doing it wrong is grounds for rejection.
  17. Are there any other apps similar to yours that have been rejected?  (Yes there are!)
  18. Who’s responsible for acquiring the certificates, keys, provisioning profiles, etc. required to submit your app to the app store?  (Hint: if you’re selling under your name, you have to acquire these.  All a developer can do is help you fill out the forms, like a CPA does for your taxes).
  19. Who’s responsible for support, diagnosing crash reports, fixing bugs, etc. after it’s out in the store?

This is the list of things to worry about for a dead simple app, with no user input.  Just imagine what this list would look like if your app actually did something useful.

But iPhone developers eat lists like this for breakfast!  All I have to do is find a good developer!

The good developers are always busy

I’m a good developer.  I have four apps in the app store.  I have two in review.  I lovingly care for these apps.  I push updates.  I add features.  I make money.

I have a waiting list of clients a mile long.  I’ve had to tell prospective clients “you have a great project here, looks like a good idea, but I have twenty great projects to work on for the next six months.  Good luck.”

All iPhone developers are like this.  Most of their time is spent on their own apps.  What little they have left goes only to the most lucrative or most reliable clients.

With other kinds of development, you can sort of snatch students out of college before they realize what they’re worth.  You can get some undergrad student to throw it together for you in his spare time for $20/hour.

But iPhone developers already have a well-paying job working for Apple.  To get their attention you have to pay them more than what Apple pays them.  And Apple pays them a lot more than you would expect.

If you’re budgeting anything less than $5k for your app, just walk away.  Developers are going to laugh at you.  Think about the “simple” two-feature app that exploded into the huge list.  Your app is more complicated than you think.

If you’re going to offer something stupid like “revenue sharing”, just walk away.  Developers are going to laugh at you.  I have a “revenue sharing” deal already–I do development work, and Apple sends me a monthly check.  The only way to compete with that is to pay actual money up front.

But this five-star company on eLance offered to make my app for $10!

We’ve been over this.  The good developers are busy.  In the hour or so I’ve worked on this blog post, I’ve gotten two e-mails and a phone call inquiring about iPhone work.  I sure as hell don’t have time to spend searching for work on eLance, and anybody who does is dangerous.

If you know anything about software development, you’ve heard the horror stories of outsourcing work and having it shoddily-done[1].  Without rehashing that argument, be aware that iPhone development is harder than most other kinds, and so there’s a great deal more that can go wrong.

How to find a developer

It’s simple:  cold-call the people who made apps you like in the app store.  Every project I’ve ever done started as a cold call.  Most will tell you they’re too busy to do new contract work.  But, if they’ve written an extremely similar app, they will know what’s involved and will be way faster than average.

Tell them what your budget is.  Cold-callers who are flakey about budgets go to the bottom of the bin.  Ask them for an estimate.  If they say they’re too busy:

  • Ask them if your budget is in the right range.  Remember, it’s always more complicated than you think.
  • Ask them if they know anyone who can help you.  Maybe they personally know another developer.  Maybe they use an app that’s similar to what you want that you’ve never heard of.
  • Ask them if they have any advice.  Most developers are pretty friendly, even if they can’t help you.

tl;dr

If you don’t have $5k, walk away.  Anyone who does iPhone freelance work is either

  • Being paid more than Apple pays him for releasing an app on the app store, or
  • Incapable of writing his own app store apps (not the developer you want).

If you want someone good, try cold calling apps you like in the app store.

If you’re read all of this and are still serious about making an iPhone app, feel free to call or e-mail (phone widget on the right sidebar).  But I keep a pretty full schedule, so I may not be able to help you.

[1] When I say “outsourcing” here, I mean the kind in which you pay considerably less than states-based developers.  I’m not implying that similarly-priced developers in other countries are inferior.

Why the GPL sucks

I have a lot of respect for the work Richard Stallman has done for software. He’s written some really awesome things, like Emacs and GCC. And he was one of the first to get people thinking about open source and free software. He was a pioneer in his field, and an all-around smart guy. And then…

Saint iGNUcious

Saint iGNUcious

Which, hey, cut him some slack, right? The guy wrote Emacs! If he wants to put a disk platter on his head to celebrate, then… that’s cool.

But then… things got weirder and weirder. First, he came for X Windows, which is totally free and open-source. Then, he started rallying against MS’s efforts to turn Office into an open standard. Now, he’s stirring the pot against the free and open-source Mono project with FUD that’s been debunked again and again, prompting even Microsoft to weigh in, and yet Stallman still goes on in his own little “we need a comprehensive patent license” world, completely oblivious to the comprehensive patent license right in front of him.

All that to say, he basically created OSS as we know it today, but that’s no reason to sit back and watch him try to actively destroy it. When Microsoft is the one promoting open standards and open source, and Stallman is the one spreading FUD about pure OSS stacks and pure open standards, that should cause someone to think “Hey wait a minute, this seems a tad bit backwards.” What we are now seeing is, to a large extent, that the two teams have switched ideologies. Stallman, who spent so much of his life opposing big corporations, has forgotten whatever view he used to hold, and is now opposing Microsoft just because, even when it totally contradicts his own former principles.

Which brings us to the GPL. I don’t even want to get into the GPLv3, because that’s been endlessly debated, and as it turns out nobody really important uses it. So I think there’s a certain widespread de facto consensus within the FOSS community that it’s not a very good idea. So when I say “GPL” I really mean v2, because that’s the only one with any sort of widespread use.

For those of you who don’t know, the GPL says (as an extreme oversimplification) that you have to make the source code available to a piece of software when you distribute it. So if you took the popular GCC compiler, and modified it to be faster, and sold it, you would have to distribute the source code of your modification along with every binary copy, and now everybody knows how you made it faster, and you have a hard time making any money, and maybe go out of business. [This is an extreme simplification. I'm not going to get into patent law and trademark law, which are sometimes used (sometimes ineffectively) to make the source code you distribute difficult to actually use.]

Now, you may say “They’re profiting from GCC! People worked hard on that!” And that is very true. It’s rather unfair for other people to profit from your work. But we must be consistent. Red Hat and Novell make loads of money off other people’s work; they simply do it in a way that complies with the licenses (more on this later). And they’re generally rather well-liked in FOSS circles. So profiting off other people’s work can’t be very bad if we let Canonical get away with it and we still like them. It’s got to be an ideological thing. So what can it be?

Releasing FOSS software is like putting a toilet on your lawn with a sign that says “Free”. The first version is probably a pretty shoddy toilet. The author made it to scratch his own itch. 99% of the time, he’s not interested in helping you plunge it. He’s not interested in modifying it to be a wheelbarrow. He made it to solve some particular problem, he decided maybe somebody else could find a use for it, and he put it out on the lawn. His itch has been scratched; his problem has been solved; the thing is done.

Except not. If I come along and want to make the shoddy GPL toilet into a wheelbarrow, if I pour blood and sweat and tears into the wheelbarrow, if I do original research and and custom-mold frictionless ball-bearings and spend millions on case studies and have a team of people… I must also put it out on my lawn for free because somebody else did that with the shoddy toilet I started with. This is called “protecting your freedom.” Wait, what?

Okay, that was a contrived, straw-man example. What actually happens is that very, very rarely does blood and sweat get poured into shoddy GPL projects because everyone knows you’re going to have to give it away. It does happen in cases where somebody (Linksys, I’m looking at you) doesn’t understand how the GPL works, and ends up getting forced to give the software away. It does happen in cases when there’s some other developer looking to scratch a significantly more complicated itch and uses the shoddy toilet as a stepping-stone. It does happen in cases where somebody backs the project as a sort of goodwill/advertising move. But by-and-large, shoddy toilets never make it into polished wheelbarrows.

Now let’s be clear. Neither copyleft nor BSD-style licenses are going to help you much, as the developer. A copyleft license restricts the way in which somebody downstream can use your work, and a BSD-style license basically lets them do whatever they want with it. In some cases maybe you have a cool dual-licensing strategy or negotiate contracts with Red Hat or something. But in the normative case, the only difference is that either cool wheelbarrows exist or they don’t, and neither of these choices have a net positive effect on you. (The fiction, the idea that somebody will make an awesome wheelbarrow, and give it away, is simply that: a fiction. Any game theorist should understand this.)

But there is a net effect on software development. Who makes money off GPL code? We go back to Novell and Red Hat, who test and package this software. And we see a trend–GPL code helps software testers make money. It helps QA people. It helps the people who answer the support phones. It helps everybody except software developers. Oh, maybe Google will pay them a salary as a goodwill gesture. But it’s really, really hard to make money from developing FOSS. You can make money supporting it. You can make money testing it. But no money developing it.

Back to the BSD model. Who makes the money now? Software developers. The people who develop and design the wheelbarrow clean up. Now granted, the shoddy toilet creator gets nothing. But the field as a whole does a lot better. Now the developers are calling the shots, instead of the QA and support people. Now you can get a job designing wheelbarrows, and so on.

That’s the practical argument. Now here are some ideological ones.

First, copyleft licenses like the GPL are widely considered by their proponents to be “freer” than BSD-style licenses. This is the wrong word. The word “free” means this:

not under the control or in the power of another; able to act or be done as one wishes

As we’ve seen, what the GPL actually does is it gives you, the author, more control and power relative to BSD. Maybe this is good; maybe this is bad. But it is certainly not more free. By definition it is less free. And anybody who says otherwise has gotten lost in their own logic.

What copyleft proponents actually mean when they say “free” is they want people to behave well. They want upstream people to be recognized and compensated and they want downstream recipients to release their code so that the whole community can benefit, and they want people to be “fair” to each other, and so on. This is all fine and dandy, but it is not freedom. It’s freedom insofar as downstream recipients are “free” to do what you like, and not free to do things you don’t like. And unlike proprietary licensors, you like some very good things–open source, reusable code, etc. etc. And you dislike some very bad things–people stealing other people’s work, not giving credit where credit is due, etc. But don’t confuse this sort of utopia with freedom, because they are miles apart. Freedom means that somebody has the ability to do things you don’t like. This is what we mean by “free speech”, the ability to say things others don’t like. This is what we mean by “religious freedom”, the ability to practice things that others don’t like. The GPL gives users the “freedom” to do what you like. This is a totally different cup of tea.

Hopefully you’ve seen that horrible bit of bytes that comprises the “You wouldn’t steal a handbag” nonsense. The key difference between stealing a handbag and stealing a film, is, of course, that in one case we’re short one handbag, and in the other case, we’re not short one film. The MPAA and friends like to argue about “lost sales”, and so on, but most reasonable people agree that this is by and large a bunch of nonsense.

This same logic applies to software. When somebody forks a project and makes it proprietary, they haven’t “stolen” the project. All the code you’ve written is still free and open right in front of you. What they’ve done is improved what you’ve built and given people another choice (namely, a proprietary one). You’re not out anything. You’re not short anything. Now granted, it’s not very nice, the same way that downloading a movie off bittorrent isn’t very nice to the movie industry. But the only way you could be “harmed” is if people start switching to the proprietary fork, and your software loses popularity. And if that’s your concern, I’ve got news for you: writing software is a horribly shoddy way to become popular. Take up a different hobby.

Now you may say “But wait, I have some sort of Author’s Right[TM].” And that’s very true. You do have an author’s right. But other people [should] have an author’s right to the code they write. And if somebody makes a serious advance on your shoddy toilet then they should really be able to license it how they see fit. And so if your project is a shoddy toilet project, you really shouldn’t exercise your author’s right by using the GPL, because that prevents other software developers from properly exercising their author’s right [back to that definition of freedom thing again].

At the base of it, I think, the GPL is selfish. When you GPL a project, you’re saying “This is mine, and if somebody else changes it, they’d better give it back to me.” It’s cloaked in better words of course (“This project is the community’s and you’d better give it back to us“). But for me, anyway, saying that would be lying to myself. More often than not, the first release has no community, so there’s just the developer.

This whole time, we’ve been dancing around what constitutes a “modification” and a “work”. Any real software developer knows the distinction between one software package and another is a bit arbitrary. At the end of the day, a microprocessor runs through some statements in order, and it doesn’t know where one package begins and another ends. Packages are purely an arbitrary construction for human minds. And now we get into real trouble.

Say we have two software packages on the same hard disk. Those are clearly separate works. How about two packages as part of a system (like cc and ld)? How about two binaries that communicate via pipes? That communicate via shared memory? How is that different from two libraries that are dynamically linked? And how is the latter any different from being within the same compilation object? How do we deal with “modules” in a dynamic language like Python? Do we treat them like seperate processes, seperate libraries…? How do we deal with “linking” in a JIT-type language? Can we license a DATA assembly section under a software license? If so, can we release text under the GPL? And on and on it goes.

The FSF have acknowledged some of the madness, and so we have a proliferation of licenses like LGPL, GPL, Affero, and on and on it goes. The GPL treats the software “package” as a unit, and any changes to the package must be open. The LGPL uses the “library” as its base unit, and you can link an LGPLed library into a proprietary software program, with some very complex restrictions that basically let people change the version of the LGPLed package you linked to. Affero tries to go the whole nine yards, saying that if you run Affero code on a remote server and let people make queries of that server over the Internet, that counts as “distribution”, and so you must release the source code. (How that is enforceable I have no idea.) As best as I can tell, this stemmed from the sentiment that “How dare Google make gobs of money by making an end-run around the GPL by running software on their own servers,” which is a level of selfishness on the FSF’s part that I hope is self-evident.

But of course there’s no such thing as a library, or a package, or even a web server, except as a legal fiction. There are just x86 instructions. Whether we separate the code by a thread ID number or by an undersea cable, it’s just code.

And here is where we’ve arrived: we have “free” licenses that force developers to construct large and complicated legal and technical barriers between the resources they have available to them and the problem they want to solve. What started out as a shoddy toilet on the front lawn has become a complicated and technical and legal jungle of licenses and compatibility and barriers and linking and languages and words and terms.

And I’m tired of it. This is not the software movement I signed up for. I didn’t sign up to let testers and QA people profit off the work of developers. I didn’t sign up to create a whole series of artificial barriers to prevent people from using my code. I didn’t sign up for misguided and deceptive rhetoric about how “freedom” needs all these complex restrictions.

I signed up to put a shoddy toilet on my lawn, in the hope that some poor soul would find it useful.

mailComposeDelegate

If you’re trying to talk to an MFMailComposeViewController and are setting the delegate property (you know, like every other class in the iPhone SDK), you’re doing it wrong. You need to set mailComposeDelegate.

Oh, and just to confuse you, delegate is left in, so as not to cause any warnings or compile errors. It just silently fails.

Exporting an entire Evernote notebook (mac)

  1. Make sure Evernote is set up to export to your documents directory (File->Print->PDF->Save PDF as…)
  2. Make sure you don’t have anything important that would match “\d+.pdf” in ~/Documents
  3. Launch evernote, highlight the notebook, highlight the first note
  4. Run the applescript below
  5. Tell it how many notes are in the notebook
set workingPath to (path to documents folder as Unicode text)
set dialogResult to display dialog ¬
	¬
		"How many times to loop?" default answer "1"
set sTimes to text returned of dialogResult
repeat with i from 1 to sTimes
	set filename to ((workingPath & i as text) & ".pdf")
	tell application "Finder"
		if exists file filename then delete filename
	end tell
end repeat

tell application "Evernote"
	activate
end tell

delay 1
repeat with i from 1 to sTimes
	tell application "System Events"
		keystroke "p" using command down
		repeat until window "Print" of process "Evernote" exists
		end repeat
		tell process "Evernote" to click menu button "PDF" of window "Print"
		tell process "Evernote" to click menu item "Save as PDF…" of menu "PDF" of menu button "PDF" of window "Print"
		repeat until window "Save" of process "Evernote" exists
		end repeat
		keystroke i as text
		keystroke (ASCII character 3)
		repeat while window "Save" of process "Evernote" exists
		end repeat
		tell application "Evernote" to activate
		keystroke (ASCII character 31)
	end tell
end repeat
set outputName to POSIX path of (workingPath & "export.pdf")
set command to "python '/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py' -o " & outputName

repeat with i from 1 to sTimes
	set sPath to ((workingPath & i as text) & ".pdf")
	set command to command & " " & POSIX path of sPath
end repeat
--return command
do shell script command
repeat with i from 1 to sTimes
	set filename to ((workingPath & i as text) & ".pdf")
	tell application "Finder"
		if exists file filename then delete filename
	end tell
end repeat

New host

I just moved this site over to a new VPS. Should be a little snappier.

Lifehacking series: Dropbox

My last article on book scanning did so well that I think it’s time to expand it to a whole series on Lifehacking.  What do I do to cut through the madness and get things done?

Dropbox is a cloud service that keeps all my files in sync across all my computers.  It exposes itself as a folder on my filesystem, and the folder contents are synced to the Dropbox cloud and pushed to all my computers.  It’s thoroughly cross-platform (Win, Mac, Nix).  Here’s how I use Dropbox:

  • Git repositories.  All my code for all my projects is in Dropbox.  I can be working on some feature, walk out the door, and have everything with me: no commits to do, no git pushes to do, everything exactly in sync.  My working directory over here is exactly my working directory over there.  I don’t have to do meaningless commits just to move code between machines.
  • Flash drive replacement.  90% of the flash drive use cases are “take this PDF to the lab and print it”.  With Dropbox, I just put the PDF in there somewhere, and download it with the web interface on a lab computer.  This has saved my behind on several occasions when I’ve realized “Holy crap, I don’t have that paper…”  Dropbox is 30 seconds away.
  • Poor man’s backup.  I back up my entire music library with Dropbox.  As a bonus, it syncs to all my machines.
  • Poor man’s web hosting.  By dragging a file to the “Public” folder, it automagically is hosted via a publicly-accessible URL.  This is great for one-shot e-mail attachments that probably won’t fit on the recipient’s server.  I’ve got a really cool hack involving KavaTunes that hosts my entire music library over Dropbox via a sweet web interface:
KavaTunes + Dropbox = win

KavaTunes + Dropbox = win

  • Revision control.  Every file in Dropbox is revisioned.  With a few clicks, I can revert a file or folder to a previous snapshot:

Picture 2

  • I can even restore deleted files (going back pretty much indefinitely)
  • Collaboration – multiple users can share folders and the changes are synced instantly.  This is great for collaboration on school projects, etc.  I’ve even used Dropbox as a central source control repo on occasion, when I needed something super lightweight.  Things *can* get a little hairy if your client software (Powerpoint, I’m looking at you) doesn’t notice a change somebody else wrote to the disk, but Dropbox’s revision system insures that if something does go wrong, no data is ever lost.
  • Awesome diff system:  Dropbox’s syncs are so efficient you’d never believe it.  It is *very* good about only syncing the deltas.  If you change 3kb on a 1GB file, it will cost you 3kb in bandwidth.  Every time.
  • Impossibly fast syncing.  On the backend, your files are divided into ~64kb chunks, which are hashed.  If somebody has already uploaded that 64kb chunk, you don’t have to.  This means that if you drag in an Ubuntu disk image, or something that’s already in somebody else’s Dropbox, it uploads instantly.  There are tons of posts in the forums from new users going “WTF!  That file was 1GB!  Why didn’t it upload!” when it’s perfectly safe and sound, because somebody else beat you to the punch.
  • Local caching: If you delete and re-add files, or move lots of things around, Dropbox will simply replay the shell commands on your other machines.  Deleted files are cached locally for awhile, so you can re-add them without any bandwidth cost.

And best of all, Dropbox is free!  You get a 2GB Dropbox folder on all your machines for nothing.  Paid plans are available for 50GB and 100GB folders.  And you can always shoot them an e-mail if you’re crazy  like me and need more disk space.

Return top