Talks from the 29th Chaos Communication Congress are beginning to appear online.
They can be downloaded from the official mirror or viewed on YouTube. There are a number of interesting talks that I’m planning to watch.
They can be downloaded from the official mirror or viewed on YouTube. There are a number of interesting talks that I’m planning to watch.
The blogroll is a standard feature of most blogs that is conspicuously absent from the current version of this website. In the past I’ve struggled to keep my blogroll up-to-date. In order to be useful, I think the blogroll should contain only blogs that I am currently reading. That list fluctuates frequently, and I have a poor track record of keeping my blogroll in sync with my feed reader. One of the problems is that I regularly read many blogs, but there are very few blogs out there whose every post I enjoy.
But I use microblogging to share links. So, why not just continue with that method? When I created the latest version of this blog I decided to do away with the blogroll entirely. Now, when I read a blog post that I particularly enjoy, I blog about it. Like here or here. When I come across a blog that is full of wonderful posts, I blog about it too – and, chances are, I’ll still end up blogging about individual articles on those websites. All of these microposts are assigned the blogroll tag.
To me this seems like a much more meaningful way to share links. Rather than maintaining a separate page with a list of not-frequently updated links, you have the blogroll tag archive. Links are timestamped and curated, which makes it more useful to my readers. And I think that linking to specific content rather than full domains makes for a more useful and rewarding metric for the owners of the linked blogs.
(The greatest, of course, is Dune.) In 1973, the BBC recorded an 8-episode radio series of Asimov‘s Foundation Trilogy. The show is now in the public domain and available for download at the Internet Archive. It’s well done. When I read Foundation I failed to continue past the original trilogy into the later work. This show has encouraged me to revisit the books.
As a long-time user of Unix-like systems, I prefer to do as much work in the command-line as possible. I store data in plain text whenever appropriate. I edit in vim and take advantage of the pipeline to manipulate the data with powerful tools like awk and grep.
Notes are one such instance where plain text makes sense. All of my notes – which are scratch-pads for ideas, reference material, logs, and whatnot – are kept as individual text files in the directory ~/documents/notes
. The entire ~/documents
directory is synced between my laptop and my work computer, and of course it is backed up with tarsnap.
When I want to read, edit or create a note, my habit is simply to open the file in vim.
1 |
|
When I want to view a list of my notes, I can just ls
the directory. I pass along the -t
and -r
flags. The first flag sorts the files by modification date, newest first. The second flag reverses the order. The result is that the most recently modified files end up at the bottom of the list, nearest the prompt. This allows me to quickly see which notes I have recently created or changed. These notes are generally active – they’re the ones I’m currently doing something with, so they’re the ones I want to see. Using ls
to see which files have been most recently modified is incredibly useful, and a behaviour that I use often enough to have created an alias for it.
1 |
|
Recently I was inspired by some extremely simple shell functions on the One Thing Well blog to make working with my notes even easier.
The first function, n()
, takes the name of the note as an argument – minus the file extension – and opens it.
1 2 3 |
|
I liked the idea. It would allow me to open a note from anywhere in the filesystem without specifying the full path. After changing the editor and the path, I could open the same note as before with far fewer keystrokes.
1 |
|
I needed to make a few changes to the function to increase its flexibility.
First, the extension. Most of my notes have .txt
extensions. Some have a .gpg
extension.1 Some have no extension. I didn’t want to force the .txt
extension in the function.
If I specified a file extension, that extension should be used. If I failed to specify the extension, I wanted the function to open the file as I specified it only if it existed. Otherwise, I wanted it to look for that file with a .gpg
extension and open that if it was found. As a last resort, I wanted it to open the file with a .txt
extension regardless of whether it existed or not. I implemented this behaviour in a separate function, buildfile()
, so that I could take advantage of it wherever I wanted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
I then rewrote the original note function to take advantage of this.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Now I can edit the note ~/documents/notes/todo.txt
by simply passing along the filename without an extension.
1 |
|
If I want to specify the extension, that will work too.
1 |
|
If I have a note called ~/documents/notes/world-domination.gpg
, I can edit that without specifying the extension.
1 |
|
If I have a note called ~/documents/notes/readme
, I can edit that and the function will respect the lack of an extension.
1 |
|
Finally, if I want to create a note, I can just specify the name of the note and a file with that name will be created with a .txt
extension.
The other change I made was to make the function print a reverse-chronologically sorted list of my notes if it was called with no arguments. This allows me to view my notes by typing a single character.
1 |
|
The original blog post also included a function ns()
for searching notes by their title.
1 2 3 |
|
I thought this was a good idea, but I considered the behaviour to be finding a note rather than searching a note. I renamed the function to reflect its behaviour, took advantage of my ls
alias, and made the search case-insensitive. I also modified it so that if no argument was given, it would simply print an ordered list of the notes, just like n()
.
1 2 3 4 5 6 7 8 |
|
I thought it would be nice to also have a quick way to search within notes. That was accomplished with ns()
, the simplest function of the trio.
1 2 |
|
I chose to change into the note directory before searching so that the results do not have the full path prefixed to the filename. Thanks to the first function I don’t need to specify the full path of the note to open it, and this makes the output easier to read.
1 2 3 |
|
To finish it up, I added completion to zsh so that I can tab-complete filenames when using n
.
1 2 |
|
If you’re interested in seeing some of the other way that I personalize my working environment, all of my dotfiles are on GitHub. The note functions are in shellrc, which is my shell-agnostic configuration file that I source from both zshrc and bashrc2.
People are impassioned on both sides, and much of what I’ve seen in the popular dialogue are people leaving behind rational discussion in favor of flaming the other. The Kontradictions blog has one of the most balanced pieces I’ve seen on the issue of an “assault weapons” ban.
(via Ben)
They are trying to purchase another petabox (that’s one quadrillion bytes). Donations are being matched 3-for-1 till the end of the year, so now is a good time to give them money and support digital archiving.
Statistically, 38° is the “oh-my-god-we’re-all-gonna-die slope”. An inclinometer is a useful tool to carry to help evaluate the potential of a particular slope. There’s no replacing hands-on training, but Bruce Temper’s Staying Alive in Avalanche Terrain is an excellent resource for learning more than you want to know about avalanches. (If you live in the northwest, you should give money to the Northwest Weather and Avalanche Center. They do good work.)