Friday, July 30, 2004

A 25 year old, former Miss India, Nafisa Joseph hangs herself to death. Because of her troubled relationships, some say. Somehow it pains to see somebody die for want of love. She is a beauty queen. Beauty queens are crowned after their display of poise and self-confidence. She was a TV anchor. Such anchors have a lot of confidence, they say. I refuse to believe. She was a model, had the model looks and there would be so many people willing to shower her with love. Yet there is the craze in the human being to be approved and accepted by a certain 'somebody'. Somehow one wants that 'somebody' to accept them and their whole 'life' depends on it. Reports say that she considered herself 'always unlucky in relationships'. Sometimes all that people need in life is a soft touch, some kind words, some love. Beneath all that fame, money, power and looks is the need to be loved. The need to be listened to. This need is at a very basic level like food or shelter. It has to be satisfied.

They say she had a dog. He must have loved her like crazy. She could have lived for him.
I rarely post any articles on tech-topics but this one is good. The computer industry has a long way to go before it can achieve the quality standards of the automotive industry. Till that time, it will be good if Gates keeps his trap shut.

When You Test My Code, Be Gentle

By Rob Keefer/30-January-2001
At a client site recently, I was in a meeting where the facilitator was describing a new defect management tool. To make the meeting tolerable, he brought in a familiar story about when Bill Gates stated: "If GM had kept up with technology like the computer industry has, we would all be driving a $25 car that got 1000 miles to the gallon." The story goes on to give the response General Motors supposedly released comparing the auto industry with the computer industry. What if the auto industry had kept in step with the computer industry? For no reason whatsoever, your car would crash twice a day. Every time the lines on the road were repainted you would have to buy a new car. New seats would force everyone to have the same size butt.

A day or two later I was talking with a software developer from another department. During our conversation he said, "Programming is a lot of fun until testing gets involved." Then he realized I would be responsible for testing his software. As our discussion wound down and I turned to go, he said, with a timid voice, "When you test my code, be gentle."

Be gentle?

Have you ever paid much attention to the car commercials on television? They don't talk about their engineering or manufacturing process. They tell you that their cars are crash tested to ensure that their design is good enough for you. That is not gentle. The advertisements send a strong message: "We put our vehicles through grueling tests to provide a quality product for you."

Now think about the common television commercials of the computer industry. They essentially say, "We are doing cool stuff with computers." Implying that you can do `cool stuff', too. No software company is going to talk about the reliability of their system because, generally, the reliability isn't anything to brag about. In the November 2000 issue of Scientific American, Peter Forman and Robert Saint John point out that "even a cheap TV doesn't crash or freeze. The best computers still do."

What the automotive industry knows, and the software industry needs to learn, is how to do rigorous unit testing. Unit testing involves testing each function individually to verify that it works under many different circumstances. When a prototype for a new pressure hose for use in an automobile is tested, it is connect to an input-valve and an output-valve. The input-valve allows adjustment to the pressure going in; the output valve measures the pressure coming out of the hose. Other devices measure the stress, heat, etc. on the hose itself. Only after subjecting the prototype to harsh tests under extreme pressure is it integrated with the rest of the vehicle for further tests.

Similarly, a software product can have each component tested to ensure that it is working correctly and is reliable. Some suggest that these unit tests be written before the actual code is written to ensure that all the different circumstances which could break the function are, indeed, covered.

When a pressure hose it is tested, it is connected to a device that can generate high pressures to ensure a thorough test. Similarly, in order to test an isolated function in a program, you will need to create a driver program. This driver program will exercise all of the features of the function. If a function calls another function that does not yet exist, you will need to write a stub, an empty function, to fill in for the called function. When the stub function is flushed out, you may be able to use the original driver program to test this function as well.

For example, a driver program for testing a function that returns the sum of two positive integers will call the function with positive and negative numbers and zero. The driver program should also account for the specifics of the computer. If you know that the positive integers were declared with 8 bits, you should test with a large value to ensure the function handles these values gracefully. When you are finished testing the function, do not throw away the driver program. You may want to use it again on modified versions of the function. A good collection of drivers is a great asset when it comes to testing.

Here are a few tips for creating a good unit test.

How do you eat an elephant? One piece at a time.
If your code is structured properly, it should be fairly easy to isolate individual function calls. To isolate a function, it should only contain calls to other functions that have been unit tested or to stubs that return a known value. Your stub should return valid and invalid values so you can see how your function will respond to different stimuli. This way, your testing is focused, and you can be confident in your test and in the code.

See the world!
Programs can become complex quickly, and you need to have a plan to handle the complexity. When unit testing a function, map out the different paths that the function may follow, and test each path. At times, this may not be a reasonable task; it is hard to test all types of error handling. You should, however, be able to check most of the paths through your function with just a few tests. If your function requires many tests to ensure that each path is checked, the function may be too complex and you should rewrite it.

Push it to the limit.
I'm sure you have written code that works for a specific scenario you had in mind. A short time later you found out that the function didn't account for all of the possible values that it should have. You fixed the code to accommodate for the newly discovered values, but probably had a haunting feeling as you wondered what else you might have missed.

When you test a function you need to see how your function responds to many different values that could be passed as parameters. For example, if you have a function that takes one integer as a parameter, and your program assumes that the integer is between 0 and 9, you should also pass -1 and 10 to see how the function responds to values outside of the given boundary.

Unit tests, which are focused on the individual tasks of a function, test every path through a function, the extremes of the function, and can take some time to develop. By spending a little extra time developing thorough unit tests to test your code as you develop it, you can be more confident that your code will handle the tests that the testing group will run. Instead of building a tower of cards, you will build a structure that will stand up to the rigor actual use requires.

Automobiles contain very complex systems that have been developed independently of each other. The key behind much of the improvement we have seen in the auto industry over the past 20 years is that the engineers have begun to test each component's design as the component is built. When each of these high quality components are assembled together, you have a high quality automobile.

Once our industry begins to build more robust software, we may be able to throw our own jabs at the automotive industry. Until that time comes, however, I will be happy to let GM continue to build "low tech" cars, while the software industry tries to catch up with the auto industry's higher standards of quality.

Copyright 2001 Specialized Systems Consultants, Inc.

Tuesday, July 27, 2004

Boo !



Friday, July 16, 2004

I should mark this phrase "Glistening Gult".
 
There is the usage of 'The sun rising in the west' in Tamil to refer to something that is improbable. I think I will make a change and start using 'Nice Gult' instead of that because this too is improbable..
 
Man..."Who let the Gults out"..

Wednesday, July 07, 2004

I think people should take pride in their age, whatever it might be. I am reminded of how Julianne Moore had said that she wouldn't want to hide her age because age brought along with it so many experiences. Why hide all of them ? Why deny having experienced life all these years ? Even though it is easy for me to just say it, I feel one should feel proud of the fact that one is 'so many' years old. This complex seems to affect women a lot more than men. Like the women who want to desperately show off their bodies in those painful thirties. The whole of their attitude is screaming 'Somebody please look at me' ..Like this person at my workplace. She has just resumed her career after a child birth and break. She was supposedly wearing a sleeveless salwar today and I didn't notice it until she lifted off her dupatta when I was talking to her. And I definitely did not want to see those armpits. I was screaming in my mind 'Save it for somebody else'. I am pretty sure that it was done intentionally to show that she is still capable of carrying off a 'sleeveless'. It doesn't bother me whether it is a 'sleeveless' or 'sleevefull'.But it set me thinking. If such were the attitude towards me what would it be towards men ? Pretty easy to understand.

I have learnt a lot about how not to be by observing people.I think women, including myself are a lot insecure. They have this unexplainable need to prove themselves all the time. I have only a fair idea of where this stems from.Maybe even when they are small children, they should be told that what they do does matter and they need not seek approval for what they do. And that they are as good as anybody else.

Or maybe it is just how things are in Venus.
I am reminded of what my good old friend used to say - 'Anyday I can leave all this software coding and start coaching people for engineering entrance examinations'. And that used to keep her a lot more confident. I feel one should be familiar with some trade/business idea which he/she can go back to. This is very important in this age of huge loans and the 'uncertainity of software industry'. Uncertainity because outsourcing from India has already begun and one should be prepared for it. Prepared by having another skill/experience in hand.

On an extremely different note, I am reminded of Morgan Freeman's words in Shawshank Redemption when he says "These [prison] walls are funny. First you hate them, then you get used to them, then you start to depend on them."

Tuesday, July 06, 2004

These days I have been thinking a lot about people who 'yap yap yap' at office. I came across this as as a rant on craigslist.org. Here's a lady who is giving hell to a person whom she dated once. She has a long list on the 'best of craigslist'. Here is what she has to say about his yapping.
------------------------------------
11. This one's a bonus - your monologues. Jesus F Christ, I must have been lonelier than those bastards on Gilligan's Island to listen to you drone on and on about your melodrama, your insecurities, and your hyper-sensitive experiences in the world. Save that shit for your therapist, dude. (There's a reason they make upwards of $300/hour - they have to listen to human garbage. I don't!) I am surprised my ear didn't literally fall off from your incessant yammering. Here's a clue: a conversation is between two people, a monologue is one person droning on while the other wishes they were dead

Monday, July 05, 2004

I don't mean to say that those who run non-profits should deny themselves of pleasures of any kind and subject themselves to pain. I certainly don't expect this. But it is something about the way they approach a problem. They always have this attitude 'What is in it for me?'
I saw an ad in craigslist about a non-profit in Bay Area which rescues Cocker Spaniel breed of dogs. I can understand a 'non-profit' which rescues dogs.Does this mean that they won't rescue other breed of dogs ? Non Profits are beyond comprehension these days.Reminds me of a highly pretentious CLASS in Santa Clara. They stand for 'Community Leaders at service of Society'. It should be instead 'Corrupt Leaders at Selling Self'...

Gone are the days when non-profits were considered 'humane' organizations which shall reach out for those in need.
Google
 
Web sritopia.blogspot.com