September 2007 Archives
One of my batchmates sent me the following link [PDF]:
Marketing Mayhem
13 Reasons why Linux won't make it to a desktop near you
Here is my rebuttal:
Don't agree to most of them, and if you read them carefully, I'd think you'd agree. Just because it's developed and maintained by a community, doesn't mean it has to be bad. Firefox/OpenSwan/Snort/Gimp/TightVNC/PDFCreator etc were all community developed.
These guys run MS IIS. They'd save thousands running Linux+Apache.
Let me counter each point:
1 The people who make the product have no money for marketing.
Hmmph, why do you need to have marketing for the product to be good?? Pretty lame to be the first reason!! What about Firefox? The people who make the product have no money (except some donations!!).
2 The reason they have no money is that they give the product away.
Yes, that's the whole idea. Remember, they get the product for free too!! The guy who writes Azureus (The best bit-torrent client) won't have to buy PDFCreator (a great PDF print driver). It's a give and take world. That's why GPL is made viral, so that it doesn't become a one way road.
3 Since they give the product away, people never see it in shops.
You can buy quite a few Linux Distros on shops. But that's beside the point. It's free, so, why would you need to go to shops? Just download, burn and use it... or order a free CD!! What kind of reason this is for the product to be not good? Is Picasa good? Do people use Picasa? Do you find Picasa in any shop?
4 Because people never see the product in shops or adverstised (Spelling mistake!!! He needs a spell checker!!)
they don't know it exists.
Another Lame reason. I'll give the example of Picasa again!! Not found in shops, is it? Or take Firefox. Or take Acrobat Reader. Do people know they exist? I bet they do!!
5 The makers of the product rely on word of mouth to attract more
customers, but their customers only talk to each other.
Not necessarily. Countries all around the world are moving their school systems to Linux/Open source, deciding on it through own investigations. And word of mouth marketing is cheap, and has worked for many (Did you see any billboard or TV ad on GMail??). Specially the Live CDs are best to introduce people to Linux without installing it. The "Their customers only talk to each other" logic is pretty weird too. Do they mean to say all friends/relatives/colleagues of Linux users use Linux? By that logic, put together with Six Degrees of Separation, everyone in the world must be using Linux. Would like to see that happen :-)
6 On closer inspection, you find that there are 500 versions of the product. When
you try to understand the subtle differences between them, you become
confused. Your enthusiasm starts to flag.
There are only 4/5 to choose from when you go mainstream. Not sure where that 500 number comes from. Most of the other Linux distros are for specific niches. For example MontaVista is for embedded, and GeeXBOX is for Media center. Otherwise, you got Fedora/Ubuntu/SuSE/CentOs/Debian,
Fedora/Ubuntu taking the front seats for desktop. Plus, last I heard,
choice is a good thing for customers. These are computer users, not
cavemen!!
Not having any choice has another name, monopoly!! I don't hear people complain when they have an option of buying one of Toyota/Honda/Mitsubishi/Audi/Nissan/Volkswagen/GM/Mercedes/Beemer/Porsche. They are all cars, and takes you from point A to point B and you can listen to Radio and CD in all of them.
7 When you install the product and try to use it, you strike unexpected problems.
You also find some nice surprises, which boosts your flagging enthusiasm a
little.
Agree here. If you have some out of the way system component, Linux may act quirky sometimes. But lately most of the issues with the OS is sorted out. Installation is pretty painless, and most of the apps work out of the box. It'll still need some more polishing, but it's getting there pretty fast. In fact, these days Dell is offering Linux on Laptop and desktops (I think they went with Ubuntu), and support them too. So, users are going to have much painless experience (no need to install... just use).
8 When you ask the product's maker for help, he suggests you talk to other users.
They welcome you with open arms but answer your questions in a strange
language.
Hmmph, I agree there are some users who need a telephone number for support, but they can buy that from Redhat/Suse/Dell if they want. But remember, on Windows, when something goes wrong, pretty much nobody has any idea why. I started getting Blue screen of death on my old laptop lately (Win XP), and only thing it does is, gives me an address and says it's in NDIS.SYS!! Not really helpful, is it? All my google search on the issue tell me is, probably my network device is malfunctionaing!!
My windows work laptop has some wireless problem, and in 802.11g mode it doesn't connect to my work access-point, but works fine at home. There is no log, no error, no event, nothing, and nobody has any clue what's going on. In Linux, I'm most certainly going to get some log, and would put that between double quotes on google, and voila, someone will have a solution. It's a matter of getting used to, but I think people will prefer that than waiting 15 minutes on phone for some person on the other end say "Sir, have you Power-cycled your machine?"
9 When you admit that you have trouble understanding their language, you're told
you'd better learn it, or you won't appreciate the product.
That was the case few years back. Linux has become much more user friendly these days. Remember, there are always users who use CD tray as coffee holders.
10 When you tell the designers that their product isn't marketable in its present
form, they say that's okay, since they only wrote it to share with their friends.
And why is it not marketable again? Fedora/SuSE are marketing it fine, so is MontaVista and lot others. A lot of very popular devices running Linux are selling great (Take the new Motorola razr). Linksys had a hotshot home router running Linux. There are huge number of servers running Linux. If you can't market to someone that he can get something he spends hundreds to thousands of dollars essentially for free, it's your shortcoming, not the product's.
Again, that's the idea of open source. It's meant for sharing. You write the UnZip utility (because you are expert in that area), give it for free, and expect the expert in graphics manipulation to write Gimp and give it to you for free. Barter system!!
11 As you wonder what to make of it all, you watch the designers and their
supporters squabble among themselves over all kinds of trivia. As you realize that
their collective focus isn't on fighting their real competitors, what's left of your
enthusiasm ebbs further away.
Hmmph. Whoever wrote these set of arguments, is surely not familiar with software development process. Which large piece of software got developed without fights between designers on design decisions? For Open Source and Linux, since the development is in the community, it's open to the public. Isn't that a healthy thing?
12 When you ask the people in charge why they don't show more leadership, they
say they have no power to unite the squabbling communities. They add that
disagreement and vigorous debate were the very fires that forged the great
product in the first place.
That's bullocks!! What is he referring to? Does he mean to say Torvalds or Alan Cox doesn't have leadership? Without leadership, linux would not be such a pain in the butt for Windows, and will not be used in so many servers and devices. This seems to be written by a Ivy league MBA who didn't get the basic idea of open source or software.
13 When you discover that some of the designers have made deals with
their biggest competitor, the last drop of your enthusiasm drains away.
Hmmph, a deal goes both ways. So, will the Windows users feel the same too? This is not politics or war, this is about better computing experience for users. Plus I don't see any deal made which affects, say, the Linux kernel or, say Fedora/Ubuntu, or, any application. It's only better for consumers if Linux and Windows inter-operate better, isn't it? Why exactly is that a bad thing again?
Marketing Mayhem
13 Reasons why Linux won't make it to a desktop near you
Here is my rebuttal:
Don't agree to most of them, and if you read them carefully, I'd think you'd agree. Just because it's developed and maintained by a community, doesn't mean it has to be bad. Firefox/OpenSwan/Snort/Gimp
These guys run MS IIS. They'd save thousands running Linux+Apache.
Let me counter each point:
1 The people who make the product have no money for marketing.
Hmmph, why do you need to have marketing for the product to be good?? Pretty lame to be the first reason!! What about Firefox? The people who make the product have no money (except some donations!!).
2 The reason they have no money is that they give the product away.
Yes, that's the whole idea. Remember, they get the product for free too!! The guy who writes Azureus (The best bit-torrent client) won't have to buy PDFCreator (a great PDF print driver). It's a give and take world. That's why GPL is made viral, so that it doesn't become a one way road.
3 Since they give the product away, people never see it in shops.
You can buy quite a few Linux Distros on shops. But that's beside the point. It's free, so, why would you need to go to shops? Just download, burn and use it... or order a free CD!! What kind of reason this is for the product to be not good? Is Picasa good? Do people use Picasa? Do you find Picasa in any shop?
4 Because people never see the product in shops or adverstised (Spelling mistake!!! He needs a spell checker!!)
they don't know it exists.
Another Lame reason. I'll give the example of Picasa again!! Not found in shops, is it? Or take Firefox. Or take Acrobat Reader. Do people know they exist? I bet they do!!
5 The makers of the product rely on word of mouth to attract more
customers, but their customers only talk to each other.
Not necessarily. Countries all around the world are moving their school systems to Linux/Open source, deciding on it through own investigations. And word of mouth marketing is cheap, and has worked for many (Did you see any billboard or TV ad on GMail??). Specially the Live CDs are best to introduce people to Linux without installing it. The "Their customers only talk to each other" logic is pretty weird too. Do they mean to say all friends/relatives/colleagues of Linux users use Linux? By that logic, put together with Six Degrees of Separation, everyone in the world must be using Linux. Would like to see that happen :-)
6 On closer inspection, you find that there are 500 versions of the product. When
you try to understand the subtle differences between them, you become
confused. Your enthusiasm starts to flag.
There are only 4/5 to choose from when you go mainstream. Not sure where that 500 number comes from. Most of the other Linux distros are for specific niches. For example MontaVista is for embedded, and GeeXBOX is for Media center. Otherwise, you got Fedora/Ubuntu/SuSE/CentOs
7 When you install the product and try to use it, you strike unexpected problems.
You also find some nice surprises, which boosts your flagging enthusiasm a
little.
Agree here. If you have some out of the way system component, Linux may act quirky sometimes. But lately most of the issues with the OS is sorted out. Installation is pretty painless, and most of the apps work out of the box. It'll still need some more polishing, but it's getting there pretty fast. In fact, these days Dell is offering Linux on Laptop and desktops (I think they went with Ubuntu), and support them too. So, users are going to have much painless experience (no need to install... just use).
8 When you ask the product's maker for help, he suggests you talk to other users.
They welcome you with open arms but answer your questions in a strange
language.
Hmmph, I agree there are some users who need a telephone number for support, but they can buy that from Redhat/Suse/Dell if they want. But remember, on Windows, when something goes wrong, pretty much nobody has any idea why. I started getting Blue screen of death on my old laptop lately (Win XP), and only thing it does is, gives me an address and says it's in NDIS.SYS!! Not really helpful, is it? All my google search on the issue tell me is, probably my network device is malfunctionaing!!
My windows work laptop has some wireless problem, and in 802.11g mode it doesn't connect to my work access-point, but works fine at home. There is no log, no error, no event, nothing, and nobody has any clue what's going on. In Linux, I'm most certainly going to get some log, and would put that between double quotes on google, and voila, someone will have a solution. It's a matter of getting used to, but I think people will prefer that than waiting 15 minutes on phone for some person on the other end say "Sir, have you Power-cycled your machine?"
9 When you admit that you have trouble understanding their language, you're told
you'd better learn it, or you won't appreciate the product.
That was the case few years back. Linux has become much more user friendly these days. Remember, there are always users who use CD tray as coffee holders.
10 When you tell the designers that their product isn't marketable in its present
form, they say that's okay, since they only wrote it to share with their friends.
And why is it not marketable again? Fedora/SuSE are marketing it fine, so is MontaVista and lot others. A lot of very popular devices running Linux are selling great (Take the new Motorola razr). Linksys had a hotshot home router running Linux. There are huge number of servers running Linux. If you can't market to someone that he can get something he spends hundreds to thousands of dollars essentially for free, it's your shortcoming, not the product's.
Again, that's the idea of open source. It's meant for sharing. You write the UnZip utility (because you are expert in that area), give it for free, and expect the expert in graphics manipulation to write Gimp and give it to you for free. Barter system!!
11 As you wonder what to make of it all, you watch the designers and their
supporters squabble among themselves over all kinds of trivia. As you realize that
their collective focus isn't on fighting their real competitors, what's left of your
enthusiasm ebbs further away.
Hmmph. Whoever wrote these set of arguments, is surely not familiar with software development process. Which large piece of software got developed without fights between designers on design decisions? For Open Source and Linux, since the development is in the community, it's open to the public. Isn't that a healthy thing?
12 When you ask the people in charge why they don't show more leadership, they
say they have no power to unite the squabbling communities. They add that
disagreement and vigorous debate were the very fires that forged the great
product in the first place.
That's bullocks!! What is he referring to? Does he mean to say Torvalds or Alan Cox doesn't have leadership? Without leadership, linux would not be such a pain in the butt for Windows, and will not be used in so many servers and devices. This seems to be written by a Ivy league MBA who didn't get the basic idea of open source or software.
13 When you discover that some of the designers have made deals with
their biggest competitor, the last drop of your enthusiasm drains away.
Hmmph, a deal goes both ways. So, will the Windows users feel the same too? This is not politics or war, this is about better computing experience for users. Plus I don't see any deal made which affects, say, the Linux kernel or, say Fedora/Ubuntu, or, any application. It's only better for consumers if Linux and Windows inter-operate better, isn't it? Why exactly is that a bad thing again?
I had some posts in my older blog that I think is worth retaining. Here are the cut-pasted ones:
Post 1
Post 2:
Post 3
Post 1
Memory leaks and GDB
I cooked up this nice nice nice trick to detect memory corruption using gdb. It needs two things. libc compiled with -g option, and statically linked to your program... so that you can step into the malloc/free functions of libc and still do source level debugging.
The idea is, gdb allows you to run a set of gdb commands or a gdb script when a breakpoint is hit. :help commands on gdb prompt gives the following output:
(gdb) help commands
Set commands to be executed when a breakpoint is hit.Give breakpoint number as argument after "commands".With no argument, the targeted breakpoint is the last one set.The commands themselves follow starting on the next line.Type a line containing "end" to indicate the end of them.Give "silent" as the first line to make the breakpoint silent; then no output is printed when it is hit, except what the commands print.
So, you can potentially set breakpoints at two locations, end of malloc routine, and beginning of free routine. For malloc breakpoint, set the commands as the following (replace r, size as the malloc return pointer and size passed to malloc respectively):
silent
printf "Malloc-ed %x %d\n",r,size
continue
end
For free breakpoint, set the commands as the following (replace ptr with the pointer passed to free)
silent
printf "Free-ed %x\n",ptr
continue
end
After this, just continue/run the program, and you will get an output like this:
Free-ed 8102000
Malloc-ed 80fbc38 132
Malloc-ed 80fbd38 132
Malloc-ed 80fbe00 132
Malloc-ed bfbff790 2
Malloc-ed 80baa8a 15
Free-ed 80d4160
Free-ed 80d4150
Malloc-ed 80d4105 4096
Malloc-ed 80d4105 4096
Free-ed 8103000
Malloc-ed 80d4105 4096
Malloc-ed 80d4105 4096
Free-ed 8103000
Free-ed 8105000
Free-ed 8104000
Malloc-ed 80d3080 4096
Free-ed 8103000
This is a crude example of the trick, but you can extend it by writing perl scripts to parse the output, adding backtrace to the output so that you can catch the non-freed memory. Comes in handy in a system which does not have tools like dmalloc/mmalloc ported, but has libc source that can be compiled and statically linked.
Post 2:
Designated Initializers
Was having a discussion at work about designated initializers in C. A designated initializer is where you use the name of a structure element to initialize it. Something like:
struct s {
int a;
char b;
char c; };
struct s s1 = {
.a = 1,
.c = 'a',
.b = 'z'
};
The advantages are:
1. You can initialize them in any order, and the compiler takes care of the rest.
2. There is no chance of you introducing a bug by swapping locations of two elements. On the same note, if someone introduces a new element to the structure, it doesn't have to be initialized by everybody who uses the structure, and won't mess up the ordering.
3. Elements that are not initialized will get initialized to 0 or NULL based on its type. So, you won't have to explicitly initialize them.
4. Code is much more readeable and greppable.
We realized that this was not a standard according to C89, but gcc started supporting it as an extension. Finally in C99, this was standardized.
Post 3
Makefile duh!!
Today I faced a strange Makefile issue with gmake. Assume the makefile as:%.x %.z:echo "$(@) $(suffix $(@))"all:a.x a.z
According to gmake manual:Similar commands work for all the targets. The commands do not need to be absolutely identical, since the automatic variable `$@' can be used to substitute the particular target to be remade into the commands (see section Automatic Variables). For example:bigoutput littleoutput : text.ggenerate text.g -$(subst output,,$@) > $@is equivalent tobigoutput : text.ggenerate text.g -big > bigoutputlittleoutput : text.ggenerate text.g -little > littleoutput
So, I expected my makefile to generate:
echo "a.x .x"
a.x .x
echo "a.z .z"
a.z .z
But instead it generates
echo "a.x .x"
a.x .x
and ignores the a.z rule.
The problem happens to be that gmake does not really extend an implicit rule to multiple rules, so, after executing it once, it decides to not execute it again.
The solution to this is to use static pattern based rules. Using that, the makefile will look like the following that will solve the problem:a.x a.z:a.%:echo $(@)all:a.x a.z