jb… a weblog by Jonathan Buys

Responsibility

April 29, 2014

“UNLESS someone like you cares a whole awful lot, nothing is going to get better, it’s not.” – The Lorax

I believe that it is my responsibility to have an understanding of my impact on the world around me, and who and what I support, either implicitly or explicitly, by the products I use. Not everything easy is right, and not everything cool is good. I try to do the right thing whenever I can, balancing the needs of my family and the culture we live in. Sometimes, there’s no good answer, but sometimes, as in the latest case of sexism in the tech industry, the answer is clear.

I’ve removed my site and all code from Github, and deleted my account. Based on the report by Julie Ann Horvath, the vague response by Github, and the storm of coverage that has followed the issue, as well as resurfacing of past stories, I’ve decided not to do business with the company. I’ve had an account on Github for years, and used Jekyll and Github Pages to host this site for at least the past three years. As of yesterday, I’ve moved the site to Nearly Free Speech.net. I’ll be considering switching from Jekyll to another static blogging engine. In fact, I built one that I might resurrect.

My actions are small, and completely inconsequential to Github, but they mean something to me. I cannot, in good conscience, continue to support an organization run by an immature boy’s club. There is a sickness in the industry, something that has been pervasive in geek culture for years. The objectifying of women in the industry and our culture is damaging to everyone involved. One might not think that one woman getting harassed at a silicon valley darling is that big of a deal, not worth starting a tempest in a teapot, but is it? Is it really?

It is wrong to have business meetings at strip clubs. It is wrong to yell out sexual jokes across the office. It is wrong to treat women as being anything other than equals. Treat them as you would wish to be treated.

Culture is made up of who we are together. One person making a change might not matter, but it’s a start. Perhaps soon it’s one, then another, then another, and another, and eventually those who care become the majority, and the culture has changed.


Site Design Non-Update

March 23, 2014

The site design of jb was very nearly upgraded tonight. Well, upgraded is not quite the word for it. Changed is more accurate. Even though I’m quite happy with the look and feel of the site, from time to time I get frustrated with one aspect of it or another. I’ve spent more time that I want to admit thinking about readability, fonts, font sizes, spacing, kerning, and the like, but occasionally I’ll look at another site and think “that looks good”. And then mine looks like crap for a day or so.

The most recent bout of site envy came while reading a recent post by the brilliant Dr. Bunsen1. His entire site is worth reading, some posts several times. I decided to do a bit of HTML spelunking and see what the source revealed, and saw several references to the Pure CSS framework. I hadn’t heard of this one before, so I downloaded it and set up a new Jekyll powered site with the base blog layout. It looked fine, it works as advertised, but it would obviously take a lot of work to tweak it to look just the way I wanted it to.

After running through this exercise I went back and thought about what I don’t like about my site right now, and realized that it is not the overall look of the site that I’m not happy with, it is a few details that are nagging at me. For one, code syntax highlighting is not working, and for two, the Bigfoot footnotes were not lining up properly on the home page. I solved the latter problem by only showing only one post on the home page at a time, but the former is still bothering me.

The funny part of it is that one of the reasons syntax highlighting is not working is that I’m not using the default Jekyll Markdown converter. In order to get footnotes to work the way I want them to, I’m using Kramdown, which doesn’t use Pygments, but can be configured to use Coderay. I have the settings for Coderay, but so far they don’t seem to be doing anything. None of my inserted code is rendered with anything but “code” and “pre” tags. Ah well, this site remains, as always, a work in progress.

It’s always a good exercise to try out a completely different way of doing things. Even when I decide to scrap the work and keep things the way they are, I still count it as progress made.

  1. Whom, if you are not following, you certainly should. 


For The Fun Of It

March 1, 2014

I still need an anything bucket, and nothing fills that gap like my old friend Yojimbo. I was an early adopter of Yojimbo, back with version one, and I upgraded faithfully for version 2 and version 3, but I held off for a long time on version 4. In the mean time I tried Evernote, DEVONthink, Pinboard, and just the file system to fill the void that Yojimbo filled so gracefully. No more, I’ve come home, and it feels great to be here.

Back before I used a Mac for work, I used it for fun. It was fun to grab random stuff off the web that I wanted to keep and save. I like collecting things, mainly maps, pictures of old 60’s era Volkswagens, and British motorcycles. I also like to grab quotes I’ve found inspirational, designs that I love and want to go back to, funny pictures of cats and dogs, and whatever other random thing catches my eye.

When I bought my first iPhone, I found that I wanted to be able to collect things on the go as well as on the web. Pictures of artwork at a store, or a quick note about a blender. Without a proper Yojimbo client for iOS, most of that stuff was lost. I tried to use Evernote or DEVONthink To Go, but neither tool really clicked with me.

Nothing else works like Yojimbo. The web clients like Pinterest are too slow, and Pinboard is too basic. I can’t just browse through pictures of things in Pinboard. I really don’t like having to rely on the web. As long as I have a Mac I can get to my Yojimbo database, one way or another.

Yojimbo feels right. Not for work, not for a project management system or detailed information store. That’s not what I use it for; I have a system for that. Yojimbo is for everything else, all the fun stuff that I find and want to keep. In the end, Yojimbo 4 works great, and recaptures some of the magic that made me fall in love with the Mac. I keep it just for the fun of it.


Converging Mobile and Desktop Environments

February 10, 2014

Computing has been on a linear progression towards smaller, more mobile, and more personal devices for seventy years. It seems unlikely to me that the notebook computer is going to be the last iteration of “real” computers for the foreseeable future. Critics can point to the failure of Windows 8 as proof that the market doesn’t want a converged device, but I would argue that they simply went about it the wrong way. There are two different interaction mechanisms between mobile and desktop, but the infrastructure below the user interface could be shared.

What if the desktop was an app? Everything inside of your desktop computer, the entire world of OS X, wrapped up in an app that launches automatically when your mobile device is docked. If your phone rings, pick it up and your desktop goes away for a few minutes. When you are done, put it back.1 It’s not ideal for everyone, but it is an interaction model that would work. It’s a trade off.

When your iPhone is not docked, there would be no need for desktop metaphors in the iOS user interface. Sit down to do some work, and you have everything you always had in OS X, including the Terminal. Windows could have done this too. When the device is mobile, show the Metro interface, when it is docked, default back to a Windows 7 interface. I’m not alone, Canonical is working on this for Ubuntu. However, with Ubuntu’s spotty record for usability, stability, and performance I have doubts about Canonical bringing a viable product to market. I have high hopes, but I think this is going to have to come from Apple. Once again, they won’t be the first to market, but they have the opportunity to be the first on the market to do it right.

I think the argument that the phone hardware is not powerful enough to do this is shortsighted. History has shown that hardware becomes faster smaller over time, it is conceivable that the current “desktop class” chip in the iPhone 5S could run all of the applications on your desktop right now, if they were recompiled for the architecture. Will desktop hardware always be more powerful than mobile? Probably. Will it matter? Probably not. Why? For the same reason we don’t all have servers sitting on our desks, we just don’t need that level of power in our day to day tasks.

There are obviously many pitfalls to this concept as well. What about those notebook computers? They could be shells where a phone slides into it like a CD-ROM does today, though that sounds a bit clunky. Perhaps a better idea is that if you still need a notebook than you get one, but maybe more and more people will not.

I wrote about this topic for OStatic last year, and I stand by what I said. The Ubuntu phone concept does look like the future of computing, what I can’t see is how far out that future is.

  1. Or, you know, answer the phone in an OS X phone app, like Skype. 


Command-T Crashing Vim

January 27, 2014

For some reason today when I opened up MacVim and hit ,t to navigate to a file, MacVim crashed. The terminal spat out an ugly, and unhelpful error about “deadly signal SEGV”, but knowing that I just invoked the Command-T plugin, the error was easy to track down. Command-T is not like other plugins that I have installed with Pathogen, it lives on its own and is not updated as a Git submodule.

To fix the error, all I needed to do is download the latest version of Command-T as a “.vba” file and run through the install again. The install procedure is fairly simple:

To install open the vimball archive in Vim:

vim command-t.vba

Then source it:

:so %

The C extension must also be then compiled; for instance, if Vimball installs your plugin files in ~/.vim, then you would do this:

cd ~/.vim/ruby/command-t 
ruby extconf.rb 
make 

And now everything is back to normal. Command-T is a great plugin, I recommend it. My latest adventures in Vim are available on Github, if you’d like to follow along.


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.