Recently I've been busy and couldn't post here lately. Between playing with my OpenMoko phone, writing the OSiM blog every weekend, hacking librsvg (why? 'll post about it if it takes any shape), a trip to Bartlesville, OK and of course full-time day job; I couldn't manage enough cycles to write here. However I had many things to write about.
... anyway. Today I felt extremely happy when I came across Prof. John Riedl's blog. He has been my favorite Teacher among all the ones I ever came across in my life. Back in my school days I used to be the "full-attendance" student, but I have slept in almost all teachers' classes in my college days (sitting on first bench ;). In Prof. Riedl's class, I could never even felt like sleeping even if I was awake for past 24 hrs (yes, there were many such night-outs in those couple semesters). I had taken Advanced Internet Programming and later Advanced Operating Systems with Prof. Riedl. Both of them were the best courses I ever took in my life. What was so great about them? It is not important what programming languages/ technical skills/ theoretical foundations were taught in those courses. What I learnt there was passion for technology (no, that's incorrect... passion can't be 'learnt'. More correctly, our interests resonated perfectly and that boosted my passion for technology).
I didn't immediately understand the techniques Prof. tried to teach us in Advanced OS class. Most of the classic Operating systems papers that we read, were too tough for me and I could barely add any new insights (something we were supposed to do in our writeups) to the original ideas. But after 1-2 years when I was settled in my job, I reread some of those papers (this time with a focused interest on OS virtualization technologies) and I understood the significance of the techniques that Prof. Riedl were trying to teach us back then. It doesn't surprise me, why only Prof. Riedl has managed to influenced me. Because he comes from the startup culture, which I am so much in awe of.
If you are In U of M CS department, (and "love" computing), then never ever miss an opportunity to take Prof. Riedl's course (if it is offered of course... I feel lucky I got that opportunity twice).
Saturday, July 26, 2008
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.
Also check John Mayer's post paying homage to George Carlin.
Sunday, June 22, 2008
Sunday, June 15, 2008
80-20 rule
Cringley this week writes about the 80-20 rule.
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.
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:
Result: "2,3,5,7"
I found a one liner to do this in python:
Enjoy!
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!
Subscribe to:
Posts (Atom)