My name is Ram Rachum, and I'm a software developer based in Israel, specializing in the Python programming language.

This is my personal blog. I write about technology, programming, Python, and any other thoughts that come to my mind.

I'm sometimes available for freelance work in Python and Django. My expertise is in developing a product from scratch.

GitHub profile

Personal Website

7th October 2012


Developers: When using Frecency, please consider the context

Nowadays there are many applications that use the wonderful concept of Frecency.

"Frecency" is a combination of "frequency" and "recency". For example, say that I have a dear friend named Bob Jones to whom I write emails every day. I may have many Bobs in my address book, but when I start a new message in GMail and start typing "Bob", GMail is smart enough to offer me Bob Jones as the first choice, because that’s the Bob to whom I’ve written the most often to recently.

This is a really awesome feature! It saves a lot of time sifting between non-popular choices. I <3 Frecency.

Many applications use this concept of frecency. When you start typing anything into Chrome’s Omnibar, it uses frecency to guess which website you want to visit. I use a launcher for Windows called Launchy. When you press Start-Space, you can start typing the name of the program that you want to launch, and Launchy will usually guess that program after 1-3 keystrokes. That’s a really fast and convenient feature, powered by frecency.

But… There’s room for improvement

There’s one thing about most frecency-using programs that I find annoying. Let me explain it with an example.

I’ve already mentioned my good friend Bob Jones to whom I write emails every day. I also have a business partner called John Schiller to whom I write frequently, though less than to Bob. Sometimes I mean to write an email to John, so I start typing jo in the address field, but then instead of getting John Schiller as the first suggestion, I get Bob Jones.

GMail is offering me Bob Jones because I write to Bob Jones more frequently than to John Schiller, and jo happens to be the first 2 letters in Bob Jones’ name.

But, if GMail had a better algorithm, than it would realize that I never start an email to Bob Jones by typing his last name. Ever. Therefore if I’m writing jo, the odds are slim that I’m writing an email to Bob.

How to fix it?

The way to fix this problem is to always check how certain selections are made. If I always start an email to Bob Jones by typing Bob, don’t offer that selection in a high position when I start typing Jones. Every time I make a selection, save the original piece of text that I typed in to make that selection, and then consult that data next time the program is trying to guess my selection.

I have a similar problem with Launchy. Sometimes I want to launch Rosetta Stone, so I start typing ro, but then Launch offers to launch Chrome, because I launch Chrome much more often than Rosetta Stone, and “Chrome” has “ro” in it. Again, a mistake. I never type ro when I’m launching Chrome. Never. So the smart thing for Launchy to do is to notice that so it could guess better at what I mean.

I hope that developers writing frecency algorithms would listen to this advice so we could all have smarter programs!

Tagged: planetpython

All content in this website is copyright © 1986-2015 Ram Rachum.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License, with attribution to "Ram Rachum at" including link to
To view a copy of this license, visit: