When I was visiting my dad, my cousin surprised us by showing up with his three girls. The eldest, six years old, and I started playing with blocks. I ended up trying to reconstruct the particle accelerator my dad worked on for a number of years before she convinced me to make a hospital instead. Somewhere around the efforts to duplicate I-94, I-90, I-355, and I-55 using wooden blocks, I made a mistake at the I-90/I-94 junction. I pointed it out (proudly as I'm wont to do).

"Adults don't make mistakes, my teacher said so."

I was immediately non-plussed with her teacher. Mistakes are a part of life, and with my style of life, I consider a mistake to be a far better learning experience than always succeeding. I pointed out that everyone makes mistakes, we just make different ones, but I don't think she was convinced that somehow an adult was less than perfect.

The learning process

I spent the last week or so working on Author Intrusion. I didn't want to and I was getting seriously frustrated (and despaired) about the entire thing, but I knew that if I kept plugging at it, I'd eventually get over the problem and into the fun stuff again.

"Just keep swimming." — Dori, Finding Nemo

As usual, my self-inflicted complications makes it harder to succeed. I want this to be cross-platform, so I have to pick libraries, tools, and methodologies that aren't as well traveled as if it I stuck with a purely Windows application. I also want it to work without a network connection because my cabin visits don't have Internet (and I hate programs that are "always connected.")

However, I got stuck with some of the decisions I made. So, I spent the last week relaxing some of the requirements (no Internet for now) and trying a different approach. The previous version (now) used node-webkit to gather everything up in a single package. It mostly worked, but I was doing a bit too much and hit a wall when I couldn't figure out how to get a reliable unit test working on the editor.

So, I backed away from it and tried a different approach. The last few months of TypeScript and Javascript changed how I used the language and my comfort level. I also took another look at the other Javascript editor libraries, to see if I could avoid reinventing the wheel. After looking at it, I decided to remove some of the things I wanted to add (Ruby markup) and use CodeMirror instead. It doesn't exactly work, but there is a lot more than me reinventing the wheel, so I'm going forward with that.

If it doesn't work, it's just another way that doesn't work and I'll learn from my mistakes.

Where I got in a weekend

Given the fact I tore almost everything down and started again, I'm pretty happy with where I am. I got the basic integration between CodeMirror and my code working. The persistence layer is abstracted out with one that uses HTML5 File API (which is hard to access) and a hook for using the Dropbox API (which I will implement after I get more done with the filesystem). Later, I'll get a node-webkit-specific version for the single-package implementation. It also leads into the long-term goal of having something hosted (and potentially income-producing) with just adding another persistence plugin.

It also means I don't have to figure out the install story for the release (something that bugged me) since I can just host it on a website. None of the code needs a server API since even the Dropbox API (which I learned from hacking TodoTxtJs) doesn't use a server API.

It isn't all roses, of course, but I'm hoping that my increased understanding of the Javascript ecosystem has finally revealed a path that could work since I still think the Gtk# version is a dead-end.

In the coming week

I'm switching over to writing for the next week (because I like these weekly sprints). I have a couple things I really want to get done:

  • I'm submitting a chapter of Sand and Love on Sunday to the writing group.
  • I also have a rejected submission that needs changes before sending it back out (per the editor's request)
  • I have a story that I need to get out of my head
  • There was two calls for submissions that specifically asked me that I want to enter

I'm also enjoying the fact that I have no major plans in the next few weeks (except for a board game night on Saturday).

2014-01-06