[Note: What follows is just an idea, very possibly a flawed one. I doubt I'll try to build this any time soon. Feel free to beat me to it!]
I just switched from the iPhone's built-in Notes app to an app called Notebook, by Appigo. It's nicely done and looks really good in Verdana 14, but of course it isn't exactly what I want, because no text editor in history has ever been perfect for anyone.
Besides looking as nice as Notebook, here are three features I'd like in an iPhone notes app. If such an app exists, I'd love to know about it.
- Svn for online storage: Do svn checkouts and commits against a repository where I've stored text files. Do svn adds and deletes as appropriate.
- Paragraph-based operations:
- Have gestures for moving the current paragraph up and down. This would help move a paragraph without having to stupidly delete it and retype it.
- Have gestures for cutting and pasting the current paragraph. If you're a vi user, think "dd", then navigating somewhere else in the doc, then "p" or "P". Unlike in a desktop app, cutting shouldn't be allowed if the paste buffer has something in it, and pasting should clear the paste buffer. This is to prevent accidentally blowing away something I'd cut and meant to paste somewhere.
- Have a separate gesture for deleting the current paragraph without affecting the paste buffer.
- The paste buffer should survive between launches of the app.
- Randomness: View five random paragraphs.
"Svn for online storage" comes from the fact that I want to edit my files on both my iPhone and my computer.
"Paragraph-based operations" comes from the fact that I use text files for lists. I've tried list-oriented apps but I keep coming back to text files.
"Randomness" comes from the fact that I jot down all kinds of things in a single text file on my iPhone. (Indeed, I might not mind if my hypothetical app only supported one text file.) My text file contains not only to-dos but odd things people said, random philosophical musings, ideas for apps I wish existed, the attendance list from the last CocoaHeads (no reason, I'm just a packrat for this kind of info), book titles I see at the store and want to Google when I get home, and so on. I don't prune the list as often as I should and sometimes stuff in there is months old.
I think it might trigger interesting thoughts to see a random sampling once in a while. Imagine shaking the iPhone, or doing some other gesture that means "random," and seeing the following appear (actual items from my list):
- Hot dog rebar
- Bear little brain simple caveman
- Pacquiao Hatton
- Try Bee apps
- Exploit my appetites
("Hot dog rebar" is a technique one of my coworkers mentioned for making meatloaf.)
It seems to me the hardest technical and design challenge would be using svn. Appigo's app lets you sync your notes online if you have a Toodledo account, and this works very nicely, but it doesn't merge changes: the last update of a file wins. So if I make some edits on my phone, then get home and without thinking make some edits via the web site, doing a normal sync will cause me to lose data.
This is why I've been keeping the to-do list for AppKiDo in a text file in svn. I can edit it on my laptop or my desktop without having to remember which machine has the latest edits.
I don't know if the iPhone can be an svn client. It might have to upload files to a hosted directory somewhere that would be a proxy for the iPhone, and tell the host to perform the svn operations. This means writing server code, but might be the only/easiest solution.
What about svn conflicts? Offhand I don't think I want to resolve conflicts on the phone. It's too ugly a task even in a desktop app. My first thought is to check first if there's a conflict, and if so, don't do the svn operation. Then I need to figure out some other way to get the changes from the iPhone into the document and get the merge back down into the iPhone.
Svn diffs would be tricky to do well, but could be valuable so I'm reluctant to leave the feature out altogether. It would be nice to come up with a nice way to view diffs on the phone, but worst case, I could view the raw output of svn diff.
Just to play my own devil's advocate for a minute: instead of all the work of figuring out an svn-based solution, maybe I could live with the Toodledo model, and just be careful to sync my iPhone frequently.
I haven't thought much about a name for this hypothetical app. How about "iNapkin"?
UPDATE: A possible alternative to solving the svn problem, which may or may not make sense: how about when you "upload" the file from the iPhone, the entire file gets HTTP-POSTed to an "upload URL" that you specify. The response is some XML that may contain a modified version of the file that will replace the file you uploaded. Then people can implement the server side of this — the thing the URL points to — however they want. There's probably some smarter pattern/implementation for this already. Just putting the idea out there — and now I have to run to something I'm late for…
UPDATE: I have switched editors again.