a working for loop

So I was sorting through my org-mode files and I found a little snippet of code that I had lying around. I’ve had a problem with shell scripting for a while. I use bash a lot, and I’ve written a few functions, and procedural scripts that I’ve found useful in my travels, but anything that requires “logic,” often escapes me in tragic and epic ways.

Here’s the problem. I had a directory of notes that I had compiled for presentation in an ikiwiki blog for notes. As I wanted these notes to be in my org-mode system, I needed to take a directory of 60 or so files, and turn them into a single org file. As an additional bonus, I needed the files to be organized by date rather than by the alphabet. Also, as ikiwiki generated page titles from the filename, I needed to capture that information in the org-mode file. Here’s what I came up with

for i in `ls -t`;  do
   echo -e "$i" >> ~/org/legacy_notes.org &&
   cat "$i" >> ~/org/legacy_notes.org ;
done

It works as a one liner, but it works. I think previous attempts have left out crucial semi-colons or the do and done statements. No clue. Baby steps folks.

keyboard review

A few months ago I got a Happy Hacking Keyboard because, hey, I’m a writer and a GNU/Linux guy, and I use almost entirely keyboard driven software/desktop environment a good keyboard seems like a reasonable investment..

So after a few months, what do I think? The keyboard is great. I don’t miss the keys, I like having everything in reach, I like being able to have my tea close and not have to move as far for the mouse when I need it. Additionally, and you wouldn’t believe how true this is, but the keys feel so nice to type on. It’s nosier, the response is good (not buckling springs good, but quite nice), and I defiantly feel the difference between it and other computers (let alone laptops; I tried to type on a MacBook the other day, and it was quite nearly painful.) If anyone is looking for a new keyboard, this is defiantly one to consider, and if size is an issue, then I (probably) wouldn’t consider anything else.

Keep on typing!

Wordpress Limitations

Wordpress is great software, and I’ve been a user for many years. Many years. It used to be called “b2” and I used it then as well. There are a lot of more powerful content management systems, a lot of systems that are much more flexible than wordpress these days, and often I get the feeling that other platforms attempt to define themselves in contrast to wordpress. In the larger sense, this post is an attempt to resist this temptation while also exploring the limitations of wordpress.

Wordpress is a pure blogging engine: it provides interfaces for writers to publish weblogs (blogs), manage content (to some degree) and generate pages based on templates. Before wordpress, blogging was done either by hand edited text files, or by systems that complied static HTML from some sort of database.1 Wordpress is an improvement because it’s easy to install, it’s reliable, and pages generate dynamically on viewing, rather than just when the site owner hits “save” or “rebuild.” In the end, we discovered that systems where managing “websites” was divorced from (even simple) server management had a great democratizing effect on content, and that’s sort of the core of wordpress.

Because wordpress is designed to be a blogging platform, it doesn’t need to be as flexible as other generalized content management systems. Flexibility comes at the cost of complexity, and developers decided that in some cases, less was, in fact, more. There are a lot of things that you could do with b2 (albeit with some hacking) because the site generation/templating system was much less rigid, at the same time, it was much easier to get sites with broken links, and bad pages, particularly as you changed from theme to theme. That’s bad, and it seems pretty reasonable to me to want to avoid that.

The end result is a program that does almost everything you could want it to do as long as you only want a blog, if you try and stretch it too far it simply won’t work. Well it will work, but the advantage of using Wordpress to manage a website that isn’t a blog (or very similar to one) disappears quickly when you have to impose informal limitations on how you enter content in the system to generate well formated pages. It’s a slippery slope, and you’d be surprised how quickly a site goes from being a standard Wordpress site, to requiring customized themes, specialized content entry patterns. And pretty soon, a lot of the things that make Wordpress “simple” and “essay,” aren’t really available to your new site. That’s the limitation of Wordpress.

Knowing where the line is, is often the largest challenge in Wordpress development, and being able to say, “you know, this is the kind of site that you really want to be building with Django, or Drupal, or Rails, or Expression Engine,” Or even saying “you know this is the kind of site that we could probably do more effectively using flat files and PHP includes. Wordpress is great, and in the cases where it’s well suited to the task at hand, it’s the ideal solution. In other situations? Less so.

Onward and Upward!


  1. Interestingly, this whole “static site compiling” is making a come back, because it turns out that dynamic page generation doesn’t scale as well as we thought it would five or six years ago. So we have static site compilers and complex caching tools. What comes around, goes around I guess. ↩︎

PIDA

A few weeks ago, a friend told me about this IDE (integrated development environment) called PIDA, and while I’m nothing more than a casual programmer, my interest was immediately piqued.

We’ll call it part of my interest in how programmers work. The truth is, as a text-editor junkie, my impulse is to say “meh, IDEs are passe,” but I think that’s probably unfair, and in my writing IDE post I think I recognized--by analogy--their worth. In any-case there’s something sort of nifty about PIDA: rather than recreate tools, it just makes use of what’s already there: the editor is emacs (or vim), the version control system is whatever you want (and already use). PIDA just brings all these things together in a nifty little package.

On the one hand, it’s not a really big deal. Cobbling together working software from a bunch of different existing tools isn’t particularly new. This is sort of the basis of unix-like computing, and further more it tracks the ways most people/geeks actually use computers: by finding the best tools for all of the jobs they have to do and then using them. This way of interacting seems to hold true for command-line and graphical users, I think. So rather than recreate the wheel, PIDA just uses all the existing wheels. The saddest part is that we don’t see more things like this in the graphical application world.

The end result of this mode of application development is that we’re given/build powerful tools that function in familiar ways and that are more powerful as a result of their integrations.

And that’s about it.

I initially thought that this was going to be a really long and really blathering post about integrated tools, and the power of open source/free software to allow tools to be combined rather than be forced to compete. While these are indeed important issues, they’re pretty self explanatory, and IDEs like PIDA provide a great example of how this can be the case, so much so that I find myself saying “why aren’t there more programs like this?”

Why not indeed?

Mobile Technology 2.0

In the last six months or year (or two years) I’ve written a lot here, about technology open source software and related topics. In a way this was a new thing for me. I majored in Women’s Studies and Psychology in college. I wrote about gender and queerness, and knitting for many years. My big thing (or one of them, at any rate) is science fiction literarture, where I’m interested in very historical/“soft” sub genres. While some SF writers feel ghettoized by the “hard”/“soft” boundary in the genre, I love the fact that there’s (a very popular) field of science fiction that isn’t based on firm understandings of existing science/technology and tightly formed elaboration thereon. I love being non-technical on some level. Despite my current technological musings, this is very much a past that I must contend with.

But I digress.

Before all of this hippy-drippy stuff, I wrote a lot about technology. Back in 1999/2000/2001 I was reasonably active in the discourse surrounding mobile technology. Indeed through this I discovered blogging itself. There are a couple of subtitles to this that I think are appropriate: first, the state of mobile technology about 10 years ago was much different than it is today. Much different. Laptops were significantly bigger and less portable, cellphones were much less “smart,” and disconnected PDAs were the light of the times.

But sooner rather than later, I broke down, bought a nice fountain pen and just kept a notebook when I was away from my computer. It worked. Eventually I got a cellphone, but I always tended toward the “dumb”-phone type that were incredibly simple. They worked. The paper worked. When I went away to college I got a 12 inch iBook (as my only computer) and it was great. Small laptops with wireless and long battery life seem to be a great solution to the “mobile technology” problem, and as--at the time--it seemed like my life/work was trending around in a different direction, I stared writing about different things, which when you think about it is all for the best.

For the intervening years, I’ve been sort of cool toward a lot of gadgetry. Laptops are small enough and powerful enough and frankly cheap enough (considering) to account for a huge percentage of digital mobility, that the remaining need is actually pretty small. And it was my experience that mobile technology wasn’t there, for the in between spaces yet. Recording bits of minutia in a usable way on a PDA was never quite as quick and seamless as doing it either on a computer or with paper.

Eventually I’ve gotten back into writing about technology, but by this time it was a different kind of technology: unix/linux stuff, cyborg stuff, tools for writing, usage methodologies, and organization stuff. The technology itself (for me) has taken a backseat to the ways we use technology.

But in the mean time the mobile technology has mostly caught up. At least somewhat. Cellphones became a lot smarter, the data transmission got cheaper (and unlimited), syncing tools through google and mobile me (if that’s your style) make the experience much more coherent. In a lot of ways, the fact that cellphones and connected devices can--independently of host computers--interact with the internet has made them infinitely more useful. And the fact that, at least in my case, do this via protocols that we’re already familiar with (REST API’s or email) makes this even more attractive.

I also think, at least in some cases, that a lot of this “web 2.0 stuff” makes the most sense in the context of mobile devices. While I don’t often think about twittering, or dicking around on facebook when I’m sitting somewhere with just my Blackberry, the applications that connect with these web 2.0 services on phones are really clever. Maybe it’s that limited functionality apps make more sense on phones/PDAs than they do on desktop computers, but that could just be me. In the end, I’m still dubious of all this “web stuff,” but I think it at least makes sense now.

So there.

Onward and Upward!

Dual Head Setup

Before I made the switch to linux, my only computer was a single macbook. Great machine, and in addition to not being able to (really) use Awesome, I was pretty frustrated by the lack of screen space. I was (and do) need to filter through lots of different kinds of documents and I felt like I was spending half my time sorting through any of the several dozen (!) windows that I kept open. As a result one of my chief requirements for the new system was having the ability to run a 2 monitor (dual head) setup.[^DH] I was even willing to sacrifice1 some raw power for this.

So here I was with a dual head setup, and a sort of lackluster idea of how to use all this new space, aside from the visceral knowledge that needed more room. I’ve tried a few things to try and use the space, but I continue to feel as if I haven’t found the right way to use this space.

I should preface this by saying a word about my window management software: it revolves around the notion of “tags,” which are similar to virtual desktops, so while I only look at 1-5 windows on each monitor there are many more than 5 windows open and running at anyone time.

My first attempt was to create task-centric virtual desktops, so that there were tags for windows that had to do with work, tags that had to do with fiction writing, tags for browsing the web, tags for chatting, tags for interacting with the system and so forth. This was an epic failure, as the joys of a multi-tasking operating system are that they allow you to have a number of different processes running in parallel, and if you have you window manager setup to constrain your to one task per screen then you’ve basically shackled your computer into only being able to do two things at once. Which is both distracting (as you end up hiding needed windows, or disregarding the established tagging systems. I also found that in an attempt to use both windows, I ended up using the middle half of each monitor more than I used the outer half.

My second attempt was to have a primary/secondary monitor setup, with my keyboard in front of the left screen which had most “action” related tasks (writing, email, etc.) and the right screen was for reference materials (web, chat, pdfs, etc,) and I’ve tried both organizing tags based on task/sphere, and also based on window type (so that “work” happened in more ad-hoc spaces). Neither works particularly well.

My current attempt is still largely based on the main/reference mode of operation, except I’ve made things a bunch less rigid, and mixed things up a bit to see if this makes things a bit easier to work with. I have background processes on the left monitors: email, web, file management on the left; org-mode files, and chat on the right. And then, I have writing spaces and adhoc workspaces on the left, with work and some project-specific workspaces on the right.

I’m not sure that this is the best thing. There’s a dynamic workspace/window tagging library, but I haven’t really tried it out, and I want to test things out on the laptop (one screen) first.

There’s got to be a better way of doing this. On one level this is a problem of riches, (how do I use all this space I have), but on another it’s a much more simple problem that addresses focus and the way that we present/organize information on our screens Thoughts?

Onward and Upward?


  1. It turns out that monitors these days cost a quarter of what they cost 5 years ago. In point of fact I was able to get both monitors and a new computer for what a single LCD cost the last time I had a desktop computer. Imagine that. ↩︎

Integrated Writing Environment

My post about information buckets got me thinking, thanks to some other things that have filtered through my awareness in the last few weeks, about integrated development environments.

See, a couple years ago, I used everything buckets like mad, they were the application of the future, the software that seemed to just scratch every itch. I don’t know that I used them as general databases for everything but I did all of my writing and research-related tasks in them, and it was great.

The articles I read where there, along with the notes that I made, along with citation information, along with the final paper. Along with all of my previous papers and articles. I never had to go look for things again, it was all there.

This is similar to an IDE, or integrated development environment, which is a class of applications that have some measure of popularity amongst computer programmers. IDE’s generally (and I’m not clear on this, as I’ve never used one) provide tools for managing large projects and integrate with code-compilers, debugging tools, version control tools, multi-file project managers, and code browsers which allow you to find related parts of code across an entire project without scrolling through a lot of files. I think there’s probably some debate on weather these are good things for programmers (objections would include that they make for lazy/poor practices, and that IDE components do lots of things poorly) but generally I suspect they are good things. And as it turns out most of our beloved text-editors have a lot of IDE-like functionality anyway.

In a way, the information bucket provides an IDE-like environment for the information worker or writer. And that’s sort of a cool way of looking at this. Indeed, I think writers need better integrated environments, there are a lot of tools that I think we could benefit from. While I’ve been working on these posts, I’ve also been working on posts about the emacs org-mode, and while they’re ultimately not directly connected, I think something like org-mode is a great boon to writers and information workers. Integrated systems that manage citations, references, and notes are essential, as well as other helpful features that might include managing output, structure, and version control.

I hack most of these features together in emacs with some help from LaTeX, git, and BibTeX, but I recognize that this isn’t ideal or for everyone. There are other applications that aren’t “information buckets,” but provide writing environments that aren’t hacked from programing tools (emacs) or desktop publishing tools (MS Word). For example: Scrivener that provides a clever way to write longer form documents with structure, and Celtex that provides all sorts of screenplay writing tools (outlines, storyboards, character databases) and script management tools. Celtex even calls itself an “Integrated Media Pre-production” tool.

I’m not sure that these are the ideal tools for this task. Any of them. I’m partial to my solution, but I end up having to do a lot of informal organization to make it all stick together. So I wonder, what kind of software do other writers to keep all their ducks in a row?

More later. Of course.

mcabber and IM

I’ve always rather enjoyed this post that I wrote about instant messaging programs. My issue is that I use IM a lot. A lot. I communicate with colleagues, friends, and frankly, if you want to get a hold of me, IM is often the best way to do this, and frankly for a lot of communications I prefer it to the phone.

Nevertheless, IM clients, on the whole, are mostly pretty bad. Right? They distract, they filter information poorly, they take up a lot of room on the screen, and are as a class pretty inconsistent. This is probably because no one really expected people to use instant messaging technologies in a serious way.

But here we are.

The leading IM client, really, for people who rely on this kind of thing is Pidgin (and the other libpurple based clients), which make it possible to connect to lots of different services at the same time but only have one roster/buddy list. It’s a good solution to the “multiple networks/accounts” problem, but the truth is the quality of the implementation varies, and the user interface is… awkward and rigid1.

There is, however, this program called mcabber that provides the ability to connect to one xmpp account, in a terminal-based (ncurses?) environment. It’s not perfect, nothing is, but its a lot better than the other options.

While I’ve not been able to switch to using only it for my IMing needs for a couple of reasons, mostly related to my xmpp server/provider, but I have used it exclusively for a number of days and the experience is pretty good. Reasons I like it:

  • Everything lives in one window, and chat windows have equal footing, like buffers in emacs, say. That’s really nifty.

  • The key shortcuts are really simple, and quite intuitive. Thats key in a terminal application

  • I can run it in screen, and pull the screen over ssh to my laptop when I’m not in front of my computer. Though xmpp is generally really great about multiple connections, sometimes it’s best to not have to deal with that fussing.

  • I like that it supports PGP encryption, though I don’t have anyone with whom I can encrypt conversations with, but that always seems to be a minor detail.

    Though, this isn’t to say that it’s all good. There are some problems that I’ve had. Though to be fair, my complaints here are much fewer than with most other XMPP clients, so that’s a good thing, right? Complaints:

  • No support for service discovery. Which means you have to install psi--basically--if you’re serious about getting the most out of XMPP. This is… unfortunate.

  • It takes a lot of work to get configured and get key bindings set up. I’m mostly of the opinion that it’s always best to give users a set of key bindings to start with and then let them customize as needed, and the default screen layout isn’t particularly useful or economical (put the status window at the top, and make it smaller, for starters).

  • It doesn’t support multiple connections/user-ids. This is a biggie, and while I don’t (really) object to the fact that it doesn’t support other protocols, I think the reality is that most users probably have and need to use more than one identity at once, so that’s a noticeable hole.

  • I’d also like an easy interface for producing system notifications give me a setting option to pile messages (username, excerpt of x characters, time) to a pipe (|) and I’d be very happy indeed.

  • I couldn’t decide if the fact that there was only one “text entry field” (mini-buffer) for all outgoing message buffers. Which meant that, particularly with scroll back, that it was easy to cross contexts unintentionally.

My last complaint isn’t so much a complaint about the software itself as it is a complaint about the instant messaging space in general. Basically, I think there has to be a way to filter this kind of communication. Ways to setup client-independent rules regarding statuses, auto-responders, and notification level. I’ve said that this should be “along lines of procmail,” but I don’t quite know what, even that, would look like. But someday, it’s coming, and I for one can’t wait.

But all in all. It’s a great program and you should check mcabber out, if you’re intense about jabber/xmpp and instant messaging (and living in the console).


  1. So there was a pretty notorious fork-threat in the Pidgin project a while back over a sort of deterministic user interface decision, which I return to every now and then as an example of both intra FOSS project politics gone awry, and user interface design gone awry. I’m not dredging up the flame war, because the truth is I really hate GUI applications writ-large, so on some level its nothing specific. ↩︎