Friday, October 21, 2011


If life were measured by accomplishments, most of us would die in infancy- A.P.Gouthey

Sunday, October 16, 2011


Practice Drill #1:   Write your resume. List all your relevant skills, then note the ones that will still be needed in 100 years. Give yourself a 1-10 rating in each skill.
This drill will help you see where you need practice. It won't turn up your "blind spots" -- i.e., areas that you don't know anything about (hence aren't on your resume) but that you should know something about. But it'll at least help you see how current your working skillset is, and how long you expect it to stay current.
math, computer science, writing, and people skills are for the most part timeless, universal skills even after 100 years also, it will be useful. Most specific technologies, languages and protocols eventually expire, to be replaced by better alternatives.

10 great books

reg. amazon

Thursday, October 13, 2011

MutexLock hangs in StageFright:

MutexLock hangs in StageFright:

   1.This might happens due to invalid use of[if we have added any] the mutex lock / invalid call sequence.

We observed mutex lock hang for the below scenario:


We should call like this:







“Being with you and not being with you is the only way I have to measure time.”
Jorge Luis Borges

Tuesday, October 11, 2011

To learn an algorithm

To learn an algorithm well, one must implement it. Accordingly, the
best strategy for understanding the algorithm is to
implement and test them, experiment with variants, and try them out on
real problems.

Monday, October 10, 2011

Ruler multiplication

File:Slide rule example2.svg

2 * 3 = 6 we can match slide ruler 1 and ruler 2.

Sunday, October 09, 2011

why stability is important in sorting algorithms?

Ans1: For parallelization purposes? eg: merge sort is stable and can be parallelized well and so is quicksort.


Background: a "stable" sorting algorithm keeps the items with the same sorting key in order. Suppose we have a list of 5-letter words:

peach straw apple spork

Stable-sorting by the first letter gives us:

apple peach straw spork

In an unstable algorithm, straw or spork may be interchanged, but in stable sort, they stay in the same relative positions (that is, since 'straw' appears

before 'spork' in the input, it also appears before 'spork' in the output).

Ans 3:
There's a few reasons why stability can be important. One is that, if two records don't need to be swapped by swapping them you can cause a memory update, a

page is marked dirty, and needs to be re-written to disk (or another slow medium).

Ans 4:
  Stable sort will allways return same solution (permutation)

Ans 5:

Sorting stability means that records with the same key retain their relative order before and after the sort.

So stability matters if, and only if, the problem you're solving requires retention of that relative order.

If you don't need stability, you can use a fast, memory-sipping algorithm from a library, like heapsort or quicksort, and forget about it.

If you need stability, it's more complicated. Stable algorithms have higher big-O CPU and/or memory usage than unstable algorithms. So when you have a large

data set, you have to pick between beating up the CPU or the memory. If you're constrained on both CPU and memory, you have a problem. A good compromise

stable algorithm is a binary tree sort;

memory usage on Merge Sort is O(N), while on Quicksort it's O(log N).

Monday, October 03, 2011

Petr quotes 2

"Do not spend all your time on training or studying - this way you will probably become very exhausted and unwilling to compete more. Whatever you do - have fun. Once you find programming is no fun anymore - drop it. Play soccer, find a girlfriend, study something not related to programming, just live a life - programming contests are only programming contests, and nothing more. Don't let them become your life - for your life is much more interesting and colorful."

Petr quotes

"I think that two main keys to programming contests are training and thinking. You have to solve a lot of problems to become really successful, but you also need to have good math knowledge and the ability to solve uprising problems. Mathematical puzzles and olympiad problems, for example, can help develop it very well. And you have to be confident. Confident that you'll be successful. That you'll win eventually. And the feeling of being a winner, it will reward you for all the difficulties."