RememberTheMilk in the System Tray using Treb

I use RememberTheMilk to maintain my task list and it is quite frustrating to open the browser just to view my tasks for today. I discovered Treb recently and with it I can view my RTM tasks with a single click in a flash. Treb is an application that can be used to display mobile version of websites as separate clickable icons in the system tray. Treb keeps its instances refreshed in the background and so it is displayed instantaneously when clicked. A Treb instance of the RTM tasks due today can be downloaded here. All I needed to create the RTM instance was the URL of the mobile website, which is: http://m.rememberthemilk.com

 

KitKatTimer

“Have a break … have a Kit Kat!”

A lot of digital ink has been spilled about the problems of our sedentary lifestyles. Recently, I realized that sometimes I too was sitting in my chair working at the computer for 2-3 hours without getting up!

I wrote a tiny application called KitKatTimer that sits in the system tray and reminds me to take a break when I have been sitting on my bum for a long time. It is written in C# and uses Snarl to display its notifications. (For information on Snarl go here.) It knows when you are not at the computer by listening to the system idle, locked or asleep statuses. The code for KitKatTimer can be obtained here.

Snarl: Discard All Notifications While Away

Problem

By default, Snarl stores all the notifications that were generated while I am away from the computer (say I locked the computer). When I come back to the computer it displays a notification indicating how many notifications I missed while I was away and invites me to see them. Actually, I do not care about any notifications I miss while I am away from the computer, so it would be nice to just ignore or discard these missed notifications.

Solution

To always discard notifications while I am away, open Settings → Presence → Away. The default setting for When Away is Log as Missed. Change it to Discard and you will no longer be bugged about missed notifications.

Tried with: Snarl R2.5

Snarl

Lo behold, just a few weeks after discovering Growl for Windows, I have found something much more cooler: Snarl. Like Growl, Snarl is meant to gather and display notifications. But, I found it to be much better than Growl in its presentation and features. What is more, it can listen for Growl notifications and display them too. For example, I can continue to use the Growl addon I used in Visual Studio and have its build result notification show up using Snarl.

An added bonus is the neat set of applications that come built-in with Snarl. The Clock+ application displays a notification once an hour, reminding me that another hour has passed and acts like the chime of the grandfather clock from my childhood. The AudioMon application shows the current volume as a meter when I change or mute the volume using the buttons on my laptop or my Autohotkey volume shortcuts. The SysInfo application monitors system parameters like battery level and notifies when it crosses a threshold.

Snarl is packed with features and it takes a while to iterate through its settings. But I am pretty sure you will appreciate the attention to detail the developers have put into this app. The display of the notifications is tastefully done and it is a joy to see them pop up on the screen. (I think they resemble the look of GNOME.) In addition, Snarl ships with a lot of different notification themes and styles to suit your taste.

Tried with: Snarl R2.5 on Windows 7

Reader Addon for Firefox

I find that the form and layout of content in most webpages is detrimental to a distraction-free reading. Bad fonts are used and the content is squeezed in between photos, advertisements and links to other articles. So, for quite sometime now I have been using bookmarklets in Firefox that rendered the text content of a webpage in a distraction-free form for reading. At first I was using Readability and when it felt slow I switched to Readable. The latter has recently been bought by Evernote and has been repackaged as Evernote Clearly.

Both of the above solutions are fine, except that they both have a bit of latency when applied on a webpage. Thankfully, there are now Firefox addons that provide this same feature and I have been happy with one of them: Reader. This is based on Readable, and is much faster in rendering the content of a webpage. It uses a convenient shortcut too: Ctrl + Alt + R, R is for reading! To change the font, background color and other properties of its content display, just click its icon in the addon bar at the bottom of Firefox.

Tried with: Reader 2.1 and Firefox 9.0

Compares of Bottom-up Mergesort

It is fun to spot a mistake in a technical book. (Knuth has made it cool by sending out cheques to the error spotters.) Recently, I found a mistake while looking through the chapter on mergesort in Algorithms (4th Edition) by Robert Sedgewick and Kevin Wayne.

There is a proposition in the chapter which states that:

bottom-up mergesort uses between 0.5 N lg N and N lg N compares and 6 N lg N array accesses to sort an array of N items.

There is a small error in the proof. It states that:

the number of passes through the array is precisely floor( lg N ) which is precisely the value of n such that 2^n <= N < 2^n+1

This is wrong when N is not a power of 2. For example, if N is 7, then the array cannot be sorted in 2 passes, it needs at least 3, which is ceil( lg N ).

So, the correct statement in the proof should be:

the number of passes through the array is precisely ceil( lg N ) which is precisely the value of n such that 2^n-1 < N <= 2^n

I contacted the authors about this and was surprised when co-author Kevin Wayne promptly replied back confirming the error. He even added the correction to the errata webpage of their book :-)

C++: Static Class Definition

In C++, the static specifier is only meaningful when applied on functions and variables. But surprisingly, C++ allows static to be used on a class definition:

static class Car
{
    int _speed;
};

This specifier is useless on the class definition since it does not mean anything! This compiles successfully with with Visual C++, only generating a C4091 warning:

warning C4091: 'static ' : ignored on left of 'Car' when no variable is declared

This hints at the reason why C++ allows static on a class definition. It is to support the definition of a class and the creation of a static object of that class in a single statement:

static class Car { int _speed } fooCar;

The above is equivalent to:

class Car
{
    int _speed;
};

static Car fooCar;

Remember The Milk: Tasks Due Today

Problem

Remember The Milk is an online application that I use to maintain the lists of tasks I need to complete. I can assign a date-time to each task on or by when I want to complete it. But, most of the time when I open RTM what I want to see are the tasks (across all my lists) that are due for completion today. This includes tasks which are overdue.

Solution

RTM supports smart lists i.e., virtual lists that are the result of applying certain search operations on the tasks in the actual lists. To get a smart list of all the tasks due today and are also overdue, use the operation dueBefore: tomorrow.

MSI Afterburner

 

One of the coolest things about using a graphics card from MSI is their MSI Afterburner application. It is primarily meant for overclocking, but I think its monitor GUI is the best out there for GPUs. The user can pick the data he wants to be monitored (temperature, clock, memory usage and many more). These are displayed in real-time much like a heart-rate monitor. The values on the right show the current value, while hovering the mouse over any part of the graph shows the value at that time. The polling period can be adjusted and this application supports the smallest polling periods I have seen.

Tried with: MSI Afterburner 2.1.0 on a NVIDIA GTX 580

2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 140,000 times in 2011. If it were an exhibit at the Louvre Museum, it would take about 6 days for that many people to see it.

Click here to see the complete report.

Follow

Get every new post delivered to your Inbox.