jb… a weblog by Jonathan Buys

Parsing iostat Results

January 25, 2014

In the course of load testing a new system, we gathered the output from iostat from a group of servers. In addition to parsing through the device statistics, we thought it would be handy to graph the CPU stats as well. We set iostat to run every five seconds and captured the output in a text file, one per server. This gave me a sizable pool of data, but with everything I needed on separate lines.

Time: 18:00:01
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.79    0.03    0.48    0.06    0.00   98.64

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               2.22         0.20        38.52    1948442  373500872
sda1              0.00         0.00         0.00      16224       1848
sda2              2.22         0.20        38.52    1931938  373499024

I gathered all the text files into a single directory, and ran a loop in zsh to create a csv file, ready for easy manipulation in any number of programs.

for each in `ls`
egrep -A 1 '(Time)|(avg-cpu)' $each |sed s/Time\:\ //g | grep -v '\-\-\|avg-cpu' | paste -s -d '\ \n' - - | sed 's/\( \)\{1,\}/,/g' > $each.csv

I always start building long lines like this one section at a time. Each section is separated by a pipe, (|), so the first section in the loop calls egrep.

egrep -A 1 '(Time)|(avg-cpu)' $each

This command alone give us output that looks like this:

Time: 00:03:39
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.20    0.00    0.10    0.00    0.00   99.70
--
Time: 00:03:44
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.10    0.00    0.20    0.00    0.00   99.70

The “-A” flag on the egrep command tells egrep to get both the matching line in the text and the line directly below it. The section between the single tics, searches for either “Time” or “avg-cpu”. This gives me the time and the CPU statistics I’m interested in. Next, I pipe this output to the next section, a sed command that strips out the “Time” string, so our command now looks like:

egrep -A 1 '(Time)|(avg-cpu)' iostat.ba-rec1  |sed s/Time\:\ //g 

And gives us output like:

00:04:14
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.00    0.00    0.10    0.00    0.00   99.90
--
00:04:19
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.40    0.00    0.30    0.00    0.00   99.30

The next section uses grep with the “-v” flag, which tells grep to reverse it’s normal behavior and only return the strings that do not match the search text.

egrep -A 1 '(Time)|(avg-cpu)' iostat.ba-rec1  |sed s/Time\:\ //g | grep -v '\-\-\|avg-cpu'

The grep command is looking for either “avg-cpu” or two dashes and removing both lines, giving us:

00:04:14
           0.00    0.00    0.10    0.00    0.00   99.90
00:04:19
           0.40    0.00    0.30    0.00    0.00   99.30

This is looking much better, but the lines of text are offset from what I need them to be. A post I read recently by Dr. Drang reminded me of paste, which is perfect for this job:

egrep -A 1 '(Time)|(avg-cpu)' iostat.ba-rec1  |sed s/Time\:\ //g | grep -v '\-\-\|avg-cpu' | paste -s -d '\ \n' - - 

Which puts everything on the same line, nice and clean:

00:04:14            0.00    0.00    0.10    0.00    0.00   99.90
00:04:19            0.40    0.00    0.30    0.00    0.00   99.30

Only thing left now is to clean up the excess spaces a bit and separate each column by commas, another job for sed, which is only slightly modified from this post on StackOverflow, which leads us to the final command:

egrep -A 1 '(Time)|(avg-cpu)' iostat.ba-rec1  |sed s/Time\:\ //g | grep -v '\-\-\|avg-cpu' | paste -s -d '\ \n' - - | sed 's/\( \)\{1,\}/,/g'

Which I redirect the output of to a text file, one per server, just like the input from the loop. This, finally, gives us the csv output we were looking for:

00:04:14,0.00,0.00,0.10,0.00,0.00,99.90
00:04:19,0.40,0.00,0.30,0.00,0.00,99.30

Now it is ready.


A Different Vision of the Future

January 12, 2014

I ran across a few articles in the past week or so that predict the majority of the population will be living in cities by 2050.1 I don’t dispute the projection, these people generally know what they are talking about, but I would like to do a bit of daydreaming of my own. I can envision a world of small towns populated by remote workers and independent service providers, communities with relationships that are closer, deeper, and happier than their city dwelling counterparts.

I read Remote by Jason Fried and David Heinemeier Hansson last month. The book struck a chord with me because I live 40 miles from where I work. I make the drive every day, except when weather prevents me or I’ve made other arrangements. I have the opportunity to work remotely from time to time, but it is not every day. The team at 37 Signals is mostly remote, and detail in the book how more businesses could benefit from adopting a culture that supports remote work. Fast Internet access, video conferencing technologies, and collaborative software have made remote work not only possible, but beneficial. Richard Branson says that One day offices will be a thing of the past. I agree. In fact, I think remote work could transform modern businesses, and in turn, our culture.

If most knowledge workers worked remotely, and could choose where they lived and who they spent their time with, I imagine that many, like me, would choose to live in smaller communities. The cost of living is less in small towns, the people are generally polite, and crimes are few and far between. If there are groups of remote workers in small towns, than they and their families could support a secondary economy of service workers. Grocery stores, bakers, butchers, barbers, small restaurants and cafés, plumbers, electricians, carpenters, and all the other services that are needed by groups of people. A community of entrepreneurs, similar to the villages that were common in the western world before the industrial revolution.

Big box stores can be replaced by Amazon and other online retailers. If you need a lamp, order it from Amazon. Batteries? Amazon. I generally do this now. I understand that the goods must come from somewhere, and that there will still be factory work, and that the factories will most likely be in the cities, but in my vision of a sustainable small-town future, our needs for factory made goods would be far less than what it is today. This brings me to the third part of my vision, the Maker Movement.

We think of movements as the organized action of a group of people following a common ideological or cultural path. The DIY and Maker Movements certainly fit that description. They are filled with people who want to figure out how to make or do stuff on their own, rather than purchasing pre-packaged goods or services. Are the two movements different things? I don’t think so. I think they’re two circles on a Venn diagram that overlap almost completely. Perhaps there’s a bit more art and design in the Maker Movement circle (what we might call the “Burning Man Influence”), and a bit more changing-your-car’s-oil-in-the-driveway in the DIY circle, but otherwise the passions for creating, building, and sharing are the same.

Creating, building, and sharing is at the core of this vision of mine. Knowledge workers can bring in money to small town economies, service work builds the core of the village soul, and makers reduce the amount of factory-built junk we need. Makers can sell their work locally or remotely via services like Etsy, or just set up their own stores with Squarespace.

What will make the system workable is transportation of goods. We need truckers, or, maybe even trains. Research into automotive efficiency will continue and work its way more and more into the big trucks. I imagine something like a general store being responsible for the import and export of goods and, more importantly, raw materials to the small town. Raw materials could be used by the makers of the town to build what they need, strengthening the core talents of the citizens, building self reliance, trust, respect, and community.

Like I said, this is a daydream, but I don’t think it is unreasonable. I’m optimistic about the future, and I don’t think it needs to involve stuffing seven billion people into super cities, packing them like sardines in a tin. There are other options, better options, and it is up to us to make them come true.

  1. There are several others. Just do a search for “seven billion live in cities in 2050” for more. 


Statement of Faith

January 3, 2014

I am a Christian. I believe that Jesus is the Son of God, that he became a man and was born to a virgin. Jesus lived a perfect, sinless life, and died on the cross as the ultimate sacrifice for all of humanity, for all time, past and future. He was raised from the dead three days later, spoke to his disciples, and now sits enthroned in glory in heaven at the right hand of the Father. Through Faith, I accept this truth, and I accept Jesus as my personal savior.

Through my faith, I am saved. This doesn’t mean that everything always works out fine for me. It doesn’t. I am going through the process of sanctification, an inner changing of who I am, my goals and priorities, the things that I once thought acceptable I no longer do. I will continue this process for the rest of my life, always with the goal of becoming a little more like Christ. It would be easy for someone to point at my past and say “he’s no Christian, look at what he did”, to which I would reply that thanks to the work of God in my life, I am no longer the same as I once was.

My goals in this life are to be the best husband, father, and follower of Christ I can be. Putting aside selfish ambition, I am to run the race set before me. I thank God for the will and the strength to do so.


Be Excellent To Each Other

December 27, 2013

The recent row over iA Writer’s developers and their patent application reminded me what a small community the Mac developers are. The real problem was never about iA attempting to patent their work, the issue was that they forgot their place in the ecosystem. There are a few in the community that give freely and abundantly, like Brett Terpstra, and when iA threatened to use their patents offensively against Terpstra’s Marked, the community rightfully condemned them.

I haven’t used Writer Pro, the application with the syntax highlighting at the center of the debate, but I do own a copy of Writer. I think Writer is a fine application; it’s no Vim, but it does what it says and does it well. I imagine that Writer Pro is just as nice, and that the thought the developers have put into implementing syntax highlighting is well done. That they used a built-in Cocoa class to do it doesn’t concern me, but attempting to patent the work of Apple does. It bothered quite a few developers too, but not nearly as much as if they would have kept their mouths shut and saved the patent for a rainy day, only pulling it out when the trolls came knocking. But they didn’t.

Instead, they came out shooting:

@MarkedApp @JedMadsen …mostly, I wouldn't suggest at this point to rip off Writer Pro's core innovation. We're well prepared there. :-)
Oliver Reichenstein (@reichenstein) Thu Dec 19 2013 5:59 PM CST

And…

@JedMadsen Thanks, Jed. It looks obvious now, but it was a tough fight; so tough, that I'm ready to go into another fight to protect it. :)
Oliver Reichenstein (@reichenstein) Thu Dec 19 2013 10:50 PM CST

The details around the issue have been well covered by The Verge, Marco Arment, and Ben Brooks, but I’m willing to ignore the patent. You can have your patents, even though I don’t agree with them, and you can claim that an Apple innovation is your own, but when you threaten other independent developers, that crosses the line. I will no longer be supporting iA, best of luck. They should have remembered, we should all be excellent to each other.


Bigfoot Footnotes in Jekyll

December 27, 2013

Like the good doctor, I knew as soon as I saw Bigfoot that I would be adding it to this site. 1 I’ve avoided footnotes up till now because the HTML formatting for them seemed far too fiddley, and the Jekyll Markdown processor I was using did not support them.

It turns out that adding support for footnotes in Markdown was as simple as replacing redcarpet with kramdown in the Jekyll configuration. Now, instead of mucking about with HTML that looks like this:

    <sup id="fnref:1">
        <a href="#fn:1" rel="footnote">1</a>
    </sup>

<div class="footnotes"><ol>
    <li class="footnote" id="fn:1">
        <p>footnote.<a href="#fnref:1" title="return to article"></a><p>
    </li>
</ol></div>

I can have nicely formatted Markdown footnotes in my text, like this:

Footnote inline [^1]

[^1]: The footnote text

It may not amount to much, bit I think it’s a nice addition to the site.

  1. I’ve always liked footnotes. 


Burn it Down

December 26, 2013

As the year comes to an end it would be easy to look back and see all of the things that didn’t work. Mistakes were made, endeavors failed, and it was generally a tough year. Some things that I thought would work out did not, and some things I thought I had more time before I had to deal with came due. Sometimes, when things aren’t working out, it’s best to burn it all to the ground and start over.

When I look closer, sifting through the ash, I find bits that survived. There are pieces of my life that are working, and that have not been getting the attention they deserved. I dreamed for years of starting my own business, being self-employed and working from home. The truth is, this is not the right time in my life for that. What my family needs is stability. The 9-5 works for us. Spending my weekends programming or studying for grad school does not. Farmdog had to go, so it was burned to the ground. What does work for me is writing. I’ve been very happy as a freelance writer, but I’ve been so distracted by competing goals that I’ve not given the endeavor the attention that it needs. Freelance writing after the kids are in bed works for us too.

For Christmas this year we got the boys some toy guns, and we had a great time battling it out throughout the house. We had a wonderful dinner with ham and corn and mashed potatoes, and spent a lot of quality time together. This worked, more than anything, spending time with the family works. I spent a long time over the past several weeks reassessing where I should go next in my professional life, but what I came up with is that where I am right now is where I need to be, and by focusing on what really matters, I can make where I am better than ever.

Sometimes you can see farmers burn their fields, so the nutrients in the crops will absorb back into the soil, making the next batch of crops stronger than before.


Desktop Setup For a Sysadmin

November 27, 2013

My Mac is a finely tuned machine. I have been using a Mac for Unix systems administration work since 2006, starting with a PowerMac G4, and have developed a smooth and efficient workflow. Most of the important tools are open source, and the ones that are not are very high quality.

Hardware

One of the reasons I like buying Apple hardware is that it lasts. I run a four year old MacBook Pro, and so far have no reason to upgrade to a newer machine. I will probably upgrade to a solid-state drive sometime in the next few months, and expect to keep this Mac another two years. Last year I upgraded the RAM to 8GB, and that seems to work fine for me.

The Mac spends most of its day in a Twelve South BookArc in the corner of my desk. I’m obsessive about cables, so I have the Ethernet, power, time machine drive, headphones, and external monitor neatly Velcro’d under my desk and out of sight. I have tacks holding sections of Velcro under my desk to route the cables where they need to go. Work provides a 22-inch Acer display, which is not great, but acceptable for what I need to do. I would love a higher density display for text clarity, but I’ll take what I can get.

I use the Apple aluminum bluetooth keyboard. I love it because it is small, has only the keys that I use, and is easy and fast to type on. I mostly agree with the reasons David Sparks mentions in his keyboard review, but I haven’t bothered to look into the noisy mechanical keyboards. Mostly because I work in an office environment, and the noise would bother my coworkers. I also use an Apple Magic Mouse my wife gave me for my birthday a couple years ago. The ergonomics of the mouse are not great, but since my hand is not on the mouse all day, that doesn’t bother me. What I do love about it is being able to flick back and forth between full-screen applications, browse through Safari history, and double-two-finger-tap to bring up Mission Control.

Other than my iPhone, the only other hardware I use is a Western Digital drive I keep under my desk, secured with a lock, cables neatly wrapped in Velcro, as my Time Machine drive.

Software

The first and most important piece of software I install is Quicksilver. Without Quicksilver, my machine is crippled. I map Quicksilver to ⌘Space, so the first preference I change is to disable both the “Show Spotlight search field” and “Show Spotlight window”. I use Spotlight frequently, but when I need it I use the mouse and click on the menu bar icon. I install a few plugins for Quicksilver, but the most important are the Remote Hosts Plugin, the User Interface Plugin, the Web Search Plugin, and the Clipboard Plugin.

After Quicksilver is installed I feel at home, and I can start using the computer. Behind Quicksilver, the most used app on my Mac is the Terminal. I used iTerm 2 in the past, but Apple has continued to improve the built in Terminal app and I don’t feel like I need it anymore, or at least don’t see what value iTerm provides that Terminal does not. I use Anonymous Pro, 14 point, and make my default window size 80 columns x 40 rows. Next, I install Homebrew, and from Homebrew install zsh, and then oh-my-zsh.

I was sold on zsh when I accidentally discovered that it would do tab auto-complete for directories on a different server over an ssh connection. I think I was typing something like:

	scp server.whatever:/~/somedir/

I hit tab out of habit, and it autocompleted the rest of the scp command. I sat there and thought about it for a few minutes, and realized that it must have known that I was typing an scp command, parsed the remainder of the command to get the server, checked for ssh auto-login with keys, and then parsed out the files available for autocomplete. There is also great stuff like batch file renaming with zmv, and glob autocomplete for things like cd. Here’s another example, say I want to cd into a directory named “something-awesome”, I can type “cd awesom” and tab, and zsh will recognized I want to get into the “something-awesome” directory.

Speaking of SSH, the next thing to take care of is SSH keys. I always use SSH keys to log into servers without a password, and I recently generated a new SSH key pair. To do so, open up the Terminal and run ssh-keygen -t rsa and enter a password that is reasonably complex, but one that you can remember. The first time you use that key, OS X will prompt you to save your password in the system keychain, which I do. If my computer is compromised, whoever has it will have access to the unlocked key, but without being on our local company network it is of little use. The password keeps the key from being used if it is removed from my machine, so I feel it is a good compromise between usability and security. My public key is given to Puppet, and from there is added to my local user account on all the servers I manage.

Next I create a ~/Unix directory, and then ~/Unix/bin and ~/Unix/etc. Inside of ~/Unix/etc I put a plain text “servers” file that lists one server per line for each server that I manage. This list is important because I base a lot of my other scripts off of that list. It is the source of truth that I measure Nagios, Puppet, and any other tools we use that need to touch each server.

The first use of the servers list is a quick loop to populate my ~/.ssh/known_hosts file.

	for each in `cat ~/Unix/etc/servers`; do
		ssh -oStrictHostKeyChecking=no $each hostname
	done

Assuming Puppet has done its job and distributed the SSH key, this loop will touch each server in the list, add the key to the known_hosts file, and return the output of the “hostname” command to the terminal, along with a warning that it is doing so. Once the loop is finished, it’s time for Quicksilver to work its magic. In the Quicksilver preferences, under the Catalog tab, and the Plugins option in the left-hand panel (whew), there should be a source option for “Remote Hosts”. Clicking on the triangle will reveal the available sources, one of which will be our known_hosts file. Make sure that is selected and click the circular arrow button in the bottom right corner to rescan, and a number should appear.

This is how I manage getting to any server at a moments notice. I bring up Quicksilver, start typing the name of the server, and when I see the full name of the machine I hit return. Quicksilver launches Terminal with a SSH session open, and since I already have my key traded out, I’m logged right in.

There are times when Quicksilver isn’t quite quick enough. When I need to make the exact same change to a group of servers, I use another tool installed through Homebrew: csshX. The csshX tool is a Cluster SSH implementation for OS X, and can drastically speed up common tasks. For example, when migrating from one NFS server to another, the NFS mounts are the same for every server, and each needs to be unmounted and remounted again. This would be a good job for Puppet, but for various reasons can not be. The csshX tool lets me open up several windows at once and type the same commands in each of them. It has saved me hours of repetitive, dull work.

Managing windows is not something I care to do, so I let Moom from Many Tricks do it for me. I have ⌘⎇1 mapped to move the current window to take up the left half of the screen, and ⌘⎇2 mapped for the right. I use this combination daily to split my screen between something I need to read and something I need to type.

I use Safari as my main browser, but there are a few internal tools that do not work correctly, like HP’s “Onboard Administrator” and a couple of other tools that need Flash, like the web interface for VMware. So, in addition to Safari I also keep Firefox and Google Chrome handy. I don’t bother doing any customization in either of the auxiliary browsers. I’m normally in and out of them quickly, and use them just long enough to accomplish the task at hand. For Safari, I use a handful of plugins which hint a bit more about my workflow:

I set my homepage to DuckDuckGo, and set both new windows and new tabs to open with Top Sites. I also switch my preferred search engine to Yahoo and edit my /etc/hosts file to add this line:

	184.72.115.86 search.yahoo.com

When I open a new window or tab in Safari the Top Sites feature lets me choose to click on Nagios, Puppet, or our internal wiki, or just start typing to do a DuckDuckGo search. If I do a search, DuckDuckGo includes javascript that lets me use vi keybindings to navigate the search results. DuckDuckGo also includes a “bang” syntax that lets me search other sources, like man pages.

Once on a new page, the Type-To-Navigate plugin lets me type in the name of a link to highlight it, and I can press return to open it, or ⌘return to open it in the background. This lets me quickly search for and browse documentation outside of our local wiki.

When I find relevant, detailed documentation, I clip it into my technical database held in DEVONthink Pro. I quickly became frustrated with DEVONthink in the past when I misunderstood how it was meant to be used. DEVONthink is not an anything bucket, it is a specialized research tool meant to provide insight into your data. Once I read about how historians use DEVONthink the pieces began to click for me. I now drop all my technical documentation into DEVONthink, organized into a hierarchy similar to scientific classifications of species. CentOS is of the class Linux, which is of the class Unix, which is part of the class of Operating Systems, which falls under the top level class of Software. Also kept in DEVONthink is what software is installed on what server, and what hardware is associated with each server. This way I keep a deep, running database of the systems I’m responsible for, and synchronize the data to my phone for reference when I’m in the datacenter. DEVONthink keeps documentation that far exceeds the level of detail in our wiki.

Part of the documentation we keep are high-level network diagrams, organized by system. I draw the diagrams in OmniGraffle, which I recently upgraded from version 4, originally purchased so long ago I forgot exactly when. OmniGraffle keeps getting better, and like the Mac, has a long shelf life. I export completed diagrams to PDF for inclusion in the documentation.

Finally, tasks and projects are handled in OmniFocus. Each system becomes a project, and each project has a list of tasks associated. A new recurring task for each project is to review and update the documentation semi-annually. In reality, the documentation is constantly in flux, but it is good to have a reminder to do an overall review to make sure we are where we need to be.

Over time my workflow has grown, and then condensed again, and finally settled into a workable, reproducible, long-term system. When I get into the groove, listening to old Grateful Dead bootlegs or Bob Marley in iTunes, I don’t even notice the tools anymore. My system fades into the background, and all that is left is the thoughtful bliss of real productivity.


Zen, Art, and Tools

November 11, 2013

I’ve been a Mac user since returning to the states in 2003, but I’ve been a Unix user for a few years longer. Originally, I was drawn to the Mac because it was a fantastic interface on top of a solid BSD Unix core, but as I grew more familiar with the platform, I became more drawn to the level of attention to detail. The Mac is a quality machine, but today I’m writing this on a Dell running FreeBSD.

This Dell is absolutely not a quality machine. They’ve shoved a 10-key number pad next to the keyboard, and as a consequence have had to move both the keyboard and the trackpad off center. The Dell is heavy, like a cheap plastic tank. The keys on the keyboard are flimsy, and the display is terrible. In short, this Dell is the epitome of everything wrong with the PC industry as a whole; it embodies a lack of caring. The hardware is not my primary interest today. Tomorrow I will bring the laptop back to work, attach it to my external monitor, keyboard, and mouse, and will rarely, if ever, need to touch the computer. What interests me today is the software.

I’m using the PC-BSD variant of FreeBSD, with hardly anything installed but the Xmonad tiling window manager. I have a few good fonts, and the excellent Solarized color scheme installed, and have configured Firefox and the rest of the Xmonad environment to be as quick and responsive as possible. There is very little about this setup that exhibits friction, and what does has only a matter of time before I find a solution. It takes some work, but it is fast, efficient, and built on top of a core quality operating system, FreeBSD.

I installed PC-BSD because it supported installing into a ZFS formatted hard drive by default, and correctly loaded the Intel video driver for this piece of crap Dell. ZFS will ensure that any data that I save to the drive is protected from corruption, and will make it very easy to back up to another machine or hard drive. I also have support built in for Jails, which provides some interesting opportunities for local testing and development. The user interface for this new system is not nearly as intuitive or friendly as my Mac, but that’s not the point of the system. It’s not meant to be a cheap knock-off or even a competitor to the Mac, if the Mac is a BMW M5, as the car analogy goes, than this is a BMW R60/2. One doesn’t buy and build an old motorcycle because they want an easy way to get back and forth to work. A car is far easier, a motorcycle needs special training, experience, and maintenence.

I’m finishing up the final chapters of Zen and the Art of Motorcycle Maintenence, and seeing how the tagline of this site is “a discussion on quality”, I can’t believe it has taken me this long to get to this book. ZAMM is An Inquiry Into Values, far, far deeper than I intend to go. The book was published in 1974, but has some amazingly relevant thought on our relationship with technology, especially computers, today.

The result is rather typical of modern technology, an overall dullness of appearance so depressing that it must be overlaid with a vernier of “style” to make it acceptable. And that, to anyone who is sensitive to romantic Quality, just makes it all the worse. Now it’s not just depressingly dull, it’s also phony. Put the two together and you get a pretty accurate basic description of modern American technology: stylized cars and stylized outboard motors and stylized typewriters and stylized clothes. Stylized refrigerators filled with stylized food in stylized kitchens in stylized homes. Plastic stylized toys for stylized children, who at Christmas and birthdays are in style with their stylish parents. You have to be awfully stylish yourself not to get sick of it once in a while. It’s the style that gets you; technological ugliness syruped over with romantic phoniness in an effort to produce beauty and profit by people who, though stylish, don’t know where to start because no one has ever told them there’s such a thing as Quality in this world, and it’s real, not style. Quality isn’t something you lay on top of subjects and objects like tinsel on a Christmas tree.

Later, when discussing his motorcycle:

I don’t think I’ll ever sell it. No reason to, really. They’re not like cars, with a body that rusts out in a few years. Keep them tuned and overhauled and they’ll last as long as you do. Probably longer. Quality. It’s carried us so far without trouble.

I have a second book that has fascinated me for the past year, Hand Tools, Their Ways and Workings, by Aldren A. Watson. The book is beautifully illustrated by the author, and explains in detail what hand tools a person should have, how they work, how to maintain them, and how to build new tools using the tools you already have. I’m planning a project to build a sturdy workbench that I hope will outlive me, and perhaps I will pass it on to my son, and I’m planning on doing it entirely with hand tools. Why hand tools? Why not power saws and cordless drills? Because the projects are not about getting them done, it is about the doing. It is about caring enough about what you do to take time and use your hands to do it.

Hand Tools, FreeBSD, motorcycles, Apple, these things are all connected somehow, and by following along this path, I’m hoping to sort out the connections in more detail. For now, it is enough to understand that the relationships between quality work, quality products, and caring enough to do something the hard way are all there, waiting to be explored.


Go2 and Paragraphs Are Now Open Source

November 1, 2013

I see no reason to keep the code for Go2 and Paragraphs to myself. I have no plans to continue developing them, have received no requests for support, and have seen very, very, few sales over the past few months. So, as of now, both Go2 and Paragraphs are released as open source, under the MIT license, available on GitHub.

It is quite likely that there is a ton of bad code in there. Read through at your own risk.


Avoiding Complexity

October 16, 2013

I’ve noticed a tendency in my Mac setup to veer towards higher levels of complexity. In truth, I’d rather not use anything outside of the Apple provided ecosystem, but for one reason or another I’m constantly drawn to other apps and command line tools. It is a struggle to find balance between applications that actually enhance my productivity, and distractions that pull me away from the task I’m attempting to use my computer for.

The Mac comes preinstalled with just about everything you need, but not everything you might want. For example, Spotlight works well as an application launcher, but I install Quicksilver and use it instead. I’ve also adopted David Spark’s Paperless methodology for filing documents, and use both TextExpander and Hazel extensively. The keychain works fine for storing passwords, but I use 1Password, although that may change in the future.

I use Microsoft Office for work, because, lets face it, sometimes you just need Office. I use OmniFocus to keep track of the big things in life that need done, although I could probably switch to Reminders. I use NVAlt for notes, but I could probably use the built in Notes app since I use it so infrequently.

There are a few other applications I have installed; Backblaze for additional backups, ScanSnap for scanning and OCR, Hibari for Twitter, ReadKit for news and long form reading. I use Caffeine to keep my Mac from going to sleep when I don’t want it to, and Moom to provide better window management. I need Firefox because some web apps, especially older ones, do not work properly with Safari. VMware Fusion for a Windows XP machine I need for work, and instead of MacVim or TextEdit I’m using IA Writer for text.

Suddenly the number of applications I like to have running or available seems rather long, and I start wondering what I absolutely need and what I can live without. With a new version of OS X on the horizon, there may be a few of these that don’t make the jump.

In college I used LaTeX to get through math. While my classmates struggled with the Word equation editor, LaTeX worked wonderfully to create beautiful PDF documents with precise and accurate formulas. LaTeX was the right choice for that environment, but since leaving college I’ve struggled to find an appropriate use for it in my day to day work. Since I no longer have a need to create detailed mathematical reports, I haven’t bothered to install the 4+ gigabyte MacTeX package.

I’ve used vim for many years, and have grown accustomed to the way it works, so much so that I adopted it as my main text editor for writing prose as well as code. Unfortunately, vim can be a deep rabbit hole. There is so much to learn, and it can be extended in so many ways, that it is tempting to spend hours upon hours perfecting my own special witches brew of settings and plugins. But, spending time like that isn’t really getting anything accomplished. At the end of those hours I haven’t written any words, only prepared my editor. MacVim as well has been left off the list of software I install. At least until I start spending serious time writing code again.

I’ve deliberately avoided installing Homebrew. Part of it is to avoid complexity, part of it is to keep from having a lot of “stuff” installed that I don’t know if I need or not, and part of it is to try to stay out of the command line as much as possible. Even though I know it is there, I can also see a future where the command line is no longer available, and I’d like to not live in the past. The one exception to my avoidance of he command line is Jekyll, which I use to publish this site.

Because I know how to customize my computer, and because I know how to use the command line to install from source, the possibilities of what I could be doing at any given time on my Mac are endless. However, it is a matter of personal responsibility and self control to keep my Mac as clean, simple, and focused on the task at hand as possible.