Time to learn more about macos programming. In order to do so, rather than work through a bunch of small tutorial-sized projects, I’m going to pick a large project that will have lots of interesting nooks and crannies to learn about. The project is a reboot of QuickSilver. QuickSilver is Mac utility which was written about fifteen years ago. Eventually it got “open sourced”. There’s a lot of Carbon APIs still in use, and lots of other deprecated APIs. QuickSilver is like LaunchBar or Alfred — a productivity app to browse, launch, and execute commands with only a few keystrokes. If I were interested in productivity, I would get one of those apps. But this is about learning to program — so I’m going to write one.
Why QuickSilver? I remember it had interesting visual effects, and graphics programming / animation is high on my list of things to learn. The objective is to expose all the functionality on the machine with a few keystrokes — so it is an opportunity to explore widely. Also, the original architecture was plugin based — which made sense before it was an open source project — and one needed an interface to allow plugins to be developed separately. In an open source project, pull requests take the place of plugins. So I’m going to try to have similar functionality with a completely different design. That way, rather than start with the existing codebase and trying to modify it, I’m going to start with a blank sheet of paper (or blank screen, I should say) and work my way up.
Here are some of the design objectives:
- No plugins. All the functionality is built in.
- Preserve and enhance all the visual effects. And add new ones.
- Replace data with code. Because of the plugin architecture, a lot of the behavior of QuickSilver was driven by plists.
- Swift, not Objective-C. Learn the “swiftish” way of doing things. Avoid all those constructs that used “perform:” and “respondsToSelector:”
- Golf. Strive for conciseness. If, after trial and error, I get something to work, spend the time to remove all the unnecessary steps.
- No third party libraries. This is about learning — so if there is a feature that needs to be implemented, I need to figure out how to implement it — not link in some library written by somebody else who has learned how to do it. If there is a macos provided library that implements the feature, I can use that. Often, just finding the macos library is hard enough — never mind looking elsewhere.
- Eye on the future. Avoid old ways of doing things. Learn new ways of doing things.
- Build my toolkit. Extract those bits of learning which I might use in future projects into a single framework (R0Kit). This project will be the R0Kit framework and the app itself.
The project is called ClickSliver to evoke the debt to QuickSilver. It is an app to use keystrokes more, and clicks less; to make clicks be a sliver of the user’s activity.