Wednesday, June 25, 2008

George Carlin - favorite clip

This one is my favorite from George Carlin's youtube clips.


Also check John Mayer's post paying homage to George Carlin.

Sunday, June 22, 2008

temperature


temperature
Originally uploaded by jyro2080

Sunday, June 15, 2008

80-20 rule

Cringley this week writes about the 80-20 rule.

In every business there is some version of the 80-20 rule that says 80 percent of the business comes from 20 percent of the customers. Smart businesses do whatever they can to play to that powerful 20 percent.
...

There's another kind of company, however, that applies the 80-20 rule in a different manner and Apple is one of those companies. They aim everything they do at that top 20 percent and ignore the rest. Sometimes you hit a home run and get 75 percent market share, like Apple did with the iPod and iTunes, but I can guarantee you the business plan was aimed at taking 20 percent, tops, and making a good living with that.

There are other companies that take a similar market approach to Apple, but few of them are in the computer business. BMW and Porsche are good examples.



The 80-20 rule is known as the Pareto principle. Before this I knew it only in software programming context: 80% of software program is written in 20% of the time.

I don't know how many of Cringley's predictions come out to be true. But some of his analogies (like this one) just seem fitting.

Thursday, June 12, 2008

Python fun

On Sunday I had great fun writing some cool python code. Finally I think I got what lambda is good for.

I will mention one bit here. I found an elegant solution (at least in python) for one piece of code that I could never write with sufficient elegance.

A typical problem would be to create a string out of an array of words by separating them by commas. To solve this problem you always have to take care of the one corner case - the first element or the last element of the array. The code would be clean if every element could be followed by the comma OR every element could be preceded by the comma (depending upon your choice). So either you have to use a flag to detect the first pass of the loop and not use comma before current element. Or eat the extra comma after you have come out of the loop. In any case, I always resented the loss of elegance in this type of code. Here is how I would write it in C:

int numbers[MAX] = {2,3,5,7};
first = 1;
for (int i=0; i < max; i++){
if(!first){
sprintf(str,",%d",numbers[i]);
} else {
sprintf(str,"%d",numbers[i]);
first = 0
}
strcat(string,str);
}


Result: "2,3,5,7"

I found a one liner to do this in python:

fruits = ['apple','banana','orange']
print reduce
(lambda x,y: '%s,%s'%(x,y), fruits)


Enjoy!

Sunday, June 08, 2008

OSiM'08 Berlin, Germany

If you remember my posts [1,2] from OSiM'08 USA in San Francisco back in March, here is an update for you.

The March conference in SFO was the first one of OSiM's in US. However they have been active in Europe for some time now. On September 17-18 of this year they will have the 3rd annual conference at Berlin, Germany.

One thing to note about it: For next 3 months the conference will be publishing a blog. .... and I will be running it. :)

Wednesday, June 04, 2008

Of games

Found this fantastic game trailer of 'Fallout 3' while glancing through the reviews of Playstation 3 games.