HTML tag matching with MatchTag

In answer to this stackoverflow question, I wrote a ftplugin for vim that highlights the matching HTML tag when the cursor is positioned on a tag. It works in much the same way as the MatchParen plugin. You can find it on vim.org, github and there is discussion going on at reddit.

I hope you like it. Let me know!

Using a Wiki

I have been using a wiki, every day without fail, for over a year now. My decision to start was a moment of inspired genius. So inspired, that I feel it deserves to be written about. By writing about mine, hopefully I can convince you to start using a wiki too.

When I talk about my wiki I’m really talking about my ‘personal wiki’. I make use of Wikipedia often but that’s not the advice I’m dolling out here. No, my personal wiki, Viki, is no encyclopaedia. It is far more useful than that.

OK, so I use a wiki, but what do I use it for? The short answer is: everything. Honestly. I’m wiki obsessed. I keep track of my entire life in my wiki. Over the course of a year I have replaced every scrap of paper, sticky note, flagged email, to-do list, etc. with a single unified digital home. At current time of writing, according to wc, I have bashed a total of 3,938,965 characters into my wiki. I use it a lot.

To start with, all of my notes are in my wiki. I don’t keep them anywhere else. Why would I? In a wiki they can be easily cross-referenced, read and searched for. Not to mention I type at over a hundred words per minute. It would be insane to even consider taking notes by hand. Now all of my notes, on every subject I care about, are in one place. Convenient.

I don’t use browser bookmarks any more. I keep links in my wiki, where they are in context with the project that I’m working on or the notes on the subject that I already have. Infinitely more useful, relevant and remembered.

I no longer have paper to-do lists. Instead, I have tasks scattered throughout my wiki where they are in context with the material they relate to. Tasks can now link to any relevant notes and websites. I can also move tasks around, add further notes, re-order, prioritise and remove them without ending up in a mess. Tasks are one of the main things I use my wiki for and I’ll have more to say about how I use them later.

Every project I work on has a page in my wiki. I can keep all of the project related material I care about in one place. Notes, to-do lists, check-lists, links, design ideas, documentation links, notes on problem resolution. If useful, I can link directly to source files and build scripts. When working on projects, more often than not I remember when I solved a problem and not how. With a wiki I can easily go back to that project and look up my notes on it.

I even keep sensitive information like bank details and passwords in my wiki. These files are of course encrypted. That is the joy of working with a wiki. I can keep all of this information together, working in any way I see fit, not within the constraints of a program. Plain text allows you to do anything: including encrypt it.

I use my phone’s address book less now. I no longer add every contact I meet to it. Instead I add that person’s name and details to a relevant part of my wiki. In six months when I need to get in contact and I can’t remember their name: I no longer play the ‘browse my phone trying to jog my memory’ game. Instead I search my wiki for something related to that person and (bam!) there they are. Of course, I add them to my address book if I actually need to call or email them.

I could go on and mention never losing reference and policy numbers. I could mention not having to hunt around for my passport number or that budget code I really should have memorised by now. I no longer need to worry about remembering my shopping list. When I think of a cool present to get someone: I now have a place to write it that won’t be lost forever. I have seriously only scratched the surface. I’ve only mentioned the obvious stuff; but I think I’ve made my point.

My wiki allows me to easily keep track of all of this. It’s better than that though. By making it easy I actually use it and the more I use it the more useful it is: the more I want to use it. You can see how that’s a good spiral, right?

Great, so I’m really organised and I’ve got all this useful information in one place where I can actually find it. That, right there, is a really excellent reason to start using a wiki. I’ve noticed two further things that make using a wiki a great idea.

Firstly, the quality of my work has noticeably improved. At first I thought a wiki might slow me down. I feared I may end up spending more time messing around with a wiki than getting useful work done. Far from it. Using a wiki to get organised and plan things has given me an extra focus. When good ideas pop into my head I can record them in a place I know they won’t be forgotten. This frees my mind from having to remember the idea and allows me to concentrate on the task at hand. The same can be said for when I remember something that needs to be done. I add a task to my wiki and I confidently progress knowing it won’t be forgotten. My wiki acts as a safety net allowing me to move forward knowing that I’m not forgetting anything.

The single best reason to use a wiki though is this: making a habit of recording ideas generates more ideas. I had read about this phenomenon in the rather excellent book Pragmatic Thinking and Learning by Andy Hunt (of ‘The Pragmatic Programmer’ fame). It is hands down, without a doubt, true. I am generating more ideas than ever before. I just happen to be in the great ideas business — who isn’t? — and if great ideas are rare then surely having more ideas should lead to more chances of a great idea.

If I have done my job properly you are now salivating at the idea of using a wiki. It’s going to change your life. I’m going to talk now about my set-up and how I make using my wiki convenient. Hopefully I’ll be able to share some tips and tricks. If you’re not interested crack on and start your wiki. That was the real purpose of this blog post.

There is more wiki software available than you can shake a stick at and I’ve tried almost none of it. Personally, I use Vim, so the Viki plugin is very convenient. It was a really great start but I must admit I have modified it over the last year to fit me better. If you can write code I recommend picking wiki software that you feel comfortable customising to your needs. It is very satisfying getting a piece of software to work exactly as you like. Now, having said that, I have heard very good things about TiddlyWiki and Emacs’ org-mode. If you do use org-mode you may wish to check out this page. It’s full of great advice and is aimed at org-mode users. This is a nice blog post about TiddlyWiki.

The Viki plugin defines a special mark-up for tasks. This really sold it to me. Tasks stand out on the page and you can customise the priority, date, tags and any contacts it relates to. This is all very helpful.

I like to keep my tasks in the context they belong in. For example, tasks relating to a project all end up in that project’s page. This is great for staying sane but leads to tasks being scattered everywhere. VikiTasks to the rescue. This excellent plugin extends Viki by scanning my wiki files as I write them, looking for tasks that it then indexes. I can pull up a window showing me today’s tasks, this week’s tasks, tasks with a certain tag, tasks with a certain contact, tasks containing this word but not that word with this tag but not that tag to be done in the next 3 days for John. Excellent.

I have a key-stroke mapped in Vim that allows me to pull up tasks due today very easily. This makes staying on top of things trivial. I also try and tag things as either ‘work’ or ‘home’. This makes viewing the right tasks at the right time a breeze.

On an average day the first thing I do is open my wiki. I then spend 10-15 minutes going through relevant pages marking tasks to be done today and possibly updating priorities and notes. This enables me to organise my day and get a clear picture of what it is that I’m trying to achieve. I can pull up VikiTasks at any time to jog my memory. A nice bonus to this is that the more I do it the more accurate I get at estimating how long things are going to take.

I don’t follow any organisational programs like GTD. I like to work the way I like to work. I do, however, find the idea of organising pages into location-based categories useful. I found it easier to manage my wiki once I had broken it down into five broad categories: ‘home’, ‘work’, ‘out’, ‘abroad’ and ‘notes’. Every page in my wiki now stems from one or more of these categories. That way I can quickly navigate to the right set of pages based on where I am and what I’m likely to be trying to achieve. For example: my work projects fall under ‘work’, my shopping list is in ‘out’ and my travel insurance information comes under ‘abroad’.

I keep my wiki on all of my computers and preferably with me wherever I am. This is easier said than done. DropBox should make this easy but I am completely paranoid and don’t want to put my data in their merciless death grip. I have chosen select pages to keep in my DropBox that I don’t mind them having access to. These are pages, like my shopping list, where having access to their latest content on my phone is a Godsend. Every page that is linked in my DropBox is clearly labelled: just in case I forget.

For keeping the whole wiki in sync across machines I use Git. This works very well and also has the added bonus of keeping a historical record of my wiki by versioning everything. You never know when that useless information deleted today will no longer be useless tomorrow.

I use PlantUML for creating diagrams in my wiki and then linking to them from within my wiki itself. I can’t recommend this software enough. I use Ack to search it. Due to the little mark-up and mostly plain text of a wiki I can organise information in any way that makes sense. I’m not constrained in any way. This also means that I can use the full array of Unix tools, all designed to manipulate plain-text, against my wiki. It is then trivial to script anything that is useful.

Lastly, it’s worth noting that not everything can be done with a wiki. When it comes to working out an idea or piecing together a diagram nothing will ever beat pen and paper. For the times when this is necessary nothing beats my trusty gridded Moleskine. Notebooks suffer from many of the faults I’ve listed above but for me the biggest is the difficulty in searching them. For this reason, I always try to enter any notes I take back into my wiki. At the least, I make a note in my wiki that I have a useful diagram in my notebook.

Hopefully this blog post was helpful. If you decide to use a wiki let me know how you get on. If you already use a wiki, let me know what crazy use cases you’ve dreamed up that I might not have thought of.

Introducing GTD

I would like to introduce the world to my latest creation: GTD. I find it immensely useful; hopefully you will too.

Get Things Displayed (GTD) is a small utility application that enables displaying text and images in large on your primary display. Text and images can be displayed immediately or set on a timer using a rich variety of ways of expressing the time-out. Both relative and absolute times are possible. Once displayed, a ‘notification’ can be dragged anywhere and can easily be dismissed by pressing escape. Notifications float on top of all windows so they cannot be accidentally missed.

My new web game: Ribbon

After working on and off this for the last couple of months I’m pleased to release my latest project: Ribbon. Ribbon is an open source HTML5/JavaScript game. The idea is to fly the ribbon through the cave avoiding all of the obstacles and walls. See if you can get one of the all-time top scores. Good luck!

You can play the game here.

Here’s a screenshot to tempt you.

It’s written using entirely valid HTML5, CSS3 and JavaScript, sorry IE users.

I hope you enjoy the game. If you have any issues please feel free to use the issue tracker on the GitHub page.

Announcing Sofia 0.3

I am pleased to announce that I have just released Sofia 0.3. Sofia is a Mac OS application that allows you to keep tabs on your personal book library. It scratches my personal itch and hopefully is useful for others too. You can download the latest version here.

This release includes the following improvements:

  • Smart list criteria has been expanded and includes new dynamic filters such as relative dates and book lists.

  • You can now use the smart list criteria to create temporary filters on any view, including current smart lists.

  • Huge improvements to efficiency, mostly related to memory usage.

  • The Coverflow view is much more responsive and has been refined further.

  • Reviews, provided by Amazon, are now working again.

  • Identified and ‘plugged’ a lot of memory leaks.

  • Bug fixes and UI improvements.