<?xml version= "1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <atom:link href="http://www.hylkebons.nl/journal/rss/" rel="self" type="application/rss+xml" />
    <title>Journal - Hylke Bons</title>
    <link>http://www.hylkebons.nl/journal/rss/</link>
    <description></description>
      <item>
      <title>The CLI (1): Getting help</title>
      <description><![CDATA[<p>This is part one of the series “The State of the <abbr>CLI</abbr>”. There’s a lot to write about, but let’s start small: how helpful are command line tools and how do we acquire help?</p>
<h2>“Help!”, I mean, “Hilfe?”</h2>

<p>You’d think that getting help on certain commands is the most straightforward thing ever, but I’ve found that this isn’t always the case. Most commands carry help screens and documentation, but the way you access these may vary.</p>

<p>If you’re a bit more familiar with the <abbr>CLI</abbr>, you’d probably start by running the command accompanied by arguments or options that may show you the help screen. These will be different depending on who provided it (eg. <abbr>GNU</abbr>, or <abbr>BSD</abbr>): <span class="cmd">help</span>, <span class="cmd">--help</span>, <span class="cmd">-help</span>, <span class="cmd">-h</span>, <span class="cmd">?</span>, and <span class="cmd">-?</span> are all possibilities (I will discuss the different option styles in a different post). I’m trying to figure out how this new command works. This is a bit like someone nagging who’s asking for help because they didn’t say "please" correctly in the right language. This is mostly due to Linux distributions shipping tools from many different projects. Overall though, <span class="cmd">--help</span> seems to be the safest bet.</p>

<p>A less proactive approach would be to pretend to be clueless and pass a bogus argument or option to a command. If you’re lucky, you’ll be shown some information on how to get to the help screen.</p>

<blockquote>
<span class="command">hbons@slowpoke:~$</span> ip --foo<br />
Option "-foo" is unknown, try "ip -help".<br />
<span class="command">hbons@slowpoke:~$</span> mkdir --foo<br />
mkdir: unrecognized option '--foo'<br />
Try `mkdir --help' for more information.<br />
<span class="command">hbons@slowpoke:~$</span>
</blockquote>

<p>We didn’t get what we wanted in either case here, but at least we’re being led into the right direction.</p>

<p>Lastly, and probably most obviously, you can launch the command without any arguments at all. Some commands will give you the help this way. There is a downside to this kind of investigation, however. Running a command blindly can have unintended consequences, and may actually be dangerous due to inconsistency between different commands (“will this trigger an action, or show me the help?”).</p>

<h2>Handholding (or not)</h2>

<p>The access to useful help differs greatly between commands. This is what the <abbr>BSD</abbr> version of the <span class="cmd">ls</span> command does:</p>

<blockquote>
<span class="command">hbons@slowpoke:~$</span> ls --help<br />
ls: illegal option -- -<br />
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]<br />
<span class="command">hbons@slowpoke:~$</span>
</blockquote>

<p>It doesn’t look particularly useful at all. It lists all the option that you can possibly enter, but there’s no indication of what any of these do, nor are there any hints about how you can find out. Even if I was more experienced using this command, it’s hard to see how a line like this could be helpful.</p>

<p>The <span class="cmd">git</span> command line tools are short but helpful when you do something wrong. You’re being pointed to the help:</p>

<blockquote>
<span class="command">hbons@slowpoke:~$</span> git unknown<br />
git: 'unknown' is not a git command. See 'git --help'.<br />
<span class="command">hbons@slowpoke:~$</span>
</blockquote>

<p>Additionally, these tools have a nice mechanism built in that tries to guess your intentions when you’ve made a typo, or when you’ve entered a command that doesn’t exist:</p>

<blockquote>
<span class="command">hbons@slowpoke:~$</span> git pu<br />
git: 'pu' is not a git command. See 'git --help'.<br />
<br />
Did you mean one of these?<br />
&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;pull<br />
&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;push<br />
<span class="command">hbons@slowpoke:~$</span>
</blockquote>

<h2>Documentation</h2>

<p>In addition to help screens, most commands have a good (sometimes overwhelming) amount of well written documentation available. It’s just a matter of how you get to it. The vast majority of commands ship with what are called “man” (manual) pages. Documentation on a command can be retrieved by running the <span class="cmd">man</span> command with a subject (command name) as an argument. There’s also the <span class="cmd">info</span> command by the <abbr>GNU</abbr> project, but it doesn’t seem as commonly used.
Some commands have pointers at the end of their help screens on how to get more detailed help and documentation. Good examples of this are <span class="cmd">git</span> and <abbr>GNU</abbr>’s version of <span class="cmd">ls</span>:</p>

<blockquote>
<span class="command">hbons@slowpoke:~$</span> ls --help<br />
<span class="command">[...]</span><br />
Report ls bugs to bug-coreutils@gnu.org<br />
GNU coreutils home page: &#38;lt;http://www.gnu.org/software/coreutils/&#38;gt;<br />
General help using GNU software: &#38;lt;http://www.gnu.org/gethelp/&#38;gt;<br />
For complete documentation, run: info coreutils 'ls invocation'<br />
<span class="command">hbons@slowpoke:~$</span> git --help<br />
<span class="command">[...]</span><br />
See 'git help &#38;lt;command&#38;gt;' for more information on a specific command.<br />
<span class="command">hbons@slowpoke:~$</span>
</blockquote>

<p>Do you have problems getting help with commands, or do you have opinions or tips on how to make things better? I look forward to your feedback, please <a href="../../about#contact">let me know</a>.</p>
]]></description>
      <link>http://www.hylkebons.nl/journal/the-CLI-1-getting-help/</link>
      <guid>http://www.hylkebons.nl/journal/the-CLI-1-getting-help/</guid>
      <pubDate>Tue, 11 Feb 2013 00:00:01 GMT</pubDate>
    </item>
     <item>
      <title>State of the CLI</title>
      <description><![CDATA[<p>Unlike most computer interfaces, the Command Line Interface (or <abbr>CLI</abbr>) hasn’t changed much over the last 30 years. Does this mean we’re in a good place?</p>
<h2>Pros and cons</h2>

<p>The <abbr>CLI</abbr> can be helpful in a lot of cases, but it has a bit of a learning curve. It allows you to do simple canonical things, but these things can be linked together in various ways that can’t often be done with Graphical User Interfaces (or <abbr>GUI</abbr>s). Thus sparing you from tedious repetitive labour.</p>

<p>Some applications also allow for command line interaction next to their graphical user interface, which makes them able to be integrated in automated processes.</p>

<p>In my opinion, the <abbr>CLI</abbr> sits about half way between raw programming and using a graphical application to get your tasks done. There are graphical applications that can give you a lot of control as well. A good example of this is <abbr>OS X</abbr>’s <a href="https://support.apple.com/kb/HT2488">Automator</a>.</p>

<p>It may be that your product provides (or requires) some interaction on the <abbr>CLI</abbr> level. Now how do you go about doing this right?</p>

<h2>GNU and BSD</h2>

<p>Linux distributions are a mixed bag of different programs, and so these programs don’t always behave in the same predictable ways. Most common commands originate either from the <a href="http://www.gnu.org/"><abbr>GNU</abbr></a> or <a href="https://en.wikipedia.org/wiki/BSD"><abbr>BSD</abbr></a> projects.</p>

<p>Superficially, <abbr>BSD</abbr> sticks more to the older Unix days, whilst <abbr>GNU</abbr> tries to come up with new ideas that makes their programs a little more convenient to use.</p>

<p>Eric Raymond’s <a href="http://catb.org/esr/writings/taoup/html/design.html">The Art of <abbr>UNIX</abbr> programming</a> goes into <abbr>CLI</abbr> interface design a little bit. The <a href="https://www.gnu.org/prep/standards/html_node/Program-Behavior.html#Program-Behavior"><abbr>GNU</abbr> Coding Standards</a> has something to say about the topic as well.</p>

<p>Overall, documentation and guidelines are sparse. As a developer writing software for Linux distributions, it’s not clear where one should go.</p>

<h2>Best practises</h2>

<p>The <abbr>CLI</abbr> is used most often by people that are more familiar with computers, software developers, system administrators, and those who like to tinker. This doesn’t mean that the <abbr>CLI</abbr> has to or is allowed be a suboptimal experience on that level.</p>

<p>What’s noticeable is that there doesn’t seem to be much documented reasoning or motivation behind any of the <abbr>CLI</abbr> design decisions. Things mostly seem the way they are because of “historic”  reasons or tradition.</p>

<p>The next couple of months I’m going to to assess the <abbr>CLI</abbr> of various common software packages and write blog posts about them, to come up with a list of best practises that doesn’t conflict with the current state of utilities out there.</p>

<p>I’d like to explicitly mention that these will be best practises that are compatible with current conventions, not some new official “standard”. Having some rules that you can keep in mind, as well as knowing the reasons behind them. I don’t want to fall into <a href="https://xkcd.com/927/">the standards trap</a>.</p>

<h2>The usual suspects</h2>

<p>If you administrate a server, you’ve probably used commands from the following packages:</p>

<ul>
<li><a href="https://www.gnu.org/software/coreutils/"><abbr>GNU</abbr> coreutils</a>, a collection of basic tools, such as cat, ls, and rm</li>
<li><a href="http://www.gnupg.org/">GnuPG</a>, encryption tools</li>
<li><a href="http://www.openssh.org/">openSSH</a>, connectivity tools for remote access</li>
<li><a href="http://wiki.debian.org/Apt">Apt</a>, package management</li>
<li><a href="http://www.git-scm.org/">Git</a>, source code management</li>
<li><a href="http://curl.haxx.se/">cURL</a>, data transfer/download tool</li>
</ul>

<p>These are some of the tools I’ll be looking at.</p>

<p>To wrap up: this is not about redefining the command line experience, or creating some revolutionary alternative. rather to identify issues, streamline the process, and come up with some design patterns that may help you write a usable <abbr>CLI</abbr> application for Linux.</p>

<p>If you have any <abbr>CLI</abbr> pet peeves, know of commands that are really good/bad, or have any other tips or links you think I should read, please <a href="../../about#contact">let me know</a>.</p>
]]></description>
      <link>http://www.hylkebons.nl/journal/state-of-the-CLI/</link>
      <guid>http://www.hylkebons.nl/journal/state-of-the-CLI/</guid>
      <pubDate>Tue, 29 Jan 2013 00:00:01 GMT</pubDate>
    </item>
     <item>
      <title>SparkleShare 1.0</title>
      <description><![CDATA[<p>I’m delighted to announce the availability of SparkleShare 1.0! <span class="emote party"></span></p>
<h2>What is SparkleShare?</h2>

<p>SparkleShare is an Open Source (self hosted) file synchronisation and collaboration tool and is available for Linux distributions, Mac, and Windows.</p>

<p>SparkleShare creates a special folder on your computer in which projects are kept. All projects are automatically synced to their respective hosts (you can have multiple projects connected to different hosts) and to your team’s SparkleShare folders when someone adds, removes or edits a file.</p>

<p>The idea for SparkleShare sprouted about three years ago at the <a href="http://www.gnome.org/"><abbr>gnome</abbr></a> Usability Hackfest in London (for more background on this read <a href="#">The one where the designers ask for a pony</a>).</p>

<p>SparkleShare uses the version control system <a href="http://www.git-scm.com">Git</a> under the hood, so people collaborating on projects can make use of existing infrastructure, and setting up a host yourself will be easy enough. Using your own host gives you more privacy and control, as well as lots of cheap storage space and higher transfer speeds.</p>

<p>Like every piece of software it’s not bug free, even though it has hit 1.0. But it’s been tested for a long time now and all reproducable and known major issues have been fixed. It works reliably and the issue tracker is mostly filled with feature requests now.</p>

<p>The biggest sign that it was time for a 1.0 release was the fact that Lapo hasn’t reported brokenness for a while now. This can either mean that SparkleShare has been blessed by a unicorn or that the world will end soon. I think it’s the first.</p>

<h2>Features</h2>

<p>For those of you that are not (that) familiar with SparkleShare, I’ll sum up its most important features:</p>

<h3>The SparkleShare Folder</h3>

<p>This is where all of your projects are kept. Everything in this folder will be  automatically synced to the remote host(s), as well as to your other computers and everyone else connected to the same projects. Are you done with a project? Simply delete it from your SparkleShare folder.</p>

<h3>The status icon</h3>

<p>The status icon gives you quick access to all of your projects and shows you what’s going on regarding the synchronisation process. From here you can connect to existing remote projects and open the recent changes window.</p>

<h3>The setup dialog</h3>

<p>Here you can link to a remote project. SparkleShare ships with a couple of presets. You can have mulitple projects syncing to different hosts at the same time. For example, I use this to sync some public projects with Github, some personal documents with my own private <abbr>vps</abbr> and work stuff with a host on the intranet.</p>

<h3>Recent changes</h3>

<p>The recent changes window shows you everything that has recently changed and by whom.</p>

<h3>History</h3>

<p>The history view let’s you see who has edited a particular file before and allows you to restore deleted files or revert back to a previous version.</p>

<h3>Conflict handling</h3>

<p>When a file has been changed by two people at the same time and causes a conflict, SparkleShare will create a copy of the conflicting file and adds a timestamp. This way changes won’t get accidentally lost and you can either choose to keep one of the files or cherry pick the wanted changes.</p>

<h3>Notifications</h3>

<p>If someone makes a change to a file a notification will pop up saying what changed and by whom.</p>

<h3>Client side encryption</h3>

<p>Optionally you can protect a project with a password. When you do, all files in it will be e encrypted locally using <abbr>AES-256-CBC</abbr> before being transferred to the host. The password is only stored locally, so if someone cracked their way into your server it will be very hard (if not impossible) to get the files’ contents. This on top of the file transfer mechanism, which is already encrypted and secure. You can set up an encrypted project easily with Dazzle.</p>

<h2>Dazzle, the host setup script</h2>

<p>I’ve created a script called Dazzle that helps you set up a Linux host to which you have <abbr>SSH</abbr> access. It installs Git, adds a user account and configures the right permissions. With it, you should be able to get up and running by executing just three simple commands.</p>

<h2>Plans for the future</h2>

<p>Something that comes up a lot is the fact that Git doesn’t handle large (binary) files well. Git also stores a database of all the files including history on every client, causing it to use a lot of space pretty quickly. Now this may or may not be a problem depending on your usecase. Nevertheless I want SparkleShare to be better at the “large backups of bulks of data” usecase.</p>

<p>I’ve stumbled upon a nice little project called git-bin in some obscure corner of Github. It seems like a perfect match for SparkleShare. Some work needs to be done to integrate it and to make sure it works over <abbr>SSH</abbr>. This will be the goal for SparkleShare 2.0, which can follow pretty soon (hopefully in months, rather than years).</p>

<p>I really hope contributors can help me out in this area. The Github network graph is feeling a bit lonely. Your help can make a big difference!</p>

<p>Some other fun things to work on may be:</p>

<ul>
<li>Saving the modification times of files</li>
<li>Creating a binary Linux bundle</li>
<li>SparkleShare folder location selection</li>
<li>GNOME 3 integration</li>
<li>...other things that you may find useful.</li>
</ul>

<p>If you want to get started on contributing, feel free to visit the IRC channel: #sparkleshare on irc.gnome.org so I can answer any questions you may have and give support.</p>

<h2>Finally...</h2>

<p>I’d like to thank everyone who has helped testing and submitted patches so far. SparkleShare wouldn’t be nearly as far as it is now without you. Cheers! <span class="emote smile"></span></p>
]]></description>
      <link>http://www.hylkebons.nl/journal/sparkleshare-one-zero/</link>
      <guid>http://www.hylkebons.nl/journal/sparkleshare-one-zero/</guid>
      <pubDate>Thu, 13 Dec 2012 00:00:01 GMT</pubDate>
    </item>
     <item>
      <title>Switching jobs</title>
      <description><![CDATA[<p>Today was my first day at Red Hat!</p>
<p>This has been a public service announcement. :)</p>
]]></description>
      <link>http://www.hylkebons.nl/journal/switching-jobs/</link>
      <guid>http://www.hylkebons.nl/journal/switching-jobs/</guid>
      <pubDate>Tue, 03 May 2011 00:00:01 GMT</pubDate>
    </item>
     <item>
      <title>GNOME 3</title>
      <description><![CDATA[<p>It’s been released!</p>
]]></description>
      <link>http://www.hylkebons.nl/journal/gnome-3/</link>
      <guid>http://www.hylkebons.nl/journal/gnome-3/</guid>
      <pubDate>Thu, 07 Apr 2011 00:00:01 GMT</pubDate>
    </item>
     <item>
      <title>Announcing SparkleShare</title>
      <description><![CDATA[<p>I’m very happy to finally being able to announce a little project of mine that i’ve been working for the last couple of weeks.</p>
<h2>What is SparkleShare?</h2>

<p>SparkleShare is the result of  “Project SparklePonyP. At the <a href="https://live.gnome.org/UsabilityProject/London2010">Usability Hackfest</a> this year in London, a couple of us open source designers came to the conclusion that we don’t have a proper collaboration tool. We have been using <a href="http://www.dropbox.com/">Dropbox</a> for this for a while. Dropbox has a great user experience, but it has downsides as well: you can’t host your own server; it’s not open source and has some freaky things in its license agreement.</p>

<h2>Features</h2>

<p>So SparkleShare aims to replace Dropbox for us. There are some resemblances and some differences. SparkleShare creates a SparkleShare folder in your home directory in which you can add different remote folders (these can be on different servers). It has the same Dropbox like notification system, one feature that we really liked. It allows you to see what others are doing and take peek, much easier than sending around e-mails, forget attachments and add wrong CCs. The most important thing is that the synchronisation is automatic and happens when you add or edit files.</p>

<h2>Technology</h2>

<p>SparkleShare is build on Mono, <abbr>GTK</abbr>+ and wraps around Git. It aims to integrate with the <abbr>GNOME</abbr> desktop environment. I’m planning <abbr>OS X</abbr> and Windows versions as well (in that order).</p>

<p>There is no release out yet, as I’ve yet to fix some nasty bugs, but my programming skills are quite limited as of yet. So this is a…</p>

<h2>Call for contributors</h2>

<p>Help would be very much appreciated! Any kind of contribution would be great. Translations, bug reports, code, docs, it doesn’t matter. Check out <a href="http://www.sparkleshare.org/">sparkleshare.org</a> for links to the source code on gitorious. Join #sparkleshare on git.gnome.org if you have any questions</p>

<h2>Special thanks…</h2>

<p>…to <a href="http://jimmac.musichall.cz">Jakub Steiner</a> and <a href="http://www.twitter.com/lapz/">Lapo Calamandrei</a> for the awesome artwork and website design! <span class="emote smile"></span></p>
]]></description>
      <link>http://www.hylkebons.nl/journal/announcing-sparkleshare/</link>
      <guid>http://www.hylkebons.nl/journal/announcing-sparkleshare/</guid>
      <pubDate>Thu, 10 Jun 2010 00:00:01 GMT</pubDate>
    </item>
  
 </channel>
</rss>

