Every conversation with geeks not working in Sun this week has been about ZFS and ZFS making it to Mac OS X – Leopard. I get thoroughly drilled on Sun’s financial strategy and how we plan to make money rather than being asked about instantaneous snapshots and self-healing capabilities of ZFS. Thats one of the disadvantages of working for a “Non-Profit Organization” (of which we are very proud, anyway)
I tried turning the tables and asked one of my more linux-hackerish kinda friends to go install Solaris Express on his system and play with ZFS. I met with immediate FUD. Any amount of convincing to make him try the Live CD version was in vain
When I talk to people who identify themselves with the linux-world and tell them about opensolaris and its hacker friendly features more than half of them don’t even want to hear about it. They are very comfortable in their own altar of assumed superiority – an imaginary edifice built to give them an elite status compared to mortal computer users (atleast I’ve been through all this). But this only becomes a mental block that prevents you from exploring concepts and ideas beyond the walls constructed by your imagination. Anyway, that is fit for a lesson in social psychology than kernel hacking.
The minor evangelistic efforts turned into a dog-eat-dog argument which ended up with Sid’s version being that: While linux may not have that many programmer friendly “tools”, the linux “code” was more programmer friendly. I argued back saying there is no such thing as “linux code” – Its the Linux “Kernel” code plus the GNU tools code. After a few rounds of (enjoyable) sledging, Sid concluded with a Reductio ad absurdum – “Linux Kernel Code is more Readable than OpenSolaris Kernel code”.
Without even thinking twice about it (and with a grave danger of losing out an argument), I opened lxr.linux.no and src.opensolaris.org to view the one peice of code that I know for sure is there both in Linux and OpenSolaris – “The Kernel Slab Memory Allocator“.
This is how the linux version looks: http://lxr.linux.no/source/mm/slab.c
This is how the opensolaris version looks: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/kmem.c
To any human being (or alien for that matter) who knows “C” programming, I ask you – Read both the versions of the slab allocator and try to find out which is more readable.
The Linux Implementation: Is 4000+ lines long. Contains 30+ “GOTO” statements. Uses single-character variable names. Is tightly coupled to other parts of kernel code. And repeatedly commits the Worst SIN that the linux programmers do: Litter the code with hundreds and hundreds of #ifdefs.
If a Solaris programmer ever wrote code like that – he would be looked down upon as an Orc from Middle Earth.
The OpenSolaris Implementation: Is ~2500 lines long. Contains only 3 Gotos to handle a special error condition. Has well written code without ugly #ifdefs. Has meaningful variable names. Is self documenting.
Overall, its more appealing to the eye and can be understood by any average programmer without requiring infinite patience and tolerance.
If you think it is some kind of trickery TRY reading ext3 code and then ZFS code – You will understand where I am getting at. Anyway, I won the argument got my friend *REAL* pissed off and mad. I think he will vow to never consider OpenSolaris (or at any rate atleast the kernel) for the rest of his life
Filed under: Computer Science, General, Linux, Open Source, Operating Systems, Programming, Solaris
Satire is best inflicted on audience that cannot appreciate it. Who cares if the opensolaris code is more readable ? Linux plainly outnumbers slowaris.
Hey, and I didn’t lose the argument THAT badly buster
Whoa ! Look who is talking. First it was the superiority of the technology. Then it was about code. Then it was about the License. Now it has come down to the “number of users”.
So what is the point ? That you are going to keep inventing excuses to avoid entering a zone of discomfort – even if it could be an enlightening experience ?
This is not about winning or losing the argument or being on the right side of a popular philosophy. This is about learning, and your courage to circumvent self mobilized impediments.
In that sense, you ain’t any different from the M$ W$ user who will detest Linux because he is afraid of what he doesn’t understand.
No offense
Hmmm….. :-S Well., i’m out for coffee..
Nice
I’ve noticed this linux defencing a lot. I use both quite regularly, and there isnt one thing that I can do on Linux, and not on OS. The device drivers/ installing are the barriers I’ve faced, where linux outperforms, but once installed, the box simply works.
BTW, do you ever read slashdot threads tagged ‘opensolaris’. Zealousness at its highest, I tell you !