Pages

Friday, December 12, 2008

Land of Gandhigiri ?

A trip to India after two years; with expectations of not many changes, yes my country did not disappoint me. The only shocking change to me was the skyrocketing inflation, which put the commoners under pressure for their daily bread.

Well it was rejoicing to meet friends and family after a long time. But there were some pinches which I would like to discuss, and that’s the whole point of this post.

In the west you are used to treat everyone with more or less with the same respect and attitude. The difference is huge in India; this is not something new as we know. But what happens when you try to show the same mentality of equal respect and attitude towards people in India, I happened to encounter several occasions where I was feeling that I’m the one left behind with setback. I can quote some example(s) to plot the frame in your mind.

I went in to a restaurant with my friends for dinner, for the first time I felt that my friends were rustic. The way my friends treated the waiters and service men of the restaurant, was hurting my feelings. My friend would say, “Bring this dish immediately”, “won’t you tell beforehand this dish is going to take so long to prepare”, “Make it fast”, and all this with the body language, for which I have no excuses. I didn’t want to comment on this act, as I felt I would be cornered by saying look at this bugger from the USA.

As a next example, I go in to dine with my relatives and the same experience; even worse. I was just holding my words and waiting to tell them not to play bosses.

But the worse stuff is when I tried to be a polite and nice guy. I would go by “Please, Thank you” and with due respect and patience for the service men to answer. I would listen and respond when I get my turn and make them comfortable by my words; so as not to trickle the feeling of servility in them. In return what I got was an improper response; they did not mind listening to me. But they did quick and good service for those who show the bossy attitude towards them. I could not stop getting frustrated couple of times, as I expected a good service in return for the way I treated. I was told to wait for a long time; as I saw the dishes going to the nearby tables, which was occupied only later. I was even convincing myself what if the nearby tables were advance bookings, but I confirmed that they were not. I spoke to couple of auto rickshaw men by being a polite and nice guy, for what I was taken for granted and fooled with more service charges.

My thought, why didn’t people respond properly as I expected, is something wrong in the society and system? If I recall the Indian history correctly, we were ruled for over 200 – 300 years by the Mughals and later by the British. This had changed our mindset to behave the way we are today, with servile attitude.

I wouldn’t again generalize this (knew only some of you could be in consensus with me), as there have been tremendous changes in the attitude of the Indian people, but there is lots more left to change.

As the land of Gandhigiri people should realize that love should be the force and the language of communication for the day today things to work.

Tuesday, November 18, 2008

String combinations using Brute force algorithm.

I have received requests in the past, to post answers for my interview questions (To find my interview questions, search for the tag "interview" in the right side pane under Ram cloud).

I thought let me write this one, string combination. One can find many different implementations through iteration to the permutation and combination of string in the internet.My code below; implements Brute force algorithm to find the string combination and prints them.

[The iterative pattern for the same, is considered to be one of the tough interview questions.]

Language: C#
Compiler: .NET framework 3.5
Platform: Windows server 2008, Intel Core2Duo X64.

// ****************************************************************************
//
// Copyright (C) Global Handler. All rights reserved.
//

// ram@globalhandler.com
//
// This file implements the brute force algorithm to find the string combinations.
// Note: The code is not warranted and not tested.
//

// ****************************************************************************

namespace StringCombination
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

///
/// Functionality to find the string combinations.
///

public class StringCombo
{
#region -= Variables =-

///
/// Dictionary to hold the unique strings.
///

private Dictionary stringDictionary = new Dictionary();

#endregion -= Variables =-

#region -= Constructor =-
///
/// Constructor of
///

/// The input string.
public StringCombo(string givenString)
{
if (String.IsNullOrEmpty(givenString))
{
throw new ArgumentNullException(givenString, "The given string is either Null or Empty");
}

//Find if the given string has unique characters
if (!FindForDuplicatesInString(givenString))
{
throw new ArgumentException("The string contains duplicate characters, please enter a string with unique characters");
}

int dictLimit = FindTheFactorial(givenString.Length);

GetTheCombinationsForAString(givenString, dictLimit);

PrintTheStringCombinations();
}

#endregion -= Constructor =-

#region -= Private Methods =-

///
/// Method to find the unique string combinations.
///

/// The given string.
/// The maximum combinations.
private void GetTheCombinationsForAString(string givenString, int dictionaryLimit)
{
Dictionary dictionaryForControllingRandomValues = null;

do
{
dictionaryForControllingRandomValues = new Dictionary();

do
{
DateTime currentDate = DateTime.Now;

Random rnd = new Random((int)currentDate.Ticks);

int number = rnd.Next(0, givenString.Length); //max number is the input string length.

if (!dictionaryForControllingRandomValues.ContainsKey(number))
{
dictionaryForControllingRandomValues.Add(number, givenString[number]); //char at the given index.
}

//repeats until the count of dict reaches the input string length.
} while (dictionaryForControllingRandomValues.Count != givenString.Length);

StringBuilder sb = new StringBuilder();

foreach(KeyValuePair stringForAddingToMainDict in dictionaryForControllingRandomValues)
{
sb.Append(stringForAddingToMainDict.Value);
}

if (!this.stringDictionary.ContainsKey(sb.ToString()))
{
this.stringDictionary.Add(sb.ToString(), null);
}

//repeats until the string dictionary count reaches the maximum combinations expected.
}while(this.stringDictionary.Count != dictionaryLimit);
}

///
/// Method that finds if the given string contains unique set of characters.
///

/// The given string.
/// Result of evaluation.
private bool FindForDuplicatesInString(string givenString)
{
Dictionary duplicateCharTracker = new Dictionary();

for (int i = 0; i < givenString.Length; i++)
{
char value = givenString[i];

if (duplicateCharTracker.ContainsKey(value))
{
return false;
}
else
{
duplicateCharTracker.Add(value, null);
}
}

return true;
}

///
/// The method that prints the string output.
///

private void PrintTheStringCombinations()
{
foreach (KeyValuePair uniqueString in this.stringDictionary)
{
Console.WriteLine(uniqueString.Key);
}
}

///
/// Method that gets the factorial.
///

/// Lenght of the string.
/// The factorial value.
private int FindTheFactorial(int lengthOfString)
{
if (lengthOfString == 0)
return 0;

int factorial = 1;

for (int i = lengthOfString; i > 1 ; i--)
{
factorial *= i;
}

return factorial;
}
#endregion -= Private Methods =-
}

class Program
{
static void Main(string[] args)
{
StringCombo stringCombo = new StringCombo("abc");

stringCombo = new StringCombo(null);

stringCombo = new StringCombo(string.Empty);

stringCombo = new StringCombo("aaabc");

stringCombo = new StringCombo("12345");
}
}
}


--------------------------------------------------------------------------------
For any questions and comments, please log the comments in the blogpost or alternatively email me at ram@globalhandler.com


Adding the below approach from the comment section:

say you are given a string "abc"

now, make 2 strings (clone and combine & reverse, clone and combine)
abcabc and cbacba
read out them like
abcabc -> abc, bca and cab
cbacba -> cba, bac and acb
combine them
abc bca cab cba bac acb

You know, space is no more a constrain for devs its the parallelism that matters - all that we can do is fork two threads to read them out.

This could very well be tailored using Map/Reduce for large scale clouds and clusters.

Saturday, November 08, 2008

Choosing what you worship

I was confused looking in to the program "god vs Satan" in the History channel, the confusion is that most of the major religions treat snake/serpent as the first incarnation of Satan in this world. But Hinduism treats snake as god, at least a considerable sect of Hindus do so. So is Hinduism a contrast to others?
I was curious to know why is snake worship followed by Hindus?

I started my search in the search engines to get more answers...

And from what I read I was able to deduce that humans tend to submit themselves to the ones that are mightier in some way to them. A snake in nature is poisonous, but humans are forced to live in the same ecosystem as the snake, this creates the classic problem of man vs animal and who survives over the other?. In almost all the cases in the present days we win, but that was not the same in the olden days. So humans developed a habit of pleasing the ones that they could not withstand.
To give an analogy, If I were to fight a boxer, either I have to die or please him for my survival. And guess what, humans wanted to live and chose the later. This practice put them to please the snakes and treating them as gods.

More on animal worship - http://en.wikipedia.org/wiki/Animal_worship

Thursday, November 06, 2008

Why so many definitions for one? Cloud computing.

There are hundreds of definition for cloud computing, lying around in the internet. I was just wondering why do people give so many defitions for the same thing.

Only after couple of minutes, was I able to figure out that the definitions are targeted for different audience, and not necessarily defined because of the people who were involved in creating the definition could not understand/get it correct.

Then I thought of a common example, rather than a technology.

It's like if I were to define an elephant, one could say it is a animal > mamal > and go on to define it's properties/attributes like it has legs, tusk, eyes, etc. Another definition could be that, an elephant is a domesticated animal in the temple, which is a vital part of the ceremonies in the temple. The later definition is just a subset of the earlier definition. The later may well fit the definition of an temple elephant but not the elephant as a whole.

Now the analogy, the various subsets of the cloud computing could be,
[1] Building data centers and running software to be consumed.
[2] Running all the applications online and using browser as the interface to work.
[3] Flexibility to store any of your data, somewhere in the cloud and pull it out as and when required.
And there are much more of these definitions, let me leave it at that.

The three different definitions of cloud computing above, are all like defining what a temple elephant is. The definitions itself could not be called invalid, say the audience for the definition #2 could be the end users who do not have to worry about the data center or virtualization or what goes behind or beyond their scope.

But for a company that is part of the cloud computing paradigm, all the three definitions are subsets of what cloud computing is in a whole.

Thursday, October 30, 2008

Levels of programming, based on design principles.

Just a small writeup based on the programming design style, that I commonly come across with various programmers.
To give some context, let's take an example of creating an object called car (automobile).

Level 0 programmers are those who think, writing more common code is better and generalize them in to static methods that take numerous parameters.

public static void CreateACar(Engine engine, Color color)
{
//rest of the code here;
};

The problem is if the car needs to be created with a new property like sedan/coupe, then a new parameter needs to be added and this keeps growing. If the arguments grow then they add a structure to encompass all these arguments and pass them.

The next level of programmers are those who treat each of attribute of the object as it's property and create a class like the below:

class Car : IAuto
{
private Color color;
private Engine engine;

public Engine Engine
{
get
{
return this.engine;
}
set
{
this.engine = value;
}
}


Public IAuto CreateACar()
{
//rest of the code;
}
}

The above code works great, even if there are new parameters to be added. It is as simple as adding new properties and verifying them before creating the car. But some assumptions have to be made, say this car runs on a "road" and the car creation assumes the road to be some type (could be Enum) and ties the object to it. What if the road's condition changes and a car that code run while creation cannot run all the time on the road. Some cases/scenarios while creating the car is missing and it does not cover all the situations. This is what happens when the object is strongly tied and has lot of properties.

The next level of programmers are for making functionalities atomic with individual classes and then tying them together based on the scenarios or rules. The rules defines what goes in creating the car object.

say it could be class Road, class Car, Interface IAuto etc.

Looks like more classes that has smaller functionality. Yes, exactly these are all small dumb classes and are atomic. But when combined with the rules and scenarios that change time and again, they come in handy as they are very flexible and requires less change.

Take the .NET library, it exactly fits the last design model discussed, more dumb classes combined together giving a great flexibility and power for creating more applications.

This is a followup of my initial design post - http://globalhandler.blogspot.com/2007/05/software-design-goals-and-philosophies.html

Wednesday, October 15, 2008

Brain Threa(t/d)s - could be read as threads and threats!

This post is about controlling the brain to send neural waves to perform a desired action. This is not something new, but here are some unwinding topics.

Thought control headsets are used in virtual worlds for gaming. These headsets pick the brain signals and transform them in to actions.
Now let's see how can the same be put in to use in a real world.

There are numerous tests going on to identify, how the actions derived from the brain signals could be applied to the real world. In a virtual the environment is controlled, which means the actions are just simulation that is perceived by the users. Hence there is no real damage in the case of a ill action being performed. But in a real world the game is different things are real and the actions carried over will have real impacts. The human brain is known for its humongous parallelism. So how does this parallelism help or affect the actions in a real system?

So what would happen, If anyone can get on to such a brain controlling system operating (in a real world) and perform the intended actions?

To give it a shot with a better example,say if some one wants to control car driving using the brain signals.
Well, there must be a system to take care of the mind vs body reactions (heart rates etc) and then apply the actions. Based on the actual brain signal the system can decide whether or not to perform the action, to control the ill effects. In any case you would need a controller for controlling the brain signals.

So this brings the question, Is the human brain not yet mature or over mature?
Does that also mean the human brain's thought(s) are indomitable?. I could just think of techniques like meditation that would help one to focus on the brain control and help achieve what is just intended in a situation throwing the rest away. Conclusion here is, taking the risk to perform the above experiment needs to start with in some controlled environment.

To illustrate the power of the human brain and it's parallelism, here are some facts:

http://www.merkle.com/brainLimits.html
http://www.dailytech.com/Visual+Circuits+Harness+the+Power+of+the+Human+Brain/article12478.htm
http://www.transhumanist.com/volume1/moravec.htm
http://www.livescience.com/mind/
http://news.bbc.co.uk/1/hi/technology/7254078.stm

Wednesday, October 08, 2008

Soon to be born, with communicator

It will be no surprise to see communicator chip(s) injections. These injections will be used to embed the communicator chip(s) to the human bodies. And everyone will be a cyborg. No later will the new born babies be injected with these chips along with their regular vaccinations.

This embedded chip will bring in features to talk freely in any language (there will be real time translation), no extra hardware for making calls. You just have to think, it dials to the satellite and connects to another human/chip. No more hassle of service plans from different providers.

Just thinking on what more could be added here...?

Friday, September 05, 2008

search tip.

When trying to find a tool usage, I was stubmling on how to write a phrase to get a better search result.
prelude:
I was trying to build a csharp (C#) class file using the xsd.exe tool. The tool takes in the input schema and generates a proxy class for you.
I had the schema dependent.xsd, which depends on provider.xsd. I need to know how to use the tool to consume the two schemas and generate the class. (The xsd.exe /? itself did not give the info, and I had to go to Google/Live)

I tried the query "xsd.exe /c a.xsd b.xsd", and I got the search result that I was looking for. Simply replacing the names of the files to the most simplest usage helps. It is worth trying such queries with the naming conventions "a,b,foo,bar" rather than thinking on what to write. Just my 2 cents.

I give up!

Not long before I jumped in to the geeky world. One cannot continue to live unless having updated with the inundated wealth of information. Oh that’s new you must learn it; you will be a most sort after guy. Oh no the other one is coming up you must learn that too, yep learn everything. But you cannot and you will not, is what I realized after it was already too late. And finally I gave up.

Stop all the non-sense stuff no more information can enter my brain, it is jammed and the memory is leaking. And people call me Ram (Random Access Memory), knowing this poor creature can store only less and that too not permanently, self pity?

Does the buzz of IT remain all the way same in the future? How could these people continue to invent what they invented in different ways and keep the wave of buzzing alive?

Ooops, did I sound correct? As in computers we have object oriented programming ....s for???, I do not know what does‘s’ stand for. How the hell can I forget the basics? don't tell me you work for the biggest software company.

My friend(s) come with different topics of books, hey you must read this to write solid code, complete code, secure code, and a year after with solid code II, complete code II, secure code III (The III was intentional, if you have wondered btw. And I'm sorry if I have missed some other code(s)) . All I’m gonna write is one code and why do I write it in so many different ways, to keep the code reviewers happy? Well maybe.

I understand the megalomania, as the world moves there are new IT happenings and we make it happen otherwise the world will not move. I see the vicious cycle now!!!

My rumblings :(

Do I write this blog post? I’m going all the way ironical doing so. Using the computer which I wanted to get rid of almost daily or if not so badly this week. Watching myself like an idiot, starring at the code and taking the spiting’ and puke’ of the visual studio IDE. Horrible isn’t it?

I am almost glued to this piece, do I have control or is it controlling me. Oh now I know, all the AI based movies like Terminator, Matrix are masking my brain or may be mind, huh whatever it is. Days are passing and moments are grinning, yet the sorrow continues in boredom and misfortune. Oh my god when do I get out of all these miserable stuff, am I cursed or is my karma taking me this way. I have become a grudger to the core. Oh no enough stop these rumblings tells my mind, but my computer is pulling me in to do more write up.

Enough, this time certainly! Thanks for all the associations and sharing the grievances. Now get back to work. OK Ok just read one more statement and I let you go.
No you guessed it wrong, I ‘m not writing this after a day long work, it is the first thing I have done today. What a refreshing start!!!

Wednesday, September 03, 2008

Has Chrome got the metal to move IE?

seattletimes.nwsource.com
www.mercurynews.com

@Velu has to say the following: (From the comments section)
Chrome is just a rip of Opera - from the Speed dial to the + button for opening the new tab. Then the devs thought they are doing injustice by just copying opera and hence picked a few from IE8 too like domain name highlighting, omnisearch and "Launch browser windows in a new process" ...

This would be a total flop release for the very reason that it lacks novelty and performs just as good as Opera7.

Tuesday, August 19, 2008

VS2008 SP1 RTM stops intellisense from working

Recently upgraded to VS2008 SP1 RTM, as I wanted to try SQL server 2008. VS2008 SP1 is a pre-req for the SQL server installation.

After the installation, I opened my visual studio IDE to see that the intellisense stopped working. After a day's struggle found that the Text Editor->All languages setup was screwed up like below.

Navigate to Tools->options->Text editor->All languages and just un-check and re-check the last three check boxes. Now the IDE behaves as expected.

Friday, August 08, 2008

Random number C#.NET

The following code tries to get all the possible numbers in the given range(continuous), by implementing a dictionary that keeps track of the uniqueness and the total count.

Random rnd = new Random();
int max=10, min = 1;
int maxCount = max - min + 1;
Dictionary < int, int > finalDictionary = new Dictionary < int, int > ();

while(true)
{
int newValue = rnd.Next(min, max);

if (!finalDictionary.ContainsKey(newValue))
{
//New key not found in dictionary add it, provide a dummy value
finalDictionary.Add(newValue, 0);

//Stop here, reached maximum
if (finalDictionary.Count == maxCount)
{
break;
}
}
}


Note: The above program runs infinitely, beware of out of memory!

Apparently .NET framework does not generate the max number in the range. After all MSDN says, the random number generator is not completely random. Albeit, what I do not understand is why doesn't the framework able to get the last number in the range at least once?.

If you want to over come this situation you can go by two ways,
(a) Increase the range by 1. example: make max=11 in the above case or
(b) Keep the maxCount as max-min (instead of max-min+1) and exit the while loop. Finally add the last number to the dictionary.

Friday, August 01, 2008

Revitalizing Live

Live search is remarkably being revitalized with better interface. Just navigate to live.com and search for any video. Mouse hovering on the results plays the thumbnail clip and it is seamless. I love the improvements made to live search.

Thursday, July 24, 2008

For the fellow bloggers

I came across this interesting website http://www.blogherald.com/, read the blog disclaimers it was very helpful.

Tuesday, July 22, 2008

If not integrate then sync and vice versa

A lot of the technology companies are driving forces behind synchronization and integration these days.

Reason for synchronization and integration: We are clearing up the mess we generated by experimenting and developing ubiquitous things in the past decade(s). No, I didn't mean to say we should not have experimented or tried things. One part that lead us to the state is the human nature to create a unique footprint for themselves. (which resulted in many different devices doing exactly the same thing)And the other part is choice; which is very important, everyone needs variety and that is the reason for the so many flavors of the same products. We have hundreds and thousands of phone models, may be hundreds of TV models, and the list goes on. But what next?

When on the one side we are thinking to create new devices (I mean novel); on the other side we are trying to make the existing devices work better, predominantly making the existing devices works better amongst themselves and not as stand alone. (To me, the known devices are working well enough as a standalone)

So what does synchronization have to play here? Well synchronization is the way of making things look seamless and sharing the data across devices and platforms. Based on the situation a user chooses what to use, but would always want to stay updated. Meaning, if I receive a mail to my mail account and if I were at travel I want to see the message from my mobile phone.

The other part is integration, making things simpler in the front and adding complexities in the back. The devices that are built are integrating different form factors in to one and increasing their capabilities. Your TV is as intelligent as your PC, and your PC can do a lot of work as a phone and your phone can have a mini pc and a TV in it. So every device is adding a feature from other devices or the other and becoming SMARTER.

A good example for synchronization product is Apple TV and a good example of integration is smart phone.
But why two ways to solve the problem of many devices, well we like different flavors don't we? Part of the answer is yes, the other would be, we have done so many things that cannot be ripped off right away.

Things that cannot be integrated are being synchronized and things that cannot be synchronized are being integrated.

IT is a one world in many and many in one world.

Monday, July 21, 2008

Google shopping search - errors for WallE

Last week I had a chance to see Wall E, amazing movie from Disney Pixar duo. I enjoyed the movie and could not stop appreciating the creators.



I wanted to buy the WallE toy, and tried Amazon, Live and Google.

Live product search could not understand "WallE toy", it returned me two pages of search results that were not related to toys. It seems Live can only understand "wall e" or "wall-e", does not live up to expectations.
Then tried Google shopping search for "walle toy", obviously I saw huge set of search results. Then I sorted by price:low to high, waiting to see the affordable ones that I can pick. The search page started with $0.10, I kept naviagting to the next 10 pages at a time (Google also populated a set of new 10 pages at a time). When I was at page 73, I saw the link until 82nd page as below.

Then I tried to navigate to page 82, it resulted in a error. I tried the lower (< 82) pages and figured out the links were broken. It worked only until the 75th page that had the last item priced at $2.99. The first search without any sorting resulted in a $49 item, which I did not see in the sorted results. This was not just a one time issue, I was able to reproduce the same issue multiple times!


This kind off keeps me happy in a way, "software engineers still have work to do".

Thursday, July 10, 2008

"Brute force" as a last option.

Brute force is not a highly recommended method to solve a problem. But it comes handy at times, when you want to have a solution and do not care about the time and space complexity.

Often during interviews you would be asked for questions such as find the combinations, permutation, choices, etc for a given string/number. You are now being tested to think logically to get the combinations in a simple and effective way. An effective way is to split solution in to number of patterns for example: one pattern might have to do with reversing the locations of the previously considered number and the current number and continue to the next; another could be looping through only the positions that are even etc. Finally the combination of these patterns could give you the whole solution.

But even after thinking hard and if you are not very confident about the solution, then it is OK to ask the interviewer that does (s)he care about the solution or a solution with effective algorithm for time and space complexity. Often (99%) the answer would be yes give the solution first and I might ask you to improve the performance later. Remember you do not have plenty of time in an interview, so impressing the interviewer with a solution often would work. (But you must genuinely try for the best solution and only if not possible go to other options)

The easy way to apply brute force in a typical problem like permutation combination would be that,
step1:
Identify how many number of combinations would result first. For example: with the number 123 you can form 123, 132, 213, 231, 312, 321 are the possible combinations and it is as easy as 3! (Factorial -> 3*2*1 = 6). You must figure out the logic for the given problem to get the number of resultant combinations.

step2:
Build a dictionary (hash table) say a .NET dictionary, such that when the dictionary reaches the maximum limit of the number from step1 you are done with the combinations itself. Now how do you populate the key and values in the dictionary?
The key will be the combination itself; like 123/231/321 from the above example. To get that combination of numbers you can loop through a random number logic which will pick a random number each time, controlled by a limit. In this case it could be get three random numbers and if a random number is already obtained go and fetch another which is unique. After you keep repeating this and get the number, verify if that number is present in the dictionary or not, if not update the dictionary with the key and store a dummy value like 0 or 1 (unless you wanted some logic in the value field too).
At the end of iterations you will get the dictionary with all the combinations you need, but who knew off the CPU cycles that your algorithm consumed.

Applying brute force helps, but find a better way!

Monday, June 23, 2008

Microsoft as a raw material supplier!

Microsoft vs Google, this topic has been widely discussed across many portals, web, forums etc., in fact even in my blog a couple or more times.

Following are some of the frequently asked questions (FAQ) on this topic:
Is it the late entry to web by Microsoft? Is it the pc centric approach? IS it becoming tough for the giant to move?, All sort of questions trying to answer why is Microsoft trailing behind Google.

To me the key things happen to be the difference between a raw material producer to the finished product maker, the former is Microsoft and the later Google.

Raw material and finished product stuff here?-yes but how?
Web development could be done either based on open source(Java-J2EE/PHP) technologies or Microsoft .NET technologies. Adding multimedia capabilities on web is possible based on Adobe Flash or Microsoft Silverlight. So if you think of the infrastructure for building huge websites you can use Microsoft technologies end to end. Sql server -> IIS -> MSMQ -> client browser as Internet Explorer and the client web pages developed on ASP.NET. MySpace one of the top most hit websites in the world, built it's entire infrastructure on top of Microsoft technologies. So we see Microsoft as an enabler and a raw material provider here. End users knew the final product better than the raw material. Protector & Gamble (P&G) produces numerous products used daily by all of us but we never know or care about the raw material suppliers to P&G, and the profit made by P&G is huge compared to it's suppliers. The same story is happening with the technology sector, it is one who has the final product gets the most out of the technology. Microsoft did not have a strong web presence (despite it's early entry by hotmail, other MSN websites and now Live)in terms of the list of users. And being eaten away by the popularity of search engine Google.

Not to forget Windows OS and office are still finished products to the end user and also only a section of Microsoft is competing against Google as Microsoft is so diverse with the product. But not every day one changes these software, it is once a year thing!! It is very easy for one to forget the once a year stuff and embrace the others.

But it will be very interesting to see how both the companies are going head to head. On one side Microsoft is playing the catchup on search and advertising with Google. Google is expanding its empire in the new areas where Microsoft has a strong hold.

Wednesday, June 18, 2008

Simpler is better!

The best way to vouch customer experience is to design your applications as simple as possible. Hiding the complexity behind the scenes and making things simple and stylish to the user is the mantra to succeed in IT today. Over the years one company has excelled in delivering the easy to use software, yes I am talking about Google.

I was just trying out Google sketchup, and felt they live up to their name again.

Per my analysis this is what makes Google a dominant player in the market. Consistency in delivering simple to use user interface, the core functionality always works and only then they start adding new features, any new application they build has a small comprehensive youtube tutorial (the release mechanism is always the same), brief write up in their blogs and the tag "beta" to it.

The tag beta works out well, as it creates a mindset not to expect more from the software and the bugs are taken in a lighter sense as it is just beta. But the beta itself is good!.(It is not that there are no bugs, I have found bugs in gmail - label coloring. Having a label list > 20 and try to add a color to a label automatically scrolled the page to the bottom and wouldn't allow to choose the label I'm interested in. Do not know if they fixed it.)

The time taken for installation is also very important for small and powerful software such as instant messenger. Try downloading and installing Yahoo messenger you feel the bulkiness of the application, taking significantly much longer time at least 7-10 times of the time required by Google talk. Choosing the powerful language and tools appropriately for the application you have decided to built is a huge differentiator.

Just take the example of the search engine page or simply http://www.google.com/, you just see few simple images and text. One should have noticed the search results by Google, at the bottom of each webpage there are set of images "GOOOOOOOOOOOOOOOOOOOOgle", the number of o's denote the set of new pages with results. This allows the already cached image to be loaded and makes the search results appear/load much faster.

Organizing the categories of the softwares and periodically changing the highlighted software in the main Google page is a very small thing, but those stuff adds up to the power of Google.

Thursday, June 12, 2008

Making VB simple with XAML / LINQ. Oslo Microsoft's modeling strategy!

Based on my recent study I would like to summarize a few things, and thought would share with you guys!

http://blogs.msdn.com/bethmassi/archive/2008/06/12/dynamic-ui-with-wpf-and-linq.aspx

Based on this blog, you can see than VB.NET can directly have XML and LINQ and can be interpreted by the compiler.

The way programming IDE's/libraries are being introduced/modified now a days make sure it is not required for one to know everything. What I mean by this?

See the code in the blog (mentioned above), you see XML as XAML, at compile time you would come to know if "" can have ColumnDefinition, if not based on the schema - http://schemas.microsoft.com/winfx/2006/xaml/presentation, the error will pop up. See the way XML is being used, it is not within quotes which mean it is directly understood by the compiler. The other thing is LINQ, one can use database calls (update/delete/insert/alter etc) directly like what we do with objects, your table is treated like an object. So say if you want to see the properties of column, when you key in column and 'dot' you get the ColumnName as a property. Again you get things right away in compile time.
Having said both the above, the third parameter is the way XAML and LINQ are combined, see the statement Name=<%= column.ColumnName & "Label" %>, here Name is a XML element and column.ColumnName comes from LINQ. And all these are inside the VB language.

Recently I saw a presentation at Microsoft Tech-ED (Link for tech-ed -> http://www.microsoft.com/presspass/events/teched/default.mspx, see Bill Gates keynote) where they showed the progress on visual studio, which can access a DB2/ORACLE database like an object model. There is a huge focus on modeling, see these links - http://www.microsoft.com/soa/products/oslo.aspx and http://arstechnica.com/journals/microsoft.ars/2008/02/07/microsoft-working-on-new-declarative-programming-language.

Modeling allows one to conceptually visualize what is happening inside a project/code. Say you are asked to fix a particular code for example related to security aspect of the product, in order work on that you might have to encompass things that are non-security related (things like GUI etc), so this makes things tougher. What if there is a model which allows you to extract the set of things that you might like to see at the moment. That model will have all the blocks and inter-relations defined, and if you pull up a security block from the model you get all the code that is only related to what you are looking for. So you don't have to worry about the other things in the project.

Tuesday, June 03, 2008

Wednesday, May 28, 2008

windows 7

Would Windows 7 meet the needs ?



The way of handling senses (vision, touch, speech) would be the sales pitch!

Time for collaboration

The way we work is becoming more and more networked. Day by day different cloud based solutions are popping out as a platform for viable collaboration. Some are more granular and some are not. I incidentally came through some of the idea management/collobaration sites and seemed to be a very interesting area. WebStorm from BrightIdea caught my eye and I spent more time reading what they do.

Thursday, May 22, 2008

Hit century

A small accomplishment on my end, with my last blog the total number of blogs @ Global Handler blogspot touched 100.
Thank you all for your suggestions/critics/appreciations.

Hope I can further improve my writing, depth of the topic, and diversify topics.

Miles to go...

Wednesday, May 21, 2008

Interview questions coding design and analysis - part II (Web programming)

1. Jeff Bezos has decided that he doesn’t like his amazon.com website anymore, and he has tasked you with identifying a suitable platform for his online bookstore application. He wants you to build the new website from scratch. Let’s assume that he wants you to design a system that keeps track of 100 million books, allows 10 million users to browse through the selection or quickly search for the book they want via the Internet, keep track of users’ preferences, and permit secure online purchases. What technology or set of technologies would you use to accomplish this task? Please defend your choice against other possible alternatives.

2. Considering the lifecycle of software development, and keeping in mind that Jeff doesn’t want to change the chosen web technology/technologies for at least 3 years, but that he does want to have the flexibility to make significant changes to the application if need be, are you still confident that your choice is the best? Why?

3. What are some of the things you would do to increase the availability of your database, as in “make it mission-critical”? Assume you have infinite resources.

4. Bob Millionaire just purchased some apartment buildings and would like you to design a database system that will enable him to properly oversee and manage his new investment. He will be hiring several building managers to help him handle the day-to-day problems and issues that will arise for his tenants. While some of these managers will be placed in charge of only one building, others could manage several. Bob would like to be able to use the system to see what buildings his managers are in charge of, and would also like to keep track of each manager’s name, phone number, address, and weekly wage.

Bob would also like to keep track of his tenants. He would like to be able to look up any given tenant’s name, phone number, apartment number, rent rate, and lease expiration date. It is also very important that Bob is able see in which building each tenant is currently residing.

From time to time, tenants will register complaints that Bob’s building managers will need to address. For each complaint, Bob would like to store the description of the complaint, the resolution of the complaint, the manager who resolved the issue, the date the complaint was registered, the date the complaint was resolved, and the tenant or tenants who registered the complaint. If two or more tenants register the same complaint, Bob would like the complaint to be entered into the system only once, but would still like to keep track of all of the tenants that registered the complaint.

a) Using the scenario above, describe how you would design the database. List all of the tables you would create along with the fields you would create in each table. Clearly mark your primary and foreign keys. If you make any assumptions, please state them.


b) Using the database you have just designed, write a SQL query that lists the name of each tenant and the total number of complaints they have ever registered.


5. Use the rules below to construct a class diagram. You may use UML or some other technique capable of communicating what classes would be created, what attributes would be created in each class, and the relationships that would exist between the classes. For each class, do not worry about methods, just the attributes and relationships that might exist. Indicate attributes only when necessary (you will not need to fill in attributes for all of the classes). If you make any assumptions, please state them.

a) There exists a company in which there are several software development teams.
b) Each software development team has a number of developers.
c) Within each team there are two types of developers--Senior Developers and Junior Developers.
d) All developers have names, phone numbers, and addresses, but only Senior Developers are issued a company car and only Junior Developers are issued a laptop computer.
e) Company cars have a make, model, year, and color.
f) Laptop computers have a make and model.
g) All developers are involved in one or more projects.
h) Projects have a name and an estimated date of completion.

6. Many banks have a telephony service that allows their customers to call in and verify their personal account balance via the telephone. Most of the banks are happy with the default number utterance; however, Bank One believes that it could gain an edge over the competition by personalizing the number utterance. They hired a speech professional to record the following utterances:

Number Spoken Output File Name
0 Zero 0.wav
1 One 1.wav
2 Two 2.wav
3 Three 3.wav
4 Four 4.wav
5 Five 5.wav
6 Six 6.wav
7 Seven 7.wav
8 Eight 8.wav
9 Nine 9.wav
10 Ten 10.wav
11 Eleven 11.wav
12 Twelve 12.wav
13 Thirteen 13.wav
14 Fourteen 14.wav
15 Fifteen 15.wav
16 Sixteen 16.wav
17 Seventeen 17.wav
18 Eighteen 18.wav
19 Nineteen 19.wav
20 Twenty 20.wav
30 Thirty 30.wav
40 Forty 40.wav
50 Fifty 50.wav
60 Sixty 60.wav
70 Seventy 70.wav
80 Eighty 80.wav
90 Ninety 90.wav
- Hundred Hundered.wav
- Thousand Thousand.wav
.01 Cent Cent.wav
- And And.wav
- Cents Cents.wav
- Dollars Dollars.wav

Using C#, please create the algorithm that will output to the screen the names of the .wav files in the proper sequence for any number between 0.00 and 999,999.99. Assume and.wav will be used to join only dollars and cents. For example:
1,234.59 = 1.wav + Thousand.wav + 2.wav + Hundred.wav + 30.wav + 4.wav + Dollars.wav + And.wav + 50.wav + 9.wav + Cents.wav
103.01 = 1.wav + Hundred.wav + 3.wav + Dollars.wav + And.wav + 1.wav + Cent.wav

7. What is one application you created (either individually or as part of a team) that you are proud of? Please describe it in broad terms, focusing especially on your choice of technology, and any algorithms you might have used. How long did it take you to develop it?

8. Is there any database-driven website on the Internet that you created, either individually, or as part of a team?

interview questions coding design and analysis - part I

1. Write a function in C\C++ that converts a null terminated string of a binary number into a null terminated string of the equivalent decimal number. For example, given an input of “001100”, the input string should be converted to “12”.

void BinaryStringToDecimalString(char* s)
{}

2. Given a binary tree with nodes as defined below, write a function in C\C++ which creates an array of pointers to each of the leaf nodes of the tree in left-to-right order. Your function will need to allocate the array. Assume that the calling function will properly zero the array and arraysize parameters before calling your function. When your function has returned, arraysize should be set to the number of leaves in the tree, and array should be a properly allocated array where array[0] points to the left-most leaf of the tree, etc.

struct NODE
{
NODE* left;
NODE* right;
};

void BinaryTreeGetLeaves(NODE* tree, NODE**& array, int& arraysize)
{
3. Assume you have a web service (in the language of your choice) for an online game that displays statistics and other information for the players in this game. This information is stored in a database, and since the database is in production running the game, you must assume it is a bottleneck in the performance of your web-based player-info page. The player information is retrieved from the database and presented to you as an Object (one per player) called Player. Design a persistent in-memory cache of the player information which utilizes a LRU replacement policy. If a player is not in the cache, a database request should be made and the Player Object should then be added. Do not write the code for the database request. You may use pseudo code if needed.

This cache will include the following methods:

Player GetPlayer(String name)

StorePlayer(Player playerObject)

4. Using C#, write an object that when given a file path, will asynchronously convert that ASCII file to a Unicode file. You may use pseudo-code for any boiler plate functionality you deem appropriate, but should implement the main conversion method in code.

5. You are asked to test a simple server application that receives request messages from a client, and generates response messages. The set of requests and responses is known (at a given time; changes can occur during the development cycle as messages are added or removed). You are to test the system’s functionality and stability. What kind of tests would you have to ensure that quality requirements are met?

6. You have been given the opportunity to create a service responsible for searching and displaying information collected from both database archives and other live backend services. Briefly describe how you would decide on an approach and how you would design and implement the new service, including how users will connect and interact with the service.

Thursday, May 15, 2008

13 problems to crack interviews

These 13 problems would suffice as a good preparation material to crack the interviews of Microsoft, Amazon and Myspace.

All the below questions requires you to give the most efficient algorithm interms of time and space complexity.

1. Given a circular linked list remove all the duplicate nodes.
2. Given a linked list sort them and explain what is the best sorting method, pros and cons. Remember this is not array sorting this is a linked list sorting.
3. Given a string find the first unique character in the most efficient way.
4. Given a array say for example 20 numbers, you need to generate an output array that will have the product of all the numbers for every index, except the value in the index. for ex: 2, 3, 5 output would be 15, 10, 6 -
Write the test cases to test your app.
5. Find the permutation and combination of a given string.
6. You are given a method void fun(int num) => the output will be a string for example: abc for 1, def for 2.
Now you need to find all the combinations for the given set. say I give you 1, 2, 3. you will get output from the fun() as abc, def, ghijk
final output should be along these lines: 1. adg 2. aeg 3. afg
At any time only one character from a set should appear, which means a and b are mutually exclusive as they are both part of set 1.
7. Given an array and a value called sum, find the minimum set of numbers that could result in the sum value. Find the first any set you obtain. example: sum is 10 and array is 1, 0, 3, 15, 6, 47, 3, 4, 23, 7, 5
the answer should be 3, 7 and not 1, 3, 3, 4
8. Write the same prog. in which the largest set of numbers will be taken in to account for finding such a sum. This is just the opposite of the required in question 7.
9. Given a BTree each node has an extra data information like sibling. The class for node is like class node{int data; node left, node right, node sibling). You are given a tree that is populated with data, left & right. Now you have to obtain the sibling and add it to each node.
If the tree contains ex: three nodes,. root->left and root->right. for the left node you should add it's sibling as right. ie. left->sibling = right. and right->sibling will be null.
10. Implement a queue using stacks. I give you stack with pop, push and isempty methods, using this you should implement the enquee() and dequee().
11. Implement a queue using an array, tell me when is the queue empty and when is the queue full.
12. Explain the efficient way to store a hash table in memory, if the hash table is so huge that it cannot be fit in to memory what are the possible solutions you would come up with?
13. Remove duplicates from an array in O(n) time.

some more questions:
-------------------
1. Find the value in the deepest node of an un-sorted BTree.
2. Given two string, with millions of digits, you need to multiply them. (Half adder/full adder)
3. Count the number of bits set in a dword (See programming pearls book)
4. Print all the nodes in the tree by level (Breadth first traversal)
5. Given N number of people sitting in a round table, each one will start counting the number until M, when M is counted the person who said ‘M’, should quit and the same follows until the end. What data structure will you use to implement this game?
6. You have a set of points which will have a 1:1 connection. Say from a to z are the names of node. What data structure will you choose to implement this? (Obviously vector, but the time to access is more, since it is like a->b-c>….->z so better implement in an array, so that to go from one node to other it is just o(1). Worst case is a->z which will be o(n).
7. How will you calculate the distance for say m->…->U in the above? (the distance to be stored as a cumulative distance, so that we avoid more calc. So while adding ‘o’ to the link n, it will have the cumulative distance from m, this will make the operation faster.

STAY TUNED will post the answers


If you are done with the above, this tip might help.
Donot forget to ask the interviewer what they are looking for and make sure you understand the problems stated.

In some cases it is as simple that the given array is sorted and the solution we are looking for is o(n), but the interviewer never explicitly tells you that the array is sorted. You as the interviewee should ask the interviewer whether the array is sorted etc etc.
Coding is not all the interviewer wants to see in you, the way you think and analyze the problem is all the more important.

Wednesday, May 14, 2008

Microsoft Live reviving the search with options



Then there is the image search with handy options like size, color, style, face to name a few.


And the product search with categorized options and easy look ups.


Live search is introducing cool features, most of the times they do not get noticed due to Google effect.

Anyways I liked this one, see the snapshot and try it for yourself. Enjoy life and enjoy 'live'. http://search.live.com/xrank/

Worst case analysis - finding the second largest #

Question:
Describe an optimal algorithm to find the second minimum number in an array of numbers. What is the exact number of comparisons required in the worst case?
Note that Big-Oh notation is not what is being asked. Exact number of comparisons is what is required.

Analysis:
Example array (here after called as arr) for the worst case:
20 | 15 | 16| 18| 19| 20

Say there are 6 #'s in an array.
for the array that has min of two #'s only you can start, unless they are equal #
so always for 2 #'s there will be minimum and a max of '1' comparison.
After comparing arr[0] and arr[1] you will assign a temp variable first = arr[0] and second = arr[2], you have to iterate the array forward and make comparison to the second and first.


Say you have an "if condition" for the new # like this.
if( new < second || new == second || new == first)
{
//case ignore
}
else
if( new > first) { second = first; first = new;}
else
if(new > second)
{
second = new;
}

or you can write the above as

if( new < second)
{
//case ignore
}
else
if( new > first) { second = first; first = new;}
else
if(new > second && new < first) -> to make sure new is not first, if not we will have first & second the same values...
{
second = new;
}

so second one was better comparison as it ignores one case, if you compare both the methods.

possibilities:
-------------------
any given new # will be equal to first or second in which case we do not care
or will be > first
or will be < second
or in between. -> worst case or new == first is the worst case.

so given 3 #'s worst case in a best algorithm will be:
5 comparisons.(for every new # 4 comparison + 1 comparison for the first two #'s)

2 # -> 1
3 # -> 5
4 # -> 9
5 # -> 13

This above is a series, where n+1 is greater than n by 4.
The above is a classic question and you have the answer. If the series is in the pattern above find the nth #. That would be the answer for the exact number of comparisons that needs to be made for the WORST case.

Ok it is (n-1) * 4 + 1

Friday, May 09, 2008

Bliss to be a hacker

Hacking heals your zeal for quest!

In the world of everything being digital you try to monetize as much as possible, if not otherwise you spoil others from doing it. If you think hacking is evil yes it is, but what it takes to be a hacker? Being smart, not just tech savvy but technically sound, hard worker... Oooo a lot of good qualities you often need to do something great.

It is a tit for tat game, the security experts who often mostly are hackers try and close the walls but the hackers breach them, and this after all continues for ever and ever. isn't that fun, hmmm yup it is too much of fun.
The current common attacks pose mobile virus, malware, spying software, sql injections.

There are classification of hackers the main one being the one who do hacking ethically called as ethical hackers and the rest of them. Ethical hacker makes money legally and the others do it the opposite or just for fun.

OK let me stop here before you conclude that I am hacker too.

Monday, April 07, 2008

reverse the words in a sentence using C# (managed code)

Note: The assumption here is that the words are delimited by a single space. This program could be easily modified to work for multiple spaces in the sentence.

Code snippet:

using System;
using System.Collections;

public class Reversal
{
    public string Reverse(string words)
    {
        //find each word and push it in to stack.
        Stack myStack = new Stack();
        //count the number of the spaces in the sentence.
        StringBuilder sb = new StringBuilder();
        //array
        int size = 0;

        //get the total # of words by using delimiter ' '
        for(int i = 1; i < words.Length -1 ; i++)
        {
            if(words[i] == ' ')
            {
                size++;
            }
        }

        //temp string
        string [] temp = new string [size];
        //split the words using delimiter " "
        temp = words.Split(' ');

        //push all the words from the begining in to
        //the stack except for the last word
        for (int i = 0; i < size; i++)
        {
            myStack.Push(temp[i]);
        }

        //take care of the last word
        int lastOccuranceOfSpace = words.LastIndexOf(' ');

        //get the last word from the input.
        String lastWord = words.Substring(++lastOccuranceOfSpace);
        //push the last word
        myStack.Push(lastWord);

        //pop the stack as you will get the items in reverse order
        for (int i = 0; i < size+1; i++)
        {
            string tmp = myStack.Pop();
            StringBuilder sb1 = new StringBuilder();
            //reverse each word you get
            for (int j = tmp.Length - 1; j >= 0; j--)
            {
                sb1.Append(tmp[j]);
            }
            sb1.Append(" ");
            //add it to the final string
            sb.Append(sb1);
        }

    //now sb contains the input in reverse order
    return sb.ToString();
    }
}

class Program
{
    static void Main(string[] args)
    {
        Reversal r = new Reversal();
        string reversedString = r.Reverse("hello this is ram's code");
        System.Console.WriteLine("The reversed string is:" + reversedString);
    }
}

Friday, April 04, 2008

Ever stumbled by a palindrome interview question?

Look here you will find what is required to deal with palindromes.

Here’s a blog that refers the suffix tree and palindrome, and I quote:

“Interestingly, the algorithms for finding palindromes developed by computational biologists generally use suffix trees, and both space and time consumption seem to be worse compared with the algorithm I give in this blog message.”

http://johanjeuring.blogspot.com/2007/08/finding-palindromes.html

and also

http://www.akalin.cx/2007/11/28/finding-the-longest-palindromic-substring-in-linear-time/

Suffix tree to search the longest duplicated substring
http://www.ddj.com/architect/184404588

Thursday, March 27, 2008

.NET serializing object to XML and then converting to String

Code snippet:

What I wanted: I have a collection (dictionary) of custom objects and I wanted all of them to be logged using my logging method.

XmlSerializer xs = new XmlSerializer(typeof(CustomObject));

//enumerate through each key value pair and log them.
foreach(CustomObject csObj in this._CustomCollection)
{
//XML output to memory stream
MemoryStream ms = new MemoryStream();

//Serialize each node of the paragraph test
xs.Serialize(ms, csObj );

//Get the string from the memory stream buffer
UTF8Encoding encoding = new UTF8Encoding();
String myString = encoding.GetString(ms.GetBuffer());
myString .TrimStart();

//Call your logging mechanism
MyLog.WriteXml(myString);
}

Thursday, March 20, 2008

IE8 Beta with Google tool bar, a deadly combo

IE8 and Google tool bar simply doesn't gel well. Back to back there were crashes, IE tries to recover the page and Google fires it down again and again. If you are an extensive Google tool bar user, wait for updates on IE8.

Given that IE8 is in beta, these kind off stuff is expected esp. the interop with Google.

Tuesday, March 11, 2008

Friday, March 07, 2008

USB major versions = .NET major versions.

USB and .NET totally different domains, yet their release versions are similar so far.

Parallelism in versioning:
USB (versions) came out earlier than .NET (versions) and it's major versions are 1.0, 1.1, 2.0 and the proposed 3.0 standard. .NET on the other hand has the same major versions 1.0, 1.1, 2.0, 3.0.

Thursday, March 06, 2008

IT engineer

It is often happier to be in information technology(IT) than not to.

In any profession one needs to accumulate and assimilate (the two A's) things quicker, so that they can be demanding. IT demands much more to be demanding, you need to really know a lot of things in simple words.

'IT' is a pattern of several cohesive and non-cohesive ecosystems.
for example: Open source is a big ecosystem and Microsoft is another. Cohesiveness and Non-cohesiveness amongst the ecosystems are enforced based on the business/business model of the 'IT' companies. An year ago companies may be rivals, but the next year they could have diverged in to other areas by which they could have become partners. This is again a business game, it is not only technology that drives the business, but the other way is very true.

What is important for an 'IT' engineer is to understand where the business model would take each of the ecosystem, and decide where/when and where not/when not to be.
If one continues to embrace new technologies it might not help, if one continues to embrace the legacy it might not help either.

Watch out!!! for the next big wave. All I'm telling is, to be successful in 'IT' you must essentially understand the business and act accordingly

You need to be prepared, for a merger/acquisition/closure/opening heading you.

Be in 'IT' and be successful.

Sunday, February 10, 2008

Focused Search tools - Searching for a better "search"

"Search" is increasingly becoming a favorite; everyone wants to have their own. Recently I stopped by a magazine to read the new search technologies and their founders. Here are some of the excerpts:

silobreaker - Deliver the sort of valuable insights that professional researchers or the simply curious crave.

Hakia - Understands the concept of search queries using sentence analysis, as opposed to the popular Google and others who use keyword based search. This is called Semantic search.

jodange - This is based on what is called as Sentiment analysis, focuses on the opinions and appeals to users in the security and financial service sector.

delver - Aims to deliver more relevant search results by tapping into a user's friends and online social networks.

Iterasi - This is something like a tool to help bookmarking search easier, instead of just saving the link to the content when someone bookmark's, it actually captures the full content and then track and analyze changes over time.

I came to know about the one below from the reader comment:
kartoo - It shows a map with the keywords that link each site. And the size defines "how much" the site matches the result.

Saturday, February 02, 2008

Microsoft swaying to persue the goals of competitor?

Microsoft being forced to buy Yahoo!? Some say they have to be offensive since Google is targeting the core business of Microsoft, being desktop computing and the two monsters in that domain the Windows OS and MS Office.

But for a company so behemoth, why couldn't they generate the next wave of revolution?
Why haven't Microsoft taken a different step to tackle the challenges posed by Google? It is already too late, I can hear that. Microsoft known for it's marketing and bullying might, for sure knew the growth of Google and the impact.

In this world there are generally three well known rules to play such battles. Either hit hard at the competitor's core by own or by diverting the focus of all to a new paradigm or the last option to outplay the competitor by combination. By what I mean by the second attack is; shift in locking to the current technology.

Microsoft failed in the first two and is trying to bet on the last option, that is to buy another company to compete in the space.

Well no company is always superior in this sense, if it is for Microsoft today, the days for some one taking over Google is not longer. (It could even be as the result of this Microsoft acquisition.)

History repeats itself !!!

links on the discussed topic:
1. NY times
2. The Wall street journal

Saturday, January 26, 2008

Is it finally boiling down to - IBM vs Intel

Big blue vs Leap ahead, is it gonna happen? - read more

IBM:
With AMD in the bucket, can IBM do justice in the take over?
The answer would be another question:
Is IBM trying to get back to its hardware business and will it succeed?

Intel:
For Intel, it is not something new....It has faced many competitors in the past and IBM is a competitor in a noticeable degree even without AMD.
But as always Intel has proved, it would continue to enforce its strong hold in its primary domain.

Can IBM change the semiconductor industry trend, which Intel has been doing for decades now?.

IBM's semiconductor:
ppc microprocessors, cell architectures, and AMD?.

For AMD:
It can continue its R&D with sustained funding. IBM with its unquestionable experience, will come to the rescue of AMD from its significant issue such as manufacturing.

Thursday, January 24, 2008

Volta [To the rescue of C#ers ?]

[To the rescue of C#ers ?]

C# programming was limited more to the server side and that kind off held people jumping in to C#. But here is Volta coming to the rescue of the C#ers, you can write C# everywhere how? Look here for more - channel9

Tuesday, January 15, 2008

Creativity @ it's best - A world of ADs

Creatvity inundates you with the aah's and aahaa's, wow's and wooow's...

Let's see a detailed view of one of the most creative jobs on the planet.
It is about ad/commercial (making of the advertisement) making.

Here is my classification for ads:
1. Ads that speakup directly on the product, simple straight ads.
2. Ads that does the job of mimicing other ads or the purpose of the ad is to target other competitor.
3. Ads that are made horribly worse, that they miss the whole point on what the product is or what is the ad all about.
4. This category of ads are stunning and make people to think, laugh and embrace. They serve the purpose of capturing people's mind.

Ads are made for different reasons, the primary motivations are
1. Increase the market for the product
2. Launch of a new product.
3. Spending on ads, gives a % of exemption in tax. (This one is slightly different but interesting -> pumpkin @ Halloween)
4. Brand making
5. Ads on news/events/message/non-profit/social/special interest ads - the other kind

Let me scroll back to the ad categories and peek through them in brief detail:
The first category - straight 1's. I would classify most of the American ads here, example: Look at the pharma/food ads there will be couple of people coming and talking on the benefits of using the product and what it is. Also to capture more user base, the ad makers often use different sections of people based on their ages/sex/color.

The second category is targeted to prey on the competitor(s) products/ads. If one does an ad, the other does a different one to disprove or show things better than their competitor. Classic example is Coke vs Pepsi. And the tit for tat continues on and on, until companies can afford to shell out money.

The third category, huh do i have to talk about them? oh ok, may be not...
No one may necessarily take an ad to be a loser, but since the ad has a mass impact, if things are potrayed wrong it can inverse the impact to become negative. Ads that highlight the negative aspects of the product, ads that does not contain good quality audio/video, ad that was shot in one language and translated wrongly in to another, and there could be n^n reasons why wouldn't they click. Google for worst ads made, you get tons of them...

Now the fourth category, funny/stunning/awesome ads. It makes you think and gives a place for the commercial/product a place in your heart. The way an ad is showcased can take the product to greater heights. Generally ads that can relate to most or certain set of people, ads that are completely new from others, ads that abstracts certain aspects of the product (so that people tend to thin, oh there is lot more left in it...), this is the most important reason I would say - Ads that make the people to derive things/infer, they often always click. But if the ad is too creative and is like a puzzle; that misses a whole lot.

So a perfect ad should be a combination of things in the right proportion.
Use of the right words, music, pictures, characters, picturization, caption etc.
To draw up the lines, to give an analogy - it should be like the perfect food which is made with perfect ingredients, served at the right time. Serving at the right time is very important, an ad being good could be eaten by other competitor ads or more stupidly by their own ads. It is like a self destructor or suicide.
I was thinking for a good example for this, could vaguely remember a Pepsi ad. Sprite that is part of the pepsi group, made an ad claiming all other drinks or non-sense. I remember seeing other Pepsi ads (not Sprite) was also air'd in the same time frame of the Sprite ad, this is a perfect contradiction.
So not only making of the ads that matters, the time of releasing it and see on how each ad fits in to the total ad campaign is important.


Ooops I always often do that, drag in to other areas and miss my point. Anyways to fall back on track, ads that impress me are the ads that make me to draw inferences in a positive way. When you infer what happens you relate and start analyzing which means you spent time on that ad not just when it was shown, but even otherwise. If you have spent a shot span of time as little as 30sec(half a min), other than the air time of the ad; then i would say the ad has done its purpose. By making you act on the ad, it creates a place in your mind. In this regard, I appreciate the Indian ads, without doubt I would say Indian ads are far superior and they are highly creative.

Especially this last category of ads what makes new product to realize it's full potential in the market and if the company/brand that makes this new product is new as well, then it makes it even more critical to make the best ad.

Having said all that, what makes it more difficult is that the air time/volume that your ad can occupy is limited. So to pack everything in to one demands high creativity.

Ads vary based on the target segment, the media varies and the cost varies appropriately. TV ads are costlier compared to radio, with in the same TV different channels charge different range based on the shows and the duration of the ads.
Ad spending can grow to billions and billions of dollars, - Shell rocks for Ferrarisee this one an ad made after 606 takes, amazing - Honda accord. Not just TV/radio popular medias, but in public places, retail shops etc.
Usually company's evaluate the outcome of the ad, they analyze the market trend before and after, see how much there is a boost for the product in the market, trend graphs etc etc. By this they would know on if the money spent on ads is worth or not and would also gauge the ad's quality and when or when not to make ads.

Ads in new ways:
Microsoft is taking the ad even to the shopping carts - read more...

This could be an interesting question, What could be the average time allocated for commercials in TV/Radio's? - A 24 hour channel, my guess is 1.597 hours of time, that is close to 2 hours, approx 23%.

I can keep writing on ads, forcing myself to stop here.

some links to visit/pass time on:
1. http://www.bestadsontv.com/ads_latest.php#mouse%20run
2. some of my favorite ads - Amul, Britania, Apple, Hutch
3. Totyota's human touch
4. wood
Click on the ads that you see from link 4, there is a huge list...



Saturday, January 05, 2008

Indian information system. A model for decay...

India a land well known for its variety; in cultures, food, languages, and plethora of other things, is a developing economy!. As one of the earliest parts of the world to be inhabited and civilized; why is it the country still struggling to be claimed as a developed nation?
A primary reason for any country's development is; it's people and their attitude. Having said all of it, let me come to the crux.

Let me walkthrough my analysis of India's information handling, which I believe is a critical issue then and now...

Indians are attributed for their tremendous contributions to mathematics and science in the ancient age. I wrote couple of blog posts in this context earlier- (Newton and India, math and India go hand in hand)
And where did the continuation of these contributions go? Why have we lost the fame that we were acclaimed once?

With this question in mind, let's look deeper to the roots of the issue.

Now I am going in to a totally different spectrum, the CASTE system. Division of people, the divide is so much that we Indians have lost a major pie in the world's contributions list-how?. The caste system created mutliple groups; dividing people. People of various castes stopped interaction and sharing things. This means blocking the passage of INFORMATION.

A key to the development of any country "Information Information Information", it is all about this. "If not for Google who can process the world's information Google would have been some xyz (Tom Dick and Harry) company". ( I know this is out of the track, just to highlight the importance of information)

The vedas, terrific piece of work was restricted to only a few percentage of the people. So is many other brilliant work. Though few of the findings and work were spread, the teachings of experimentation and creations were never passed from one community to the other, there by stopping the information flow. People who created things stayed on top and the rest were using it. (People started blindly following what their upper caste told them, foolish faith without any rationale nor questioning). The so called rest of the people remained rest of the people and did not raise, rather were not allowed to raise.
Now why would some one want to do this?
The mentality would have been to be dominant and stay on top and that would make them think they are close to god. And hence arose the thought that; if the information of how to experiment passed would be adopted by the rest and then each one would try something there by making the dominant people not dominant any more. In reality as we know the real growth of one's own is to help others grow.

What should they have done?
Instead what the ancient Indians should have done is keep up the good work of creativity ticking, while passing on the information to everyone.

End result:
The very same notion of "not passing information, and stay on top", propagated inside the dominant community, paving for creating more and more sub-communities. And ended up in individuals who kept the marvelous findings and things to themselves. An by the end of their time, the great work and findings were lost. (Only a handful of the findings were passed on).

So the bottom line; to end the post is "we stopped the passage of information, which lead us stale".

The reason for this post is not to blame our ancestors, just trying to analyze a whole lot of different issues together.

Wednesday, January 02, 2008

Roots of modern mathematics re-visited

Excerpt from the link:

"The beginnings of modern maths is usually seen as a European achievement but the discoveries in medieval India between the fourteenth and sixteenth centuries have been ignored or forgotten.

And there is strong circumstantial evidence that the Indians passed on their discoveries to mathematically knowledgeable Jesuit missionaries who visited India during the fifteenth century.

That knowledge, they argue, may have eventually been passed on to Newton himself."

To read more click here