Check out SlouchDB

For my apps Lil Todo, ForeverList/Nested Notes, and Little Phrase Book, I created a simple database system that can be synced easily across multiple devices using a cloud store like Dropbox. Well, I’m happy to announce that I’ve been working on generalizing the database/sync engine for those apps and have opened sourced it.

Check out my new Swift-based SlouchDB. It’s a decentralized, syncable journal-based database meant for single-user, multi-client scenarios like the apps mentioned above. You can use it for Mac and iOS apps! It’s available as a CocoaPod, so you can easily consume it that way as well.

How to get Lenovo U2L 100P-Y1 (ASIX AX88772B) USB 2.0 Ethernet Adapter Driver working on macOS Sierra 10.12.5

I have one of these USB 2.0 Ethernet Adapters plugged into a 2017 MacBook Pro 15″ (the one with the absolutely useless Touch Bar).

I’m putting this post up to let you know it’s not possible, at least from my experience, to get the drivers from ASIX working.

I downloaded the drivers from this page: http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=105;71;101

I ran the installer, restarted my MacBook Pro. On restart, I brought up System Preferences/Network and the USB Ethernet adapter was nowhere to be found in the list of available network interfaces.

If you are able to get it working, please let me know. Otherwise, don’t waste your time. (I’ve put up this page so if anybody else tries it they will be warned in advance!)

ForeverList update: after a week of work, you can download it!

tl;dr – After a week of hard work, the app is mostly feature-complete and available for download as a preview.

Go download the app here.

This past week I’ve sunk about 13 or so hours into working on ForeverList. I’ve done a lot of work. Here’s the list:

  • added deleting of entries
  • added drag and drop support for images and links
  • added drag and drop for notes (you can reorder them or move to to other notes as sub-notes)
  • added undo/redo support
  • cleaned up the UI overall

The biggest amount of work was the undo/redo support. I basically had to refactor the core model for the app as it couldn’t handle undo/redo in its current state. The new version is much cleaner architecturally. It now uses the diff as its atomic unit of work on the database in memory.

Whenever you modify an entry by deleting it or modifying its contents, the change is encapsulated in a “diff” object. At the same time, a reverse diff object is created to undo the action. The diff is recorded to our database journal. Then, if you wish to undo the action, we do two things: 1. we remove the last diff from the journal and 2. we apply the reverse diff to get the database back into its old state. The removal from the journal is necessary because when we write the journal of diffs to disk, we only want to keep around the actions that weren’t undone.

I did a lot of UI cleanup, but there is more on the way. Here’s what the app looks like now. It’s usable, but has a few rough edges here and there.

I’ve decided to put a preview build of the app online to force me to complete it. 🙂 The preview is fully functional and then file format isn’t going to change, so feel free to start using it regularly. A future update will be posted to the Mac App Store.

ForeverList update: You can now reorder notes in a list

I spent about an hour and a half tonight adding reordering of notes. You can now pick up a note and re-position it relative to other notes in the list. I had to add code not only in the UI support this, but also back-end support in the storage to record the reordering of notes in a list.

In the future you’ll be able to drag and drop entries from one list to another as well, but this isn’t supported yet. That particular feature will be great because the whole purpose of this app is to allow you to organize your notes hierarchically in a tree, so there’s a big hole if you can’t pick up a note and move it to a sub-tree.

I’ve been coding on a tear in the last few days, but that’s led to a build-up of technical debt. I think it’s acceptable as I get a basic minimum viable product working. Once I get into a state where the bulk of the features are supported, I’ll revisit some of the debt. This app is pretty simple, so that debt isn’t going to be a very big problem. Additionally, I’ve laid out the work ahead so that the debt is intentionally preventing other work from proceeding efficiently, so I can’t really move forward without attending to it.

More ahead…

ForeverList update: Added image support

I went a little nuts this evening and spent a few hours adding drag and drop image support to the app. Thankfully I’ve worked with images and dragging and dropping on the Mac before. In spite of that, it was still a little painful to get this working, mostly because of the pasteboard data format. I had some trouble getting the right NSURL data out of the pasteboard. I also had to work a bit to save the right image representation when writing the document to disk.

Anyway, I’ll have more info on how this all works later, but check out this real in-app screenshot.

The other cool thing is that all images are saved directly in the document package.