Wednesday November 17, 2021; 9:40 PM EST
- This post started as an experiment to explore using iA Writer as an external editor for Markdown nodes in Drummer on the iPad. I've since concluded that my idea isn't fully baked, so I'm setting it aside.#
- #
- One of the things that attracts me to thinking about Drummer is that, even though there are eighty billion moving parts between me typing and you reading, it feels reasonably simple to me. It did not at first, see my earliest posts, where I didn't have a picture in my brain of how Drummer works. But now I think I get it, which means I can think about it before I start coding. #
- In the end, this particular idea would probably be like 5 lines of Drumkit or something. If that much. Just stitching together a URL. I used to just start typing. I have a feeling I think more before I start coding than I used to. I like to have as complete a picture in my head of what I'm working on. I use the IDE and search and whatnot, I don't need to have it memorized. I can go find whatever string assembly verbs I need when I get there. #
- Today, for example, I found myself thinking of a table in a SQL database as being used like a list, rather than a set. You could also think about the uniqueness constraint on the column. Inside the database engine it's probably a tree of linked lists or something else bananas. But the ability to think about it as a list, or a set, means you don't need to think about SQL, you could take the entire problem right out of SQL and move it into some other language, some other internal data structure. I like names, a lot, but really, it's the concept, the thing the name symbolizes, that matters. #
- #
- The idea I'm discarding was to hand a single node over to iA Writer, which would contain Markdown text consisting of multiple lines of headlines, paragraphs, etc. To do this, you need to solve two problems: getting the text out of Drummer and into iA Writer; and then going back the other way.#
- There are two obvious ways to get the text of a node out of Drummer into iA Writer. If you fetch a URL that starts with "ia-writer://", the rest of it gets handed off to iA Writer. You could encode the text into the URL, but there's a 4K limit. The other way would be to have Drummer write a file on the iPad, most likely by simply saving a download somewhere. There may be sandbox issues with that. #
- Getting the text back into Drummer looks like a pretty straightforward call from Drummer to iA Writer, again via URL, which would return the contents of the file. #
- #
- The sample Markdown file, however, shows a similar structure to a blog post in Drummer, which I should have expected. That is, a headline is a node, a paragraph is a node, etc. That's not how iA Writer views Markdown. I checked the source for Old School, and it looks like there's nothing that would prevent me from having a node that has a bunch of headlines and paragraphs. Each node is handed off separately, but the code to process the Markdown is in a library, which means, it was written to handle a stream of Markdown rather than individual Markdown nodes. (I guess there could be a library out there designed to process Markdown nodes, but I can't think why anybody would write one. Markdown is a stream.)#
- I try to work through an idea before I start typing up code, and when I started working through what it would be like to actually use this iA Writer/Drummer connection, I realized that I had missed a hugely important piece of the puzzle. I can't figure out how I would work with the text on the Drummer side. I can't flip back and forth to iA Writer just to fix a typo, that's nuts. #
- But Drummer does not like nodes with multiple paragraphs. I can't even picture the keystrokes or gestures I could use, the clicks or taps, that would let me properly edit my hypothetical node that contains returns and blank lines. I have a hard enough time dealing with paragraphs I've accidentally split by hitting command-return at the wrong spot. #
- (On the iPad, if you do this, and then hit undo, what gets undone is the text insertion into the new node, not the split. So everything after the split is gone, unless you immediately undo again. You cannot undo the split. I think there may be a way to backspace the nodes back together, but I apparently have a blind spot in my brain for remembering what it is. My excuse is that I'm distracted, because I write long paragraphs, and then split them up in a later editing pass. If I split a paragraph at the wrong spot, I then have to navigate between two separate nodes, copy and pasting carefully to ensure I'm just moving text and not nodes. I think a lot about editing nodes and the return key, is what I am saying.)#
- "Each return is a node" feels like a pretty rock-solid virtuality, and I doubt there's some sort of wishy-washy half-baked multiline text editor mode lurking around somewhere underneath. It’s possible I've missed something about how to work with Drummer's outliner, but I feel like I would have noticed this by now.#
- Splitting a stream into nodes and back again isn't really a problem I feel like dealing with. At that point, I may as well be writing a parser, because, well, I would be. #
- So I'm discarding the idea for now, which is no big deal, I have more ideas than I can use. #
- #
- I still haven't built a tagging system because I don't need one just yet, and I need to get a feel for what I actually do need. So far, I'm trying basically everything, to see what I feel comfortable with, to see what I naturally want to do. Because I get so, so, so many ideas, I need to focus on doing the ones I just can't help but doing. Like I discovered with blogging, see the very first posts here. #
- Part of why I have the blog part is to spin off some of those extra ideas, I can't do them all, I couldn't actually do one percent of my ideas. There is nothing worse than an idea sitting there, where I think, I should work on that because it is a good idea, but I don't want to, because I am interested in something else right now. Those ideas just sit there and corrode. The ideas don't rust, but they are bad for my soul. I need to get rid of them. Maybe someone else can do something with it.#
- All those ideas I'm talking about are different, of course, from the couple hundred projects I actually have taken on. Those I totally will finish someday, I swear.... #