Author Archive

24 Feb, 2010

My Todo list – the most powerful weapon in my productivity arsenal

Posted by Bhavin Turakhia | (19) Comments

One of the simplest differentiators I have found between individuals who are successful and those who are not – is the former always maintain an organized todo list for everything in their lives. This sounds extremely obvious, but is by far the most powerful tool in my arsenal. Here is a random list of thoughts concerning my practice of maintaining a todo list for myself –

  • It requires skill, attention and focus to be able to determine during ANY conversation / any event – items that should form a part of my todo list. I have invariably found that most unsuccessful people fail at this. They either (1) cannot determine in the course of a meeting / discussion something that forms a part of their responsibility, or (2) just don’t care enough to want to deliver their best, or (3) believe that their memory is infallible despite significant number of incidents in their life that have proven otherwise.
  • I tend to ensure I always have some way of taking notes at ANY point in my entire day. Given that my laptop accompanies me everywhere (including places I’d rather not talk about ;) ) for over 97% of my awake time – that is my preferred medium for note taking. I also have notepads scattered on every desk, and use the blackberry memo when nothing else is available. I will almost never initiate a meeting without ensuring someone (if not me) is available to persist thoughts/notes/todo items.
  • It requires discipline to subsequently organize random notes I may have taken in a meeting into my final todo lists. This is mostly a 2-5 minute activity that I either engage in immediately after the event (when the subject is fresh) OR by the end of the day. This is again an area where many fail. I have seen individuals take notes down on pads they carry with them in meetings, but if the pad is merely an intermediate medium, then not transferring them subsequently to the final persistent format in an organized manner is almost as big a crime as not taking any notes down
  • Todo lists are an asynchronous ongoing and continuous activity for me. I almost always ensure that the time interval between thinking something and penning it down in a structured format is under a few seconds or minutes at best. This applies to almost 90% of my thoughts. If I think of something, I jot it down. I firmly believe that ideas are not a commodity and each minute that I spend in thinking something of value, is wasted, if the thought is not captured in some persistent format.
  • It requires skill to be able to reprioritize items ongoingly since a typical todo list will almost never end (mine has never been empty since the day it began). I use just-in-time reprioritization as I take up each task. Additionally I juggle and shift tasks around at the end of each day/week/relevant period too.
  • It requires discipline to jot down every single item that needs to get done in some persistent form without relying on my memory. However the knowledge that not jotting something down will at the minimum require me to rethink it at some point down the line, and at worst may result in the permanent loss of a valuable idea, is an adequate incentive for me to not only imbibe the discipline but infact enjoy the activity immensely
  • The value of a person is the value of the ideas that they execute. Merely thinking an idea and doing nothing about it not only does not create value, but rather destroys it, because now even the time spent behind conceiving the idea was a waste. The only way to guarantee execution is to persist the idea in a queue.
  • This kind of discipline also requires a strong desire on my part to want to always deliver my best. If I was ok with mediocrity, then I would be ok with missing out on tasks that I need to get done. Since I cannot settle for anything less than perfection, the only way to ensure that is to ensure I am adept at maintaining a todo list with almost no lacunae. As a corollary this also therefore is the mark of someone who is paranoid about perfection. Someone who does not want to leave delivery to chance will always be adept at organizing their tasks in a persistent manner.
  • Maintaining a todo list also requires a good sense of information architecture. A disorganized/non-prioritized list can sometimes be worse than no list at all. Before you begin researching complicated software to manage this, let me save you time by adding that I simply use a plain text editor (Keynote) to maintain my todo list. It allows me to create multiple text files and my entire todo list comprises of a few files organized line by line in an indented tree like point format. I must also add that my list is not always perfectly ordered in descending order of priority. I would say it is mostly in a reasonably rough order of priority such that I can assume that items on top are important and items at the bottom are not.
  • A todo list lets me set milestones and creates a sense of achievement as items get knocked off my list. I love that feeling. Infact I can state with certainty that there is a palpable difference between my sense of achievement when I knock an item off my todo list vis-à-vis just wrapping up an adhoc task. The feeling of deleting or cancelling a task from my todo list is considerably more fun.
  • Over and above my textual todo list – my email inbox serves as a second todo list for me. Any email that is an action item will always remain in my inbox until it is addressed.
  • Paranoid that I am, I also end up managing todo lists for other teams and individuals where my confidence level with respect to them fulfilling this responsibility is sub par. If I think of something – no matter who it relates to – I will typically shoot out an email, or, in most circumstances, add it to the relevant priority log in our internal corporate wiki. This practice again stems from the belief that ideas are always more valuable than the time taken to think them and jot them down, and the only way to capitalize on their value is to capture them in a persistent form somewhere.
  • Given that the process of maintaining these todo lists involves managing certain files, and certain web pages on my corporate wiki, I realize that I may end up procrastinating the process of adding items to these lists if the task of adding them were onerous. Hence I use automation to the maximum extent to ensure I never end up feeling lazy. I use a macro shortcut utility called Launchy, combined with some elegant keyboard shortcuts that I have configured, to ensure that EVERY single todo list I maintain including files in our corporate wiki representing tasks for other teams, are literally a few key strokes away – and I literally mean few keystrokes away – I don’t even need to use the mouse to access any of these files. I can access any of these lists with merely a few keystrokes. This ensures that it is always very easy for me to file something in the appropriate place.
  • Practice is key. By now this process has become second nature to me. Our brain is interesting in that it makes ANY consciously repeated behavior pattern into a subconscious habit. The word “ANY” is important here. This applies to every behavior pattern. If you consciously make it a practice to maintain a organized todo list, you will find yourselves subconsciously doing so after sometime, and even ensuring others do so. If you however consciously make it a practice to procrastinate taking down notes, or maintaining a todo list, you will shortly find yourselves engaging in the same subconsciously to the extent that you will never be able to spot an idea worth jotting down or a task worth scheduling even when it is imperative to do so.
Category : 0-cosmos | Random Musings

22 Feb, 2010

You know you hire the best talent when people want to pay to get in :)

Posted by Bhavin Turakhia | (2) Comments

At Directi we hire some of the best talent in the country. For tech hires we look favorably upon applicants who solve some of our coding puzzles. One of my colleagues just came across this amusing link on LimeExchange where someone is willing to pay for a solution to one of our puzzles :) -

http://www.limeexchange.com/software-development-freelance-projects/6188.lxp.Team-selection-code

We must be doing something right if candidates are willing to pay to get in ;)

Category : 0-cosmos | Directi

27 Jan, 2010

Directiplex trashed with Laser Graffiti Tonight – Be there or Be Left out

Posted by Bhavin Turakhia | (6) Comments

A friend of mine sent me an AMAZING link on using Lasers to graffiti the entire surface of a building. Check the video here (embedded below) and images here

So – OBVIOUSLY – I called up these guys and asked them to Graffiti Directiplex and THEY ARE COMING TONIGHT. Starting 10:45pm, if you visit our offices, you be able to write / draw ANYTHING on the surface of our office building with lasers.

To share this on facebook or twitter you can use - ”Come and watch #directiplex get trashed using laser graffiti tonight - http://bit.ly/aNyKP0

Feeling creative – be there -
Time: 10:45 pm
Venue: DirectiplexAddress: Check http://directi.com/about/offices

Feel free to call your friends / family etc to watch the show as our very own HQ becomes a canvas for creativity.

Category : Uncategorized

11 Jan, 2010

Notes on Kestrel – the open source twitter queue

Posted by Bhavin Turakhia | (3) Comments

Kestrel is a simplistic, high-performant, loosely ordered, reliable queue that twitter uses as the backbone of its messaging infrastructure. I spent sometime today morning studying it and here are my notes -

  • Extremely small footprint (<2000 lines of scala code)
  • JVM based (written in scala)
  • Servers in a Kestrel cluster have no communication amongst one another. Clients simply pick a server at random for gets and puts. This results in a loose ordering of the messages which maybe quite ok for most messaging applications
  • There is no replication
  • While the queues are maintained entirely in memory, they are written to a journal file to prevent data-loss due to a server shutdown or failure (quite similar to redis)
  • Supports a reliable read, where a client can fetch an item from the queue within an “open” and “close” block, and if the client disconnects before sending a “close” the item is re-enqueued
  • NIO based using Apache MINA
  • Supports item expiration

References

Category : Directi | TechTalk

11 Jan, 2010

The best programmers in the country battle it out at Directiplex

Posted by Bhavin Turakhia | (2) Comments

On January 10th 2010, we witnessed the awesomest programming teams from campuses all over India battle it out in person at our Mumbai headquarters of Directi. 639 teams of three each, had registered for the CodeChef Campus SnackDown to be crowned as the best coders in the country. The first round of the SnackDown took place on 21st November 2009. We then flew the top 7 teams from various corners of India to Mumbai to prove their mettle.

I was most excited with the results – the winning team comprised of the youngest programmers of the lot – three juniors in their 2nd and 3rd year at IIIT Hyderabad, who overtook their mentors and seniors and took the first place :) . You will find details about the winners and a recap of the events in the codechef blog post here

Category : 0-cosmos | Directi

31 Dec, 2009

Guide on GUIDs

Posted by Bhavin Turakhia | (3) Comments

One of the seemingly trivial yet daunting challenges to scaling a datastore is the prevalence of auto-increment IDs to represent unique records in a database. Since any scaling involves horizontal partitioning of data, thus distributing inserts, how does one ensure uniqueness with respect to generation of IDs on these independent machines. One replacement method is using GUIDs (or UUIDs) which is nothing more than a randomly generated 128 bit number (there are various methods of generating one).

The uniqueness guarantee comes from the extremely low probability of two randomly generated 128 bit numbers ever colliding. Just to give you a sense of the size of the space - If a computer was to generate a new GUID every milli second, it would take 10790283070806014188970529154.99 years to generate all GUIDs. That is roughly 83 million billion times the estimated age of the universe.

Is a GUID truly unique

Mathematically speaking no. Since the GUID space consists of 2^128 possibilities, one cannot generate 2^128+1 unique GUIDs. Since the time taken to generate all combinations is so high the probability of a potential collision however within an application space is quite low. However this probability increases as the space of generated GUIDs increase, due to the birthday paradox. As per the birthday paradox in a sample set of n values from a total space of s, the probability that there is atleast one collision is given by the formula – P =  (s! / s^n * (s-n)!).

Applying this formula to a space of 2^128 values, the probability of atleast one collision becomes non-trivial when the number of values reach about 10^17 to 10^18 (about 0.001% to 0.14%).

Advantages of using GUIDs

* no centralization
* obfuscation of id
  • Globally unique without central generation. Allows easier partitioning of data without having to rely on a central auto-incrementer
  • GUIDs are obfuscated and cannot be guessed. Auto-increment IDs have a disadvantage in that one can guess subsequent IDs given a starting point. This allows attacks such as data-scraping and potentially even DOS attacks by simply querying a service for incrementing IDs from a starting point
  • Can be generated by the middle tier as opposed to the data layer

Disadvantages of using GUIDs

  • Take additional processing power to generate
  • Do not index as easily as smaller int values, thus increasing time taken for standard CRUD operations
  • Take up additional space (4 times as much – 16 bytes versus 4)
  • Can result in data and index fragmentation if a proper indexing mechanism is not chosen
  • Can be un-intutive

References

Category : 0-cosmos | TechTalk

29 Dec, 2009

Investigating Message Queueing systems

Posted by Bhavin Turakhia | (5) Comments

In my constant quest for creating scalable systems and architecture a robust message queuing system was the missing link. I have begun reviewing some of the available options. This is a rough list of some of the interesting links I came across during this process -

Watch this space for more info …
http://wiki.secondlife.com/wiki/Message_Queue_Evaluation_Notes
The most detailed comparison of queuing systems and their advantages and disadvantages. Covers RabbitMQ and Apache qpid in detail and then several others. The most comprehensive list of message queueing systems.
http://stackoverflow.com/questions/731233/activemq-or-rabbitmq-or-zeromq-or
a list of links comparing various queueing systems
http://www.unlimitednovelty.com/2009/04/twitter-blaming-ruby-for-their-mistakes.html
A detailed critique on how twitter selected its message queue implementaions with comments from the developers at twitter and why they wrote their own queue. Do read the comments. They have a ton of meat
http://gojko.net/2009/03/16/qcon-london-2009-upgrading-twitter-without-service-disruptions/
Talks a bit about how twitter uses a messaging framework at the backend
http://blog.evanweaver.com/articles/2009/03/13/qcon-presentation/
Evan Weaver’s talk on twitters scalability issues and how they were solved
http://www.zeromq.org/whitepapers:brokerless
An interesting paper on differences between brokerless message queues and the advantages thereof
Category : 0-cosmos | TechTalk

25 Dec, 2009

The evolution of push email

Posted by Bhavin Turakhia | (8) Comments

I have been meaning to compile research on push technologies and the evolution of push email since a while. A conversation with ramki on how gmail offers push email using Microsoft Direct Push triggered my research and here is a summarized compilation of my findings

Blackberry

Blackberry works by downloading your email to its NOC. Whenever it finds a new mail it pushes it out to your cellphone. This is why Blackberry requires you to subscribe to a specific blackberry plan through your Telco. If you have a blackberry plan, your Telco forwards your registration to Blackberry and whenever you are online, Blackberry knows how to find you. Whenever the Blackberry NOC downloads a new mail from your mail servers it pushes the mail out to your cellphone through your Telco. This last bit is proprietary and presumably requires support from the Telcos end. Since a data-push is made to your cellphone only when there is data to be pushed, your battery life is conserved

References

Microsoft AUTD

This was the earlier version of Microsoft’s push technology. Basically Microsoft Exchange (or any mail server) is configured to simply send out a special SMS to your cellphone number each time new data needs to be pushed to your cellphone, and your cellphone is not currently connected. This SMS does not get displayed in your inbox, but rather triggers the mail application (or any other applicable app) in the background to sync with the server. This mechanism requires the use of an SMS gateway and/or possible support from your Telco to be able to send out these type of SMSes.

References

Microsoft Direct Push

This is the latest version of Microsoft’s push technology. It sounded esoteric, but upon close investigation it turned out to be a fancy microsoft name for a technology that has existed for nearly a decade viz. Comet. The way this works is as follows -

  • The application on your mobile (lets say your email client) makes a Comet HTTP request to an http server. Along with this request it sends the server a timeout value – say T=15 minutes
  • If in the next 15 minutes the server receives a new mail, the server immediately sends an HTTP response with a status that results in the client syncing with the server and then once again issuing a long poll http request
  • If in the next 15 minutes the server receives no new mail, the server must at the end of 15 minutes send an empty status response to the client, upon receiving which, the client once again initiates a new HTTP request
  • Since this method requires a poll to the server every ‘x’ minutes it typically consumes more battery than Blackberry but the difference should not be too high
  • Since the Telco en route may have its own enfroced timeout values on any http connections, it may disconnect a long-running HTTP connection
  • Therefore the actual timeout time must be negotiated between the client handset and the server during bootstrapping by attempting higher and higher timeout values until the highest value that the Telco permits is discovered
  • The HTTP connection may also get dropped due to network failures and switch-overs. Clients can detect this at the TCP/IP level and re-attempt connections. I am not entirely sure about this part, but the HTTP client presumably also uses TCP Keep alive internally to ensure the TCP connection remains alive
  • One may want to lookup the actual port numbers and protocol implementation of Microsoft Direct Push, since it is likely that most Telcos support Microsoft Direct Push and therefore if one was to emulate their push service on the same server port it is likely that Telcos would let the long-running HTTP connection persist
  • The advantage of this method is it does not require any special Blackberry plan

References

Misc References

Category : 0-cosmos | TechTalk

10 Dec, 2009

A detailed primer on building cross platform mobile applications

Posted by Bhavin Turakhia | (9) Comments

I finally had a few hours today morning to wrap up my study on comparison of mobile application platforms that allow developing cross-device applications easily using familiar technologies. Here is a quick braindump of all the links and resources I went through -

Rhomobile

Phone gap

  • http://phonegap.com/
  • Check the video on their site
  • Notes
    • Fully open source and free
    • Code written in html+javascript
    • Supports iphone, blackberry and android

Pyxis Mobile

  • http://pyxismobile.com/platform/technical-overview/
  • Build one configuration and deploy to BlackBerry, iPhone, and Windows Mobile all at the same time
  • Skinning, scripting, localized languages, complex workflow management, push, hotkeys, mapping & LBS, camera support, signature capture, GUI calendar, disambiguation, hotkeys, and much more

Titanium Mobile

Quick Connect

Comparison sites and articles

Some others

Category : 0-cosmos | TechTalk

14 Nov, 2009

RAM Speed

Posted by Bhavin Turakhia | (6) Comments

To test the speed of RAM, I got Ramki to run a small program that writes a set of bytes into memory a billion times and ran 4 instances of it on a dual proc quad core machine. Below are the results of running four instances of the program simultaneously.

Result

output.1:       User time (seconds): 545.99
output.1:       System time (seconds): 1.33
output.1:       Elapsed (wall clock) time (h:mm:ss or m:ss): 9:07.38
output.1:       Involuntary context switches: 820

output.2:       User time (seconds): 250.90
output.2:       System time (seconds): 1.18
output.2:       Elapsed (wall clock) time (h:mm:ss or m:ss): 4:12.12
output.2:       Involuntary context switches: 378

output.3:       User time (seconds): 250.30
output.3:       System time (seconds): 1.15
output.3:       Elapsed (wall clock) time (h:mm:ss or m:ss): 4:11.49
output.3:       Involuntary context switches: 373

output.4:       User time (seconds): 563.62
output.4:       System time (seconds): 1.31
output.4:       Elapsed (wall clock) time (h:mm:ss or m:ss): 9:25.00
output.4:       Involuntary context switches: 845

Observations

  • The write speed was between 0.25 seconds per million writes to 0.55 seconds
  • Output.2 and .3 took half the time as that of .1 or .4
  • Don’t have a specific theory on why 2 of the cores did better than the other two
  • No processor affinity was set, and the processes were being scheduled on random processors after every context switch.
  • Seemingly the processes were accessing RAM simultaneously. In my limited knowledge that could mean a few things – Multi-channel FSB (Dual) and additionally while oneprocess was computing stuff the other processes could access the FSB. The program was using lrand48 to generate a random number to write data to random locations so as to ensure that we do not rely too much on the L1/L2 cache

Some reading

Category : 0-cosmos | TechTalk