Sunday, July 17, 2011

Awesome Tool to Justify Text: Par

I recently came across a problem: I wanted to format text in my favorite text editor (vim) in a very specific format. Lines should have a maximum of n number of characters on them, and it should justify properly, nice and pretty, and I shouldn't have to think about it. It should be automagic.

I came across a utility called par. It's a very powerful utility that can process a block of text into an organized format, and I think not enough is being said about it!

http://jmcpherson.org/par.html

It's an open-source project, and it adopts one of the core tenets of the Unix philosophy: do one thing, and do it well.

All I can say is when I use it, it does all the magic I need it to do, and in a sense, the technology 'disappears.' It's a funny thing to say that since it is a tool designed by a technical person, for technical people (very few non-techies use vim). But it's true, even at this relatively deep level of technology, the really good tools... simply disappear.

It's coming across gems like these that make me wonder why we put up day in and day out with all the poorly written, poorly designed software out there. From the cruft of Microsoft Word, to the sluggishness of Firefox, we have to put up with these things regularly.

A lot of it has to do with the fact that writing good software is actually quite hard. But most of it is really to do with our intransigence. We get used to a toolchain and refuse to be flexible and move around.

I think a bit more toolchain promiscuity would make us all a little happier.

2 comments:

  1. Toolchain promiscuity! Madness! The dead rising from the grave! Human sacrifice! Dogs and cat(1)s living together! Mass hysteria!

    Sorry, I had to say it! I agree completely about being flexible with tools, letting them compete with each other for our favour. I'll check out par sometimes, but with TeXShop, I really don't have to worry about justifying text.

    ReplyDelete
  2. Aah, LaTeX! :-) Alas, I never had the opportunity to use that tool for professional output. I look forward to that day!

    I actually needed par to format my git commits, since I set vim as my editor (and they have some cool syntax highlighting plugins for git).

    But it's optimized to work with code commenting too, which is super-handy.

    ReplyDelete

Labels

About Me

My photo
Singapore
I write essays in my spare time on things that are important to me. The ones that I feel are any good, or make any sense, I put them up here. :)