Writer. Editor. Nerd.

Tap Utils for TapCellar

posted by Terrence Dorsey on Tuesday, 10 March 2015 @ 01:42

If you enjoy exploring craft beer, TapCellar, created by my friends Gabe and Jeff, is a fantastic beer journal app for iPhone. Rate the beers you've tried, share recommendations with friends, keep a shopping list, even track the contents of your beer cellar. It's a great app. Check it out.

In fact, I like TapCellar so much, I wrote Tap Utils, a collection of tiny Ruby command line scripts that let you extract interesting information from your TapCellar backup.

There are four scripts right now:

tap-avg-grades returns a table showing each style for which you've rated a beer, along with the average grade for the style, the number of beers rated for the style, and the standard deviation of grades. The standard deviation seemed like a clever idea at the time, but doesn't really tell you anything useful. I might change this a more relevant measurement at some point in the future.

tap-shopping prints out a nicely formatted ASCII shopping list from the beers in your Shopping List saved filter. You can sort the results by brewery, name, or style keywords.

tap-styles prints out a chart illustrating the number of graded beers for all styles with graded beers.

tap-timeline prints out a vertical scatter plot chart illustrating grades over time based on a name or style keyword. The screen shot above shows an example.

I learned a lot making these scripts and I hope you enjoy playing with them. There's decent documentation in the readme, and all of the utils should have --help options as well. Drink some beers, grade them in TapCellar, then print out some pretty charts. Above all else, have fun.

Toolbox: Microsoft Open Source Contributions

posted by Terrence Dorsey on Tuesday, 03 March 2015 @ 03:35

In the last year, Microsoft released a remarkable number of open-source projects under the .NET Foundation banner. Interested in using this code in your own projects? Maybe you want to contribute fixes, features, sample code, or documentation?

Vim Setup Links

posted by Terrence Dorsey on Thursday, 22 January 2015 @ 19:35

I've been trying to work a little vim practice into my editing. It's not to replace my trusty Sublime Text 3 setup, but rather to develop some muscle memory for those times when vim is the most robust editor at hand. And it's always good to have a backup.

This is just a quick dumping ground for some useful posts I've found while setting up a local vim environment.

Sublime Text 3 Setup

posted by Terrence Dorsey on Tuesday, 18 November 2014 @ 03:05

I recently had to setup up Sublime Text 3 all over from scratch due to reasons of not planning ahead. It seemed prudent to write the steps all down for future reference and put the whole thing where I wouldn't loose it. Like on my blog.

Nothing fancy, but it works for my purposes.

Start out by installing Package Control, the package manager for ST2 and ST3.

Open the command palette with CMD+Shift+P (Ctrl+Shift+P on Windows) and run Package Control: Install Package to find and install packages. See the Package Control Usage page for instructions on the process. Generally I like to search for packages on the Package Control site first so I can check for version compatibility, dependency gotchas and evidence of abandonware.

Markdown Extended is my preferred Markdown implementation. I actually set up ST3 to ignore the default Markdown package as you can see in the preferences below.

I'm using Monokai Extended as the theme just for Markdown Extended. Again, see the preferences JSON below. There was some monkey business involved in getting this set up, unfortunately: I had to use PackageResourceViewer to extract Monokai Extended into my /Packages folder, then point to that .tmTheme file (again, see below). This works better on my work machine, so I'll have to double-check that setup and report back any further information. For now it's good enough to get working.

I'm also using Colorcoder for semantic code coloring. It looks like Ruby support is installed by default now. Previously I had to use a workaround discussed in this issue on GitHub.

When installed you can now just go to View > Syntax > Colorcoder > Ruby (Colorcode). Colorcoder also has built-in support for C++, Coffeescript, Go, Lua and Python.

As mentioned earlier, I'm using Monokai Extended as my Markdown-specific theme. Colorcoder applies semantic coloring, but it does so in conjunction with your existing theme setting. For general coding, I'm using PlasticCodeWrap, which I grabbed from the terrific tmTheme Editor by Allen Bargi.

And that's pretty much it for my ST3 setup. My work setup has SublimeLinter 3 installed, but I don't end up using it much.

Keybindings

I also don't do much in the way of fancy keybindings. However, here are two that I've found useful.

The first keybinding creates a shortcut for Title Case, which doesn't have a default keybinding. The shortcut is CMD+K, then CMD+T, which follows the same pattern as the Upper Case and Lower Case bindings.

The second keybinding toggles between text and Markdown syntaxes for the current file. Mostly this is handy for .txt files that contain Markdown. I noticed, however, that this must be a keybinding I originally created for ST2. Package locations have moved around a bit since then. I had to unpack the Markdown Extended package with PackageResourceViewer and point the keybinding to the unpacked tmLanguage file. There must be a better way.

Preferences

Here's my current Markdown Extended.sublime-settings. This is where I set the a default theme for the syntax that's different from the general theme.

And here are my general user preferences. I use Inconsolata at a sane size for mature eyes on large or Retina displays. Tabs are two spaces as the goddess intended. You can also see here that I ignore the default Markdown package.

I'm not obsessive about fixed-width fonts. Check out Dan Benjamin's Top 10 Programming Fonts and follow-up posts for some excellent suggestions. Adobe's Source Code Pro is nice if you don't mind having Adobe software on your system.

That's about it for setup. The magic is in the writing and the coding.

I know documentation is not a favorite task for many developers, but it's really crucial for acceptance and ease of use for your customers. You don't have to write the Great American Novel, and these tools do most of the heavy lifting for you.

Toolbox: Semantic Highlighting

posted by Terrence Dorsey on Tuesday, 12 August 2014 @ 02:20

My August column at Visual Studio Magazine covers a recent obsession: Semantic Code Highlighting. You'll get a brief history of syntax highlighting, along with some examples of various kinds of code coloring, then I dive into some new tools that let you employ semantic highlighting in your own coding environment. I highly recommend it.

My Web Perf Book For O'Reilly

posted by Terrence Dorsey on Tuesday, 29 July 2014 @ 13:50

Head over to HTTP Archive and check out their trends graphs. Notice anything? That's right, web pages keep getting bigger and more complicated. The problem here is that — particularly in e-commmerce — consumers of your site expect it to load and become interactive quickly.

Turns out, the problems involved and solutions needed to fix them depend, mostly, on straightforward, Web Dev 101-level knowledge and technology. I recently wrote a short e-book on the subject for O'Reilly, Web Page Size, Speed, and Performance (free, registration required). There's also an accompanying blog post on O'Reilly Radar, It's time for a web page diet.

Slimming down web sites is not necessarily a matter of learning new and sophisticated programming techniques. Rather, getting back to basics and focusing on correct implementation of web development essentials — HTML, CSS and JavaScript — may be all it takes to make sure your own web sites are slim, speedy and responsive.

Interesting side note: mobile web users (and probably app users as well) expect faster interaction than on the desktop and are more likely to ditch an action if it's slow. Think about the implications of that complication on your app development plans.