Saturday, December 31, 2011

Track Your New Year Resolutions With

I know, I know, it’s a bit of a cheesy title to promote my Open Source project but here me out - it really does work. Though I didn’t really write it to track my new year resolutions (I’ve never found them effective beyond a week), I did write it out of constant frustration with not finding a TODO productivity tool that stuck with me.

Let me explain… I’ve tried EVERYTHING!
  • Google Calendar & tasks
  • Sending myself Emails
  • Wiki (Dokuwiki, Mediwiki, Twiki etc.)
  • Tomboy
  • Tomboy with UbuntuOne & Android App
  • EverNote
  • Remember the Milk
  • Gedit notes on my desktop
  • Post-it notes widget
  • Actual Post-it notes
  • Old-skool diary
  • Pieces of paper including backs of payment receipts
From the above list, if anything came remotely to sticking as a habit, then it’d be the sticky notes & pieces of paper. I’m not suggesting the other methods suck, but I wouldn’t use it beyond a couple of weeks.

Why was it that despite me spending hours on a computer, the best thing that had a chance of remotely working was old-skool pen & paper? And then it hit me. A good todo App should be:
  1. In your face!
  2. Really simple to use (like pen & paper)
  3. Did I mention in your face?
Now my solution isn’t for everyone. At this moment, it is intended ONLY for fellow geeks who spent a lot of time in the command line (GNU & UNIX only), and I call it

What is, pronounced “I do”, but really a roman play on, is a command line todo list manager that uses a simple text file and simple MarkDown syntax to track your todo tasks. The beauty of using MarkDown syntax is in it’s resemblance to the natural way we jolt down text on a piece of paper. is optimized around querying tasks as opposed to updating tasks. For entering and updating tasks, it uses a plain old vim text editor, which has syntax highlighting for Markdown built-in. If vi is not your thing, then it’s relatively easy to configure another editor by exporting the shell $EDITOR variable.

The other main design goal I had was to make it into a standalone shell script which could stand (mostly) on its own. Except for standard shell commands like sed, grep and bash itself, it doesn’t demand much.

But the main power of comes ONLY (and I repeat ONLY), if you modify your shell to :
  1. Define an easy alias (such as t) which can be used to summon from anywhere within the shell
  2. You modify your $PS1 shell prompt to update it with the pending number of tasks (this is the in your face bit)
The second one point above is important, if you plan on actually using it productively, for there is nothing like an App stalking you with a reminder of how many things you have left todo.


You can download a tarbar ball of from github. Then just extract it to your home directory, make the shell script executable (just in case) and finally copy the sample todo.markdown to your $HOME
 $ tar zxf
 mv\* ~/
 chmod +x ~/
 cp ~/ ~

Though is now usable, you should create an alias in order to make it more accessible and add it to ~/.bash_profile or ~/.bashrc
 echo "alias t='$HOME/'" >> ~/.bashrc

Finally the most important step of adding a counter to your SHELL prompt is semi-automated via!
 ~/ -S "$PS1" >> ~/.bashrc

Your all set! You might want to logout and login or do a source ~/.bashrc
Note: if you would rather relocate the todo.markdown, for instance in your Dropbox folder then use the -f option.
 echo "alias t='$HOME/ -f $HOME/Dropbox/todo.markdown'" >> ~/.bashrc


Now the fun begins! Lets start with the most basic.
 t -h

    Version: 0.6.1

    Usage: [-f todo_file.markdown] [-T topic_number] [options]

    Options :
     -e          Open TODO file using $EDITOR
     -n          Count number of pending tasks. Can be filtered using -x, -X etc.
     -X          Filter to show only pending tasks
     -x          Filter to show only completed tasks
     -i          Filter to show only important tasks
     -t          Filter to show only topics with topic_number
     -C          Don't colorize output (useful for piping)
     -H          HTMLize the output
     -S "$PS1"   Will return modified PS1 prompt to contain pending task count
     -h          Show this help screen

    By default, we expect a ~/todo.markdown to be in your $HOME if not overridden 
    by the -f option. Refer to for examples of 
    creating this file.

To edit a file using vi or $EDITOR
 t -e

Using markdown syntax to maintain todo.markdown is simple. You start out with a main heading called a topic.
  # Weekly Activities

or using the alternate style
Weekly Activities

Next you start your list of tasks as a bullet * list
* Come up with a BIG idea
* Implement BIG idea and be awesome

You could further break up your topic into subtopics as follows:
# Weekly Activities

## Entertainment

* Watch a Movie
* Go bowling


* Go to gym at least 3 days a week
* Play some wii sports
As you might have guessed the --- are the alternate form for a sub level topic. This way you have have multiple top level topics followed by sublevel topics, having tasks at each level.

Now we got the data entry part sorted, lets see how we can query the task list.
 t output

Will show all your tasks using terminal colors.

To filter tasks to show only pending or only completed ones:
 t -X
 t -x

To filter by topic, so that it only shows tasks belonging to one topic including it’s sub topic:
t -t

1: # Weekly Activities
2: ## Entertainment
3: ## Excercise
4: # Home Work

t -T 1

The above will show everything up to topic 4 (Home Work)

To count the number of pending and competed tasks
 t -X -n
 t -x -n

To update the task to mark it as complete, place an x in front of the task
* x Take out the trash

To mark a task as important, place an ! mark in front of it
* ! Go to gym at least 3 days a week

To mark a task with a high priority, place the priority number in front of the task
* (1) Finish history essay

Finally, has two options that customize the output. The first option is to turn off color which is handy when you want to pipe the output of with more unix commands.
t -C | grep '^*'

The other option is to export the todo list as html
t -H > ~/todo.html html output

Other Uses

Besides tracking my todo list on a daily basis, I’ve recently found another use for - track my bookmarks. I know, your probably thinking of delicious or firefox/chrome bookmark syncing but for me those solutions just don’t cut it. For one, I use about 3 browsers and finding old bookmarks can be a real pain. So now I just use an alias with a custom bookmarks.mdown
alias bm="$HOME/ -f $HOME/Dropbox/bookmarks.mdown"
Another use was to keep track of lecture topics by marking them off as I taught them over a period of two months. I also use it to keep track of some interesting quotes I come across, just for inspiration.

See also

Watch a talk I gave to introduce at RefreshColombo

Saturday, October 22, 2011

Remembering Steve Jobs

The passing of Steve Jobs came in as an instant shock that morning as I was reading the news on my phone. While it wasn't as much of a surprise as when MJ passed away, mainly because I had seen that one photo of Steve wearing a black gown coming back from the hospital, something inside me felt empty. When many flooded the social media and TV with messages of condolences and looking back at his achievements, I just watched not sure how I should express the loss.

So after about a week later, when I was asked if I can do a talk on Steve Jobs for Refresh Colombo, I immediately and almost impulsively said YES! But I still wasn't sure what I wanted to say. One thing I did know was that I didn't want to recap his life or accomplishments like I knew the guy.

Soon after accepting the talk, the next thing I almost instantly realized was that I needed to get Chanux in as a co presenter, not because we've recorded so many episodes of a podcast together but due to his reaction to Steve's death, which surprised me even more than Steve's death itself.

Why the majority of the people reacted the way they did will probably take a book to investigate, rather than a simple blog post, but I suspect it's complicated. So rather, I asked myself, what is it about Steve Jobs that I'm mostly going to miss. The keyword here being mostly, I realized I was going to miss his persona, his insight, his principals and his approach to doing things. And so that is what I decided the talk should be about - what made Steve great, or rather insanely great!

Myself and Chanux started doing brain dumps of Steve quotes which captured his philosophy just from the top of our heads. The way I saw it, if we couldn't really remember a particular quote and had to research on the Internet then it hasn't really had much of an impact on us personally. And so except for looking for some great images of which suited the slides, we didn't much go looking for his quotes. Consequently this probably means we might have not got the quotes in verbatim accuracy.

What follows is our presentation slides which we delivered last week. By highlighting these tidbits, we hope that it will inspire you to think differently about what you are currently doing before it is too late. Because our time on this planet is quite limited and even if we believe we're coming back it doesn't matter when it takes a new form factor with a completely new UI and Operating System!

Saturday, September 03, 2011

Getting Down With Markdown

Recently I've been looking for an alternative to docbook, which I've used for most of my tutorial handouts and internal developer documentation at Thinkcube. But the more I used it docbook the more I wanted a simpler solution which didn't require me to make sure my XML was in order.

Naturally, at first I thought I'd try Latex since it had a pretty good wrap with geeks and has even surpassed usability expectations set forth by some of the mainstream wordprecessors :). What I loved about Latex was you could concentrate on the content first and formatting later. Its legendary ability to output desktop publishing quality documents and convert to a variety of formats such as html, pdf or odt was a killer.

Just as I was about to dive into Latex, Chanux suggested Markdown as an alternative. Hmm, Markdown, I pondered... I even liked the sound of it. It turns out Markdown is even better! You could think of it as a simplified wiki syntax but a better description would be to call it a WYSIWYG wiki syntax.

I've always endorsed the KISS philosophy. There is nothing more simple and satisfying than to write a text file using vim and track its progress via git. After briefly going through the syntax, I realized this is exactly what I needed. I also realized that I had already used Markdown without actually thinking about it as part of using github for a pet project. Everything about Markdown was all good and the whole controversy around Markdown's html compiler names were exactly the kind of celebrity gossip it needed to grab attention!

It was around this time, I was due to create a note for a tutorial for the ICTer workshop myself and Dr. Ajantha from UCSC was to deliver. By now, I had decided on Markdown with upskirt (yes this is one of the controversal names) to create the notes but what about the slides? Could I use Markdown for that as well? After a little looking around, I found a wonderful system called Landslide which enabled me to compile Markdown syntax into a beautiful html5 slide show presentation. After a little playing around I managed to build slides as well as the note using a single markdown source code! How cool was that? I will write a separate post soon on the HOWTO details but for now enjoy the slides, if thats your cup of tea. My Markdown adventures don't end there. This post too was written using Markdown and converted to html using octopress.

Thursday, August 11, 2011

There's something about Lion!

So it's been a little over a month since I switched to MacOSX Lion as my primary desktop after running Ubuntu and before that Gentoo on this Macbook. So why'd I finally switch? Well I'm sure it comes at no surprise to existing mac owners who mostly run OSX anyways.

I'm different! I owned two Mac's to date, first a MacMini G4 (PPC) since 2006 and now a Macbook Aluminum since 2009, both primarily ran some flavor of Linux. Sure I had OSX lying around in another partition, but I'd only boot into it once in a while, just to update or checkout an interesting app or two.

Linux was what i used, not because OSX was bad (like Windows is) but because I was more comfortable with it, it was more flexible, had more innovation happening (pretty much every 6 months) and above all it was fun to use. Part of that fun was really the do-it-yourself attitude Linux has had for years but is somewhat fading away IMHO with distros such as Ubuntu. Its also no secret that I like the OSX interface and have tweaked my desktop in the past to resemble it somewhat. At the time, what made me buy a Mac was not the OSX interface. I really bought the Mac for its beautiful hardware design and higher build quality despite Linux not being treated as a first class citizen on it.

After years of owning other laptops I was fed up! I recall my first ever laptop, a Sony Vaio back in 2000 which only lasted 3 months before the disk died. Coupled with my project manager's ignorance it would later never be able to have a hard drive! Years later I bought an IBM thinkpad which worked fine except that the plastic frame around the LCD started to crack one day as I opened or closed the lid and over time the crack increased to the point it was crippled as a portable device. My next HP pavilion developed a random boot feature (especially when compiling or transcoding) which I could never reproduce to get a replacement and lastly the Acer which had far too many problems to mention before it too died. Seriously people, whats a good Laptop thats reliable? Is Dell reliable?

When I first saw Lion being previewed at one of the Apple events I brushed it off as the same old OSX with an iPad like icon interface, which they now call Launchpad. It wasn't till the recent WWDC event when they showed off the full deal that I got an urge to install it. And so I pondered, "How do I get this beast on here?". My Mac partition was small and had less that 2GB free. I hardly had room on my Linux partition either to get away with a resize. Besides I knew Lion would not install with Linux lying around as the installer wasn't that smart to deal with it. I decided, it was time to delete the Linux partition!

Now I'd like to say it was a sad move which I pondered for days like when you have to move to a new place, leaving your friends behind. It really wasn't! I don't miss leaving Ubuntu. Not a lot at least...

And I ask my self, why am I not missing Ubuntu as much as I missed Gentoo or Debian before that. IMHO, Ubuntu isn't fun anymore. It was even somewhat frustrating to use with the new Unity interface being default and I tried to install Gnome 3 over it. That didn't go too well. It's not just in the GUI but also in the command line where things aren't that much fun. It just too easy! and you mostly don't need it. Don't get me wrong - this is all good and Ubuntu is doing fantastic work for getting Linux to the mainstream. Its just not that fun as say Gentoo or even Fedora. But the reason I'm not switching isn't because Ubuntu is not fun or because I'm frustrated with Ubuntu. I'm really not! If that was the case, I would have switched to another distro like Mint or Debian.

Lion had a few features which I thought was neat and fun to explore. One such feature I really like is full screen apps on its own desktop being a built in feature of the core OS. This is a usage pattern I was quite used to when working with multiple desktops on Linux. I'd always open several apps in maximized form and move them to their own desktop and switch between them using control + arrow keys. But its better on the Mac...

  • Your not limited by the static number of multiple desktops. On Linux I sometimes run out of desktops

  • It's an app feature so the desktop is automatically created and destroyed as you click the new full screen button found on the titlebar

  • Apps are in true full screen (no titlebar or menubar)

  • ..and my favorite, it supports 3 finger swipe in addition to the keyboard short cut. Its really fun swiping between multiple desktops

Gnome3 looks promising in this respect as it too has the concept of dynamic desktops. Unfortunately it resets your desktops to always having just one and you have to create them all the time, which is more annoying than having a static number of desktops.

The other killer feature I like in Lion is support for multiple versions of a document. When Apple introduced "Time Machine" back in the day, the UI looked cool but it was not so practically usable as I would imagine as you needed an external hard drive in order to do continuous backup. Unlike what many speculated to be the adoption of ZFS and its online snapshotting capabilities, it turned out to be a far less elegant method under the hood. I doubt its as elegant as ZFS even with this feature because the underlying filesystem is still HFS+ but it works quite well in a practical manner for apps that makes use of this new API (Apple's own apps at the moment). Whats really cool is that the same time machine like UI is adopted to browse the different versions of a document where you can even copy & paste objects between versions.

The automatic save and resume of application's state between reboots is another interesting feature worth studying about. Again it only works for apps that use special APIs but essentially the app is hibernated and resumed as opposed to the whole OS. As a result its a lot faster. The ability to access documents by file type regardless of where its stored in the filesystem is another good usability feature which I always wanted the Linux desktop to have. In a world where hard drives are large and there are too much clutter, the filesystem organization is really a bottleneck. I don't think Lion nailed it either but its a good start. Vista tried and failed with WinFS. Google, beagle (now tracker) and Spotlight's approach of giving a search engine doesn't quite scale in my opinion. You'd think search would work, especially from Google but the more I think about it the more it seems to me that, we think Google is awesome because it finds the information we're looking for and gives us an answer - not necessarily the the needle in a haystack. For instance I really find Gmail frustrating for finding a mail which I vaguely remember about. Desktop search breaks down as opposed to web search because it is needle in a haystack problem but I digress!

There seems to be tons of other small technological as well as usability features of Lion and OSX which are pleasant having around and are interesting to study. So to summarize why I switched, its not one single thing but many things. I'm looking forward to the MacOSX command line and I've already started exploring it with the help of O'Reilly's book "Mac OSX for Unix Geeks". It was only recently after arriving at OSX, I really appreciated the bonjour protocol and its implementation on Linux via avahi. Most Linux users don't know that they can ping their neighbors machine without DNS or IP address but merely using the machine's hostname with .local appended to it. When did you drop in to a command line on Ubuntu and try running avahi-browse -a or avahi-discover?.

Trying to install LAMP on MacOSX I realized how frustratingly fun it was. It was like going back to the Redhat 9 days of manually enabling apache modules. There is also Mac Ports which is akin to Gentoo's portage where you download and compile apps, which is fun!

Having said all this, there is so much more of little things that I like (such as being able to right click on a word and look it up or have it read me the text via the excellent TTS which can also be done on the command line using the say command) and some things that are annoying like Finer (file browser) not supporting tabs, cut & paste of files or ability to delete without first sending to the trash. And I hear printer configuration is also non intuitive if your coming from Windows/Linux despite it using CUPS. I also find it using a bit more memory than usual on some apps and as a result my 2GB is almost fully used making it too slow for running Virtualbox.

All in all, I'm pleased with the move and look forward to learning more of its underlying intricacies and BSD origins in days to come. There sure is something about Lion!

Monday, August 01, 2011

Why read when you can listen?

There's an old quote, "Reading makes a full man". I'm not quite sure who said it but I know it's got to be at least a couple of years older than myself because I was introduced to the concept early on by my dad. Despite the early infusion of such words of wisdom, I really never turned out to be a good reader.

For one, I could never read on a moving platform for more than 60 seconds without feeling nauseous. Forget about reading in bed either, for more than 40 - 60 minutes (my record might be about 90 minutes) before the book starts slapping my face multiple times as I loop over the same paragraph of text over and over before giving up and falling asleep!

When I do get into the mood of reading, it still seems to take me much longer to finish a book when compared with, oh I don't know my sister! She's got a ton of books, almost all novels and I remember seeing her finish them fast.

So early on as a kid, I realized, my reading time was precious and best spent on things that I ought to really care about. Things that add real value as opposed to mere entertainment. As a result, I hardly read fiction or even science fiction for that matter but instead resolved to science fact books like astronomy, GW Basic programming and my favorite - books on magic. This was probably early signs of my geekiness.

Eventually I did get around to reading fiction (and sci-fi) in limited quantities and throughly enjoyed it. I got "what the fuss was about", but still felt it was a waster of effort which I could substitute with watching the movie.

Now don't get me wrong! I love books as much as the next guy. I have a shelf full of books and a few more overflowing around the house. The problem is, I have way too many books that I've started to read but never finished. Fortunately almost all of them are computer books. More recently though, I've had better success completely reading books thanks to the Kindle because I can carry it around.

And then I decided to try out audible. They had a couple of deals which they advertised often on Amazon (amazon owns it), but only made me consider after listening to a sample of a book I owned and loved.

My first audio book which I purchased and downloaded was "Contact" by Carl Sagan. It was one of the few sci-fi books I already owned and read only because I fell in love with the movie. It was also one of those rare stories in which I felt the movie was as good (if not better) as the book even though the two had a considerable difference to the story line. After hearing a sample narration of the audio version by Jodie Foster, I wanted to download it immediately. Contact was my catalyst (aka killer book) for getting on the audio book bandwagon.

Since then I've picked up several books, fiction and non-fiction. While I won't mention them here, I will mention one great book I just finished today listening to and which made me want to write this post. The audio book is none other than "The hitchhiker's guide to the galaxy (HHGG)" by Douglas Adam and narrated by Stephan Fry. Unlike Contact, I had never read the book though I owned it and always meant to get to it. Having obsessively listening to it the past week, even falling asleep to it, I admit this was probably the best narration I have ever heard of anything so far, ever! (not that it's saying a lot given my geek background, but I do have good taste!)

Before I conclude this post which I didn't expect to be this long, I'd like to throw in this food for thought. Was my dad right about the "Reading makes a full man?" quote or is reading overrated? Should reading even be considered as an optimal means of consuming knowledge or gathering information? I mean think about it! We live in an age where information is available at the tip of Google but its mostly just text which needs to be read. The more you think about it, the more you realize that reading is the "last mile" bottleneck between information and your brain.

I am not saying reading and writing must die! I do feel reading fast (skimming) might be more efficient to discover the relevance of information than listening. Writing and reading what you've written might also be more useful for gathering thought. What I am debating is whether once the message has been devised (through iterative writing and reading), delivering that concise message need always be done via text to be read.

Why then are we still fixated on reading? Is reading a legacy practice that's been passed from generations and one that made perfect sense when it was the only viable means of recording information? If so, given today's rich multimedia options, why aren't we switching our primary medium?

The answer may well be the generation gap. Perhaps we will realize once the kids who are now growing up in a world of podcasts, youtube and interactive games decide what to do with it when they rule the world. What do you think? Should I stop writing and just stick to podcasting after all?

Friday, July 29, 2011

It's true, I'm on a Lion

Greeting fellow bloggers and no I'm not dead. Blogging for me has got to a point where its a post or two per year! So at this point it doesn't matter what I say because I doubt any of my old followers are going to read this any time soon.

As usual, I would have blamed busyness (a result of %s/y/i/) and twitter but honestly speaking it was the absence of the mood which killed it. Lately I've been doing so much of writing at work, the last thing I want to do is come home and do more of it. So instead, I'd prefer to pretend to hack on some C/C++ or Ruby or PHP and play some PS3 and call it a day.

Today was different, it was our celebration of the International Sysadmin's day. So unlike my typical day, I went to a bar and talked geek with fellow sysadmins, all the while munching away on bites and sipping on some free beer (free for now, IOU Deep). During our conversation, amidst the noisy band that was playing, one of the things, I came out and confessed is the topic of this long awaited post.

And since I'm in my geeky little mood, I thought I'd share my confession - I run Mac OSX Lion! Further more I run Mac OSX Lion, wait for it....., at the expense of Linux.

Now for the random reader this might not be such a surprise. Apparently you can't go to a conference in the US without seeing 90% of the devs on a Mac. But I'm not the type to join a mono culture for the sake of it. Those who know me, knows I've had this Macbook since the days of Mac OSX Leopard but 99% of the time it was running on Ubuntu.

So what happened? Why'd I switch? My answer isn't the stereo typical "I'm a Mac fanboy", "Linux is frustrating" or "I want it to just work" sort you'd get. Its much deeper than that.

Stay tuned....
(P.S. Don't worry it's not 42 and I'll try to get to the post soon!)