Thursday, December 22, 2005

Walking down the road

 Posted by Picasa

The fast mighty river

 Posted by Picasa

Trekking

 Posted by Picasa

Taking Photographs

 Posted by Picasa

Top view of river again

 Posted by Picasa

Hiding behind the bushes

 Posted by Picasa

River III

 Posted by Picasa

Top view of river II

 Posted by Picasa

Top view of river II

 Posted by Picasa

Top of the hill

 Posted by Picasa

Top View

 Posted by Picasa

Scene I, Act II

 Posted by Picasa

Scene I, Act I

 Posted by Picasa

Making Friends

 Posted by Picasa

The mighty Cauvery

 Posted by Picasa

The boats again

 Posted by Picasa

The alive group having fun in the boat

 Posted by Picasa

I wish I was visible :(

 Posted by Picasa

Boat Ride in Cavery

 Posted by Picasa

Sunday, December 11, 2005

Making people believe - Logic lost?

Most humans are very logical by nature, some more than others. Yet all of us have illogical beliefs - we believe in the impossible. Let me illustrate the point with some examples

Remember Spiderman? Spiderman (the movie) was one of the biggest chartbusters (both I and II). Spiderman is bitten by a radio active Spider and develops the abilities of a Spider himself. Have you noticed the following flaws in Spiderman?

  1. He crawls up buildings wearing shoes - how? What holds him to the wall?
  2. He spins a web using his hand, where as the Spider does it using its mouth (saliva), why the difference?
How do logical human beings cope with this ambiguity?

The loss of logic at certain times is not necessarily a bad thing. Science fiction writers have tried to create fictional elements and back them up with logic - remember HAL-9000 from 2001 the Space Odyssey? It has lead to the creation of many new ideas, which scientists have found useful.

Sometimes, our logic limits our thinking. In fact, many people criticize education as something that provides too much logic and narrows our thinking. We start ignoring ideas that are not logical.

Researchers and creative thinkers suggest that we build a fantasy island in which we can override logic. Such an environment promotes creativity. For me cartoons and movies are a good way to enter the fantasy island. But then, in the scientific world, we need logic. Logic proves to others that we are sane and our ideas are not some thing from this fantasy world which is absurd and rubbish.

I think the most critical thing is to find the correct balance between creativity and the ability to back up new creations with logic.

So the next time somebody calls you illogical -- remember, you are just being creative, so smile and thank the person for the complement :-)

Friday, December 09, 2005

Passed my first semester MS

I passed my first semester in my MS exam, yeah! yeah! Well, I know - but passing is an achievement for me :-)

Guess which subject I did the best in ?

Now, I must register for the second one and get started soon this time.

Foss.in - take away - II

Another take away has been the answer to the question

"what is the impact of open source in the enterprise, on the market?"

Well, my thoughts come from the talks of Atul Chitnis and Jim Zemlin of Linux Standard Base. Here is how they put it (usual disclaimers apply)

"Consider the history of the Internet Explorer. IE 6 was the last release that happened in 1999/2000 and after that only service packs have been delivered. The web on the other hand has been changing, there is RSS, tabbed browsing, advertisements, spam, viruses, etc. Then comes along a browser called Firefox, within a few days of release 1.0, there are a few million downloads; the *NIX community has a browser they can use well. What is the end-result of this? Well there is now a new team working on IE7, with ad-blocker, tabbed browsing, better standards compliance to CSS, etc.

Who benefits from all this?


Tell me who?

The customer, the consumer. In the end, the consumer with a choice always benefits, because he/she has a choice. In the end, when the consumer has a choice - it opens up the market, benefits the consumer and the market has healthy competition."

Sunday, December 04, 2005

Foss.in - Take away - I

I attended foss.in last week. I was very happy with the arrangement and the venue. We had Alan Cox, Jonathan Corbet and many other prominent people attending the event. The schedule of talks was interesting. I attended quite a few of the talks. I intend to share my understanding in parts, starting with my biggest take away from the event.

Let me summarize it here

  1. Itch-Scratch Phenomena -- If you got an itch, you will scratch. In the open source world this means -- If you need something, do it yourself or help somebody do it, do not sit quite
  2. Contributions do not have to be code -- You can contribute by translating code, documents, submitting bug reports, testing, helping with infrastructure and many other means. Code is also of-course considered as contribution, but it is not the only way to contribute
  3. You build the community -- No one can say no to you, if you do something and the community needs it, they will take it. Do not be afraid of people saying "No!". People saying "No!" often too busy fighting somebody will implement feature in the background and submit it.
  4. Work on it now -- If you need something, discuss it with the community and start on it right away
This is what I want to take away immediately from the conference. Well, ideally I should have started working on the ideas in my mind, so I will cut short the post and try to "work on it now!"

Saturday, November 26, 2005

Thoughts on Science and Engineering

I think of myself as a little bit of a researcher. Being a researcher requires me to read journal papers and to try and understand them the best I can. I have a degree in Computer Science and Engineering.

So, the question keeps popping up -- "What is the difference between Science and Engineering?"
Well, here is my understanding so far (not complete yet)

Science
  1. It is very theoretical
  2. It relies on abstraction and the ability to visualize things
  3. Proofs (mathematical) are important for completeness

Engineering

  1. Relies on Science for getting started and for establishing a base for understanding concepts
  2. Is more practical in the sense that ideas should be feasible to implement. Science will allow you to get away with black holes and infinity, engineering will not
  3. It is the art of observing and collecting data and using it to solve problems

To illustrate the difference further, consider the mathematical concept of infinity, mathematics has a notation for it ∞. In computing, we cannot get away without finding a practical representation for infinity, hence computer engineers had to develop the concept of NAN (Not A Number), but in science we can simply use the notation for ∞.

Collecting data also plays a critical role in keeping things practical, analyzing data to come up with solutions to problems is very important in engineering.

There are occasions when science and engineering work very well together. Consider for example the Huffman algorithm, science predicts that it the most optimal algorithm for finding codes and engineering allows us to implement it. On the other hand, in the case of traveling salesman problem, science suggests that there is no way to design the most optimal solution to the problem except to use brute force, but engineers try to find a solution that is close to optimal.

Get the point - science vs engineering?

Thursday, November 17, 2005

Data Structure Patterns

Teaching and books have a profound impact on how we think and solve problems.

In college when I learnt data structures, I was taught to embed the element in the data structure (list)


struct x {
struct x *next, *prev;
int element;
};


But I soon realized that I did not always want "int" as the type of the element, so I learnt the magical type void *

Here is another way to achieve the same thing


struct list {
struct list *next, *prev;
};

struct y {
int element;
struct list l;
};


This way, I could embed the list in anything without building any type information in list. Cool right?

If tomorrow I decided to use a tree, I could simply change


struct y {
int element;
struct tree t;
};


This way the impact on my code for "y" is minimal. In the traditional approach, I would have to use


struct tree xt {
int element;
struct tree *left, *right;
};


and redo most of the code.

The moral of the story

Embed the data structure in the data type and not the other way around





Figure illustrating the differences b/w embedding the data type in the data structure versus embedding the data structure in the data type

Tuesday, November 08, 2005

First example of using scilab

I tried generating beat waves using scilab


-->Ts=0.0001;

-->n=-1000:1000;

-->tn=n*Ts;

-->xn=2*cos(40*3.14159*tn).*cos(800*3.14159*tn);

-->plot(tn, xn);



This program shows the Beat waves for the equations given below

eq1

Equations for the two signals

The individual plots and the resultant beat wave is shown below


Plot of frequency equal to 20

Plot of frequency equal to 400


Resultant Beat Wave


This should come as no surprise, that beating forms the basis for Amplitude modulation.

The equation has been mentioned in Signal Processing First (© 2003, James H. McClellan Ronald W. Schafer, and Mark A. Yoder)

Book Recommendation

I have started a part time MS program, the program requires me to read books instead of merely buying them :-)

I would highly recommend "Signal Processing First" for anyone interested in getting started with Digital Signal Processing



Cover of the book

Unfortunately the copy of the Indian Edition I have does not come with the CD, it comes with the license for using the CDROM and the cover mentions the CD, but the book did not have one.

What I like about the book is the simple use of mathematics to explain signal processing concepts. The book made me go back to my "S.L.Loney" trigonometry book. The book uses matlab to explain concepts, I am forced to use scilab as a cheaper alternative to matlab.



Scilab screenshot

Overall, I find this to be the best Signal Processing book I have come across.

Friday, November 04, 2005

Solution to the Interesting problem with trees

I posted a problem in Problem with Trees. The answer is posted below, use the Euler's tour to verify. If it is not correct, I know where I would be losing marks in the exam.

tree_ip2

Monday, October 31, 2005

First Patent Filed

I just filed for my first patent, it has been filed in India and will soon be filed in other countries.

Of-course, I cannot disclose the details here. When it gets approved, maybe I can disclose the details here. Right now, we are in the quiet period.

Sunday, October 30, 2005

Interesting problem with trees

This years DLPD exam had the following question

Given a binary tree and the following traversal information

In-Order : B P D Q K A C L T E F
Pre-Order: A K B D P Q L C F T E

construct the original tree.

Its an interesting problem, can you find the solution and back it up with logic - the problem solving approach you followed?

Thursday, October 13, 2005

Computer Organization seventh edition by William Stallings


I reviewed a chapter of Computer Organization & Architecture, Designing for Performance.

This is the last of my reviews for a long time to come. I would recommend buying it, its well written and covers a lot of ground.

Friday, September 30, 2005

What do you look for in a job?

The Indian job market is very bullish. In a recent survey, India topped a list of 23 countries when it came to job creation in certain sectors. I find that we Indians switch jobs more frequently than our counterparts from developed nations. When you switch a job what do you look for in a new organization?

I got a great answer about career building from someone my brother knows, he said

"Building a career is like digging a well, first you get dirty and then if you dig deep enough, you will find water. Don't dig too many wells and if possible avoid digging small holes."

He was suggesting that sticking around definitely pays off. I agree with that point of view, but we must ensure that we dig in a place where we are likely to find water to begin with.

That made me wonder, do we give up too easily on our work places and switch jobs? Or is that companies in India do not take good care of their employees, the cost saving is sometimes at the cost of the employee? A HR manager once told me that the cost of replacing an employee is nine times his current monthly salary.

I would be interested in finding out the annual cost of hiring across organizations in Bangalore, specially the software firms and compare them against other places in the world.

Friday, September 23, 2005

What have I been upto?

I feel the need to explain the lack of recent posts on my blog. Contrary to the usual reason that I used to have (shortage of ideas), I have too many ideas to share this time :-). I am trying to put them all together and will try to list one of them here. I must warn you that they are not drastically new, but they are new for me (in terms of the investment of time and thought into the matter). This idea is just of the top of my head, I have not researched too much into this. In Parallel, I have other thoughts spinning in my mind and keeping me occupied.

Let me start explaining my thought with a simple scenario

signal_sharing
Signal Sharing

Lets say, I design an electrical circuit and I want to troubleshoot some part of my circuit. The obvious thing would be to go grab an oscilloscope to debug. I power up the circuit and see the waveform between any two points. The interesting thing to note here is that due to the physical properties of electrons, it is ok for us to have some load in parallel with the working circuit.

Is it possible to do something similar in computing? Can we extract data without impacting the program that is being run? The answer is "yes". I am aware of some techniques of achieving this.

  1. The first is to use a hardware trace to extract data from registers and memory.
  2. There is a project called dprobes, that does something similar to what I discuss here, but I am not sure of the exact implementation methodology.

I am wondering if there is any other mechanism of doing this using the existing resources on the system? This problem can be restated as -- Can be find ways and means of applying physical laws to software to solve some of our development and debugging issues?

Sunday, September 18, 2005

Possible solutions to the Bangalore's Infrastructure problem

If you live in Bangalore, you are likely to find the IT sector complaining about the infrastructure problem in Bangalore. To be honest their complaints are 100% true. I think the biggest problem is commutation. It takes on an average 3 hours to commute from home to Electronic City (a location where there are close to 50,000 engineers working). While we all know that it would probably take years to fix the problem completely, here are a few intermediate steps that can be thought to solve the problem

  1. Cover the big opening between the service lanes and the main road
  2. Make the road divider flexible, during the mornings, make the side which leads to electronic city bigger and on return reverse it. Have a 75:25 split of the road for optimizing traffic
  3. Ask companies to interleave their starting and closing time by 15 minutes. For example company A could start at 8:15, company B at 8:30 and so on
  4. Actually, start work on the infrastructure, build new flyover's, fixing pot holes, etc

Imagine if 50,000 engineers on an average spend 3 hours a day in traffic, what would be the loss in productivity? Wouldn't it be better that they all spend time with their families and on their hobbies instead of traveling?

Tuesday, September 13, 2005

Learning should have deep roots

I am taking a class in advanced C++. To be frank, I learnt a lot of new things from the class. The learning is permanent when I get to learn how things work. There are times when the instructor expects us to remember things as rules without explaining the reason behind it. These are things, I feel we programmers forget easily. Having read Design and Evolution of C++, I know that Mr Stroustrup is a very sane person and would not do anything in the language that does not make sense.

Let me illustrate my point with a few examples

In C++ it is not possible to implement overloaded functions based on return type. This is certainly true, but why? There is an exception to this rule, overloading based on return types can be done using templates. This becomes extremely confusing unless you know the reason behind all these so called rules of the language. I found the answer to the above question in Annotated C++ Reference Manual. My experience makes me believe that a course in language design and compilers would be useful for all programmers working with a language. This would help in being able to reason with the rules.

In one of the train stations in Hong Kong, I saw an advertisement hoarding which stated

"Don't get her fish, it will last only a day, teach her how to fish and it will last a life time".

This was an advertisement about helping people with skill development instead of money. My request to all trainers and teachers out there would be

"Don't teach me the rules, teach me why the rules are designed to work that way, so that my learning is permanent".

Without permanent learning and the capability to deduce, comes the capability to confuse yourself and other people around you. We tend to veto everything stating rules as the reason, without understanding the reason for them in the first place. That is definitely a bad sign and if you find yourself there, its time for course correction.

Tuesday, September 06, 2005

Be a role model

I still remember meeting a great architect at a place I worked. He was very humble and so good that he was a role model. Basically whether we like it or not, we become role models to people. The choice we have to make is what kind of a role model do we want to become? Good or Bad?

The person I am talking about is so good at technology that he had close to 20 patents, yet he is so humble when it comes to dealing with people and great at sports. I remember once that he was supposed to take some classes back home and I was onsite. I was disappointed at not being able to attend his presentation, so I went up to him and requested for the slides (so that I could atleast see them). By the time I reached my cubicle, I got an email from him saying

"Balbir, could you please review these slides for me to present for the folks back home"

It is often not easy to be a role model, if you are nice to people, some people exploit you, this requires you to be very assertive. You should be able to inspire people with what you do. You should set them up for success without holding their hands. You should be able to punish the guilty by making them realize that they are wrong and always practice what you preach.

There is a well known story about Mahatma Gandhi

An old woman came to Gandhi with her grandson from a far off village. Her grandson used to eat a lot of jaggery and would not stop or give it up. Since he looked up to Gandhi, she thought may be Gandhi could talk some sense into him. When she met Gandhi and explained the context, Gandhi said "Please come meet me after a week and I will advise your grandson to stop eating jaggery". The woman was surprised and angered that Gandhi was going to make her wait and travel back and forth again. Gandhi politely explained, "I myself eat a lot of jaggery, how I can preach something when I am unable to do it myself, the time I have asked for, is to help myself out of the habit, so that I can advise your grandson"

Being a role model is not easy, but whether you like it or not, somebody might be looking up to you for help and direction. So whether you are ready or not, it will strike you someday that all of us are role models to children, colleagues at work, at home or elsewhere. We need to do our best to be good role models to other people, ourselves and the society.

Friday, September 02, 2005

New Orleans, Mumbai and the Tsunami



A view of Canal Street that is flooded with water in New Orleans (From Reuters)

All of you must have heard of Katrina and the tragedy it brought along with it. What is very concerning is the tragedy that humans have caused themselves in New Orleans. People have turned violent. Imagine surviving Katrina and then the rage/anger of your fellow people who turn violent and start looting. Lets hope people get help and the aid they need to survive this disaster.

Looking back, Nature has shown us its might this year. We had a Tsunami on the boxing day, killing more than a million people and affecting the lives of many more. Sometime back we in India were impacted by the Mumbai tragedy (the tragedy was really caused due to excessive human intervention with nature). The last two tragedies were different in the sense that people (from all over) helped each other during and after the tragedy.





Mumbai Rains (From Webshots Album -- Mumbai Rain)

New Orleans makes me wonder

  1. If we ever face a similar crisis on a global scale, will we all forget what humanity is about and start doing whatever it takes for survival? Will nations go to war? Are we humanitarian only if our basic needs are satisfied?
  2. Should ordinary people be carrying weapons? (I can understand their use for self protection, but as in New Orleans, if people decide to loot, then one has to rethink this point)
  3. There are so many people who need help/are going to need help in the future and we as humans must be ready to help them out. We should override all other things we do and prioritize providing help to people who need it. Nations should revisit their priorities - should it be war, helping the millions of people starving in Africa/Asia, helping people hurt by Natural disaster. Its our call to make.
  4. Its time we start respecting nature for what it provides and what it can take away. We must remember not to struggle with nature or make a competition of extracting resources/energy from it, but to live in harmony with it.

privacy

Some of the policy from the app automation refers to https://rclone.org/privacy/ if you are a general blog reader, follow Google's polic...