Design, Development & Productivity Notes

Hello, I'm Patrick!
These are my public notes. Please, let me know if you have any questions. (pictured: Lucas the greyhound.)

Lean API on Heroku

We have recently been working on an iOS app that requires a backend service. In this case I was looking for something leaner, simpler, and faster than Rails since it was only an API for a mobile app, no web front-end. I wanted it to be very lean and scalable so we could make it through early user testing without spending a lot on servers. Ok, ideally without spending anything on servers; basically how much could I squeeze out of one Heroku worker. [Read More]

Refactoring: making master programmers

There is often a tension between product management and engineering when it comes to time spent adding new features vs. time spent in code refactoring. One could even explain this in terms of top line vs bottom line descriptions. Features mean sales, codebase is an asset, and poor code quality is a liability that affects cost and thus profit. Sloppy, risky, or fragile code is even called "technical debt" in many circles. [Read More]

Toggle Bluetooth

In my home office I have a Bluetooth keyboard and trackpad. When I use my MacBook Air elsewhere in the house I constantly see connect and disconnect messages for these devices. Frequently toggling BT on/off can be a pain; the menu bar method for toggling BT requires scanning the menu bar for the BT glyph, clicking on it, finding the correct menu item and clicking on it. All that scanning, tracking, and clicking can be disruptive to a good mental flow; I wanted a quick keyboard shortcut to toggle bluetoooth on/off. [Read More]
macOS 

Syntax Highlighting in OS X quick look

Quick Look is a handy OS X feature where you can get a quick look at a file by selecting it and pressing the space bar. This is handy when looking through snippet files on disk. This plugin adds syntax highlighting in Quick Look supporting many common programming languages, and even supports R code.

getting-a-quick-definition

I am a logophile, and regularly looking up the meanings of words I encounter on the web or in pdf documents. More recent OS X versions include a great feature that allows you to get a quick definition in almost any app (browser, editor, etc). Highlight a word and press ctrl-command-d to get the definition of the word. It is easy to configure to include Wikipedia definitions so you can also look up people and concepts. [Read More]
macOS 

User Stories and Activity Diagrams

I have been using Omnigraffle to create activity diagrams associated with user stories. Some people may find this overkill but I find doing these diagrams makes transitions clear that might otherwise be missed until later when they lead to costly re-architecting of the screens and flows. I use Omnigraffle for UI wireframes, so it seemed natural to use it for activity diagrams, which is what I have been doing. The issue is keeping the diagrams up to date. [Read More]
design 

Remapping My Caps Lock Key

I've had my caps lock key mapped to the control key for the last few months as I have migrated back to Emacs from TextMate. It was a slight improvement over the placement of the control key but not a huge improvement. I came across this article: A Useful CAPS-Lock Key from Brett Terpstra and decided to give his mapping a try. This mapping requires free third party software, but I was particularly intrigued not by the escape key mapping, which is very handy, but by the " [Read More]

Treetop and Parsing Expression Grammars (PEGs)

Over the holiday I had some time to investigate parsing expression grammars. I had done work in Lex and Yacc many years back when I was responsible for some kernel functionality and related system management kernel commands for a proprietary commercial operating system. I don't remember fondly my time working with Yacc. But then I read about PEGs and the Treetop Ruby library. It allows the use of simple grammer rules based in regular expressions and creates a parser ruby class from the grammer that can then be used in a ruby program. [Read More]