Author Archives: Bill Havanki

About Bill Havanki

Software Engineer for Cloudera.

Programming Font: Inconsolata

Time for another of my favorite programming fonts: Inconsolata.

Inconsolata specimen

Inconsolata specimen from

As its creator states, it bears a resemblance to the Consolas font that ships with more recent Windows versions, and which isn’t all that bad either. This one has a bit of an edge in my opinion: it’s freely available so I’m good to go on my Mac with it.

It’s a bit sharper and bolder than Droid Sans Mono, and the letters are a bit more spaced out. So, based on your mood, I could see using either one. For some reason it also reminds me warmly of the monospaced font Sun would use in their old Java books in the 90’s – probably Vera Sans Mono.


From Dropbox to BitTorrent Sync

I’ve been a fan of Dropbox for years, mainly due to how dead-simple it is to use and how well It Just Works. Lately, Amazon and Google have been trying to move in on the cloud storage game with their own offerings, and of course there’s Box, Ubuntu One, and other systems already competing. Obviously, the ability to sync files across your machines is super-handy.

My main problem with Dropbox has always been how little space you can get. Right now I have 4.42 GB of space in my personal account, over and above the standard free amount due to several referrals and uploading photos and trying Dropquest 2012. It’s a decent amount of space, but … Google Drive kicks you off with 15 GB right away, and Amazon even starts at 5 GB. Box starts you with 10 GB. Dropbox still starts you with just 2 GB.

I would have figured that Dropbox would start bumping things up with the growing competition, but instead their latest announcement was for some sort of photo gallery thing. I mean, I guess they have the whole file sync thing down pat so they need to branch out, but I don’t get how a gallery app is a logical next step. I really want more gigabytes. I could start using the storage in new broad ways.

A while back a friend of mine had me set up BitTorrent Sync in order to transfer some files. Unlike all of those other systems I mentioned, this one has no central server. Instead, your files are shared democratically across all computers you have linked using the same shared secret. As a bonus, all files are encrypted during transport, so that plus the lack of a central server means your files are better protected from anyone who might like to see them without your permission. That’s all fine and good, but what I really care about is that the space is unlimited, since you bring the storage.

So, I’m transitioning from Dropbox to BT Sync. Right now I have two Dropbox accounts, one for work and one for personal use. I’ll have the work one switched over relatively quickly, and the personal one before much longer. I’ll leave the personal one alive for a few isolated items, and as an alternative for cases where BT Sync isn’t as convenient (e.g., web access). Plus, I worked hard for those extra 2.42 GB, dangit.

I have an Ubuntu machine at home, and I installed BT Sync there to take the place of the central server in my scheme. If nothing else, it serves as a backup location for the files in my Sync folders. Although the system really doesn’t need an anchor like that, it helps me transition over. A better option would be to sync to a trusted friend’s systems, which would give me offsite backup. If there were a way to encrypt those copies, it’d be just about perfect.

Finally trying a text expander

Being a code monkey, I can type pretty fast. More importantly, I can type naturally, just expressing my thoughts without thinking so much about where my fingers go. It’s the same as when you get good enough at driving that you don’t think about turning the wheel or pushing pedals, you just drive. Martial artists develop the same union with weaponry; the sword becomes an extension of themselves, connected to their center and not a separate entity.

Anyway … I’ve gotten to the point where I prefer to retype something than to try to save keystrokes by retrieving it from, say, my shell history, or by copying and pasting. It interrupts the flow, makes me think about the tool again. By the time I’d mentally work out the “more efficient” method, I could just have retyped it, wasting keystrokes but staying in the flow.

I use a set of software to help keep me flowing and efficient, stuff like Quicksilver and Fluid. But I haven’t used another time saver, a text expander, until the past couple of weeks. A text expander watches what you type and replaces it on the fly, so you can just type “tyvm” and presto, it turns into “thank you very much”. Sounds like a no-brainer to add to my toolset, but I was reluctant to bother since I could just type instead.

So what changed? I think it has been working on Accumulo. That is a tough word to type. Even after these few months with it, it can still tangle my fingers. So, after consulting Lifehacker I gave aText a shot. So, now when I type “accm” I get “accumulo” substituted. “Accm” becomes “Accumulo” and “ACCM” becomes “ACCUMULO”. Yes, I need all three cases. As a bonus, I configured it to make a satisfying pop whenever it expands. a-c-c-m *pop*

Just yesterday I added “SNPS” for SNAPSHOT, since I work with Maven all the time. I suppose that now that I have the tool on hand I’ll start to notice more and more places where it makes sense to use it. I intend to use it only in narrow circumstances, and rely on more traditional – and portable – shortcuts like shell aliases and code editor snippets (ah, Sublime Text) for the majority of cases.

There’s an art to defining expansions. Your abbreviated form has to be something unique and unambiguous, or else you’ll get the expansion when you don’t want it. If I just used “acc” for “accumulo”, I couldn’t write “accept” or “accelerate”.

There is still the extra thought involved right now, remembering that I have the option to type less. Still, I can just write the words out and not worry about it. With time and practice, I expect that I’ll remember to use the tool more often, and the mental speed bump will fade away.

One thing I worry about is that I’ll get too used to the tool, and when I’m on a machine without it, I’ll have to un-remember to use it, and work through another mental speed bump. We’ll see if that becomes an issue. For now, I’ve ponied up the five bucks and added it to the family.

Programming Font: Droid Sans Mono

I have to admit that I like fonts. I’m one of those oddballs who knows about serifs and x-heights and descenders and kerning and autoligatures and all those sorts of things. I’ve never designed my own font, but I know what I like, and since I spent a lot of time coding and staring at terminals, I definitely know what I like to use for those purposes. Over the years I’ve had different font preferences, and I’d like to periodically post about some that I like now or used to like.

The first one on my list is what I use for my iTerm2 window: Droid Sans Mono.

Droid Sans Mono specimen

Droid Sans Mono specimen from

It doesn’t have as many sharp corners as other popular monospaced fonts, and the letter spacing is also much bigger, which helps keep commands from running together at the prompt. The lowercase letters are nice and big compared to the capital letters (that is, the font has a nice, big x-height), which makes for easier reading at smaller sizes (which I avoid anyway, my vision is bad enough already.)

Sublime Text – enabling Eclipse code formatting

My editor of choice for the longest time was emacs, but recently I’ve made the switch to Sublime Text. It’s such a snappy, beautiful, powerful editor. I’ll still use emacs (or vi even, yecch) over a text-only connection, but otherwise, Sublime Text is the bomb.

Sublime Text isn’t an IDE, however; it’s only an editor, and so is missing some bits and pieces that folks used to Eclipse or Netbeans like to have. It makes up for it by being extremely extensible and customizable, using only Python and JSON.

Sublime Text does perform code formatting for you, but most of the world has standardized on using Eclipse for such work. Such is the case for the Apache Accumulo project, which requires code to adhere to formatting rules saved off in an Eclipse-specific XML file. If you are working under Eclipse, this is just fine, and there is even an IntelliJ plugin; otherwise, well, you may have to bounce into Eclipse just to format code. Fortunately, there is an EclipseCodeFormatter plugin that can call out to Eclipse from Sublime Text to format for you.

The easiest way to install the plugin is to first grab Package Control, which is like yum or apt for Sublime Text. Then, use Package Control to install EclipseCodeFormatter.

You do need to manually configure the plugin, as described on its home page (linked above). In order to do it, you will have to up and install Eclipse. Once you do, you can immediately enter the path to the eclipse executable in the plugin configuration. On a Mac (what I use), the configuration file for the plugin is under ~/Library/Application Support/Sublime Text 2/Packages/EclipseCodeFormatter; the patch to Eclipse is something like /Applications/eclipse/eclipse (actually a symlink to inside the .app).

"eclipse_command": "/Applications/eclipse/eclipse",

To create the configuration file the plugin needs, start up Eclipse and create a new Java project. Maybe make a new Java file in there for kicks. Now, go under Preferences → Java Code Style. Under Formatter, follow the link “Configure Project Specific Settings” and enable specific settings for your project. Select the profile you want to use in Sublime Text. (You can also import an XML file if you have it, like Accumulo provides.)

Now do the same thing for Code Templates if you have specific settings for those too. Now, in your project workspace, under the .settings directory, there should be a file “org.eclipse.jdt.core.prefs” file chock full of formatting instructions. Copy that somewhere where you’d like it to live (I put it right with the plugin files). Now you can configure the plugin’s path to the config file to point to that file.

"config_file": "/Users/bhavanki/Library/Application Support/Sublime Text 2/Packages/EclipseJavaFormatter/org.eclipse.jdt.core.prefs",

You’re all set to use the plugin. You can use the Command Palette to invoke the command and format the current buffer. You can also add a keymap entry to turn on a shortcut for it. Under Mac OS X, I found that Control+Shift+F was available:

{ "keys": ["ctrl+shift+f"], "command": "eclipse_format_java" }