W O L F.L A I R

Welcome to this blog. Hope you enjoy it. This is my second blog. Older one can be found here: theanarchia My personal site (will be moved soon) here: Eleutheromania This blog is dedicated to open source, humor and personal thoughts. Disclaimer: All the writing are my personal expressions and depict my personal opinions and may differ with others. However, they are not meant to hurt the feelings of any individual, organisation or community. Please take every thing in light mood as my tone is generally humorous. Also all the media used is mine or under creative commons /GPL license.

Tuesday, May 18, 2010

Path to Linux mastery

First of all why linux?
Well I clearly don't want to divulge in all that OS wars (that will be the topic of other post). But among existing unix brethren its one of the most popular (probably the most one), open source and conforms to many standard including POSIX.
First of all I will remove one confusion: Linux is the kernel which was developed by Linus Torvalds. Kernel can be compared to an engine of an automobile. But an automobile does need numerous other parts too. (Well you just can't ride on an engine, even if it runs it might burn something of yours ;-)).
All those other parts for e.g. editors, compilers etc. were collected from many different places, synced with the Linux kernel. One of the major providers of these essential software was GNU (GNU is not Unix, as they say). More here . So technically we should name that distro of yours as GNU/Linux. But for simplicity I will use term linux.
i.e. In C lingo : #define linux GNU/Linux // :-)

So you want to master this beast. Well the biggest problem is that most of doesn't know from where to start and what path to follow. So, to help all you linux newbies out there I mention here the step by step guide to master the linux. I believe the audience might consist of mainly two categories:
1) Normal Users. : Only first two steps might suffice for them. 2)Developers and Hackers. : Please follow all steps and beyond.
I also give some excellent resources which might aid in your journey. Also I mention beforehand these all steps are based on my years of experimentation and advices of the masters. Your taste and expertise may differ and you may mix or try some new steps. But following along will be more beneficial in my view. Any how open source means freedom.

1.Know the Beast:
Get any of distro you like. There are numerous out there and so are the comparisons among them. Some sites which might help you in deciding:
polishlinux
:for distro comparison
distrowatch :for distro information
zegenie Studios : Its a new one ... helps in choosing distro step by step.
For a complete newbie and tech-phobic Ubuntu might be the best. It has a good and windows like interface, easy to install and above all huge community backing. However many others have also become quite user friendly. Even Slackware, the granddaddy of all, is now quite easy to install and use. Its my personal favorite. Advanced users can also opt for Gentoo, arch and other advanced distros. Choosing distro is completely a matter of taste and requirements. However one major point to quote here. For casual user, they may try numerous of them. However those who want to delve deeper should consider sticking to one of them. Baring some minor difference they are all one and the same. Remember engine is the same and most of the body parts too. Reason is that I wasted lot of time in testing and trying many of them (Fedora, Gentoo, OpenSuse, Arch, Slackware, Ubuntu, .... even LFS.). All this time could have been more productively spent on delving deeper in to system. However all those distro suckers out there might differ for me ;-).

2.Tame the beast
Learn how to configure the system. Its very important for both normal and advanced users. Strangely enough many normal user (including sys-admins) work hard and excel in this area but those bright developers falter here. You should know how to tweak those X config files, setup mail server, fonts etc.. etc.. Even a little bit of shell scripting and awk-ing won't hurt you. Yes, you can do all those with your favorite C and system calls but all those chore tasks will make the system truly yours and shall teach you many tit-bits necessary in your long journey. Moreover what's the use even if you know which data structures kernel uses but can't even change the motd on your friends computer and give him his daily fortune cookies (Well this is rather extreme but I believe you are catching my drift) . Casual user please don't bother about all these terminology here.
Some excellent texts are available here:
1. Orielly' Runnig Linux -old but still the best among the category
2. Any good Linux administration book -a search in amazon will give zillions of them, check the customer review and take which you like. My favorite is Orielly's one.
3. Internet: Yes its the best resource, and its free (except your ISP bills). The Linux Documentation Project should be one of the bookmarks in your browser. Also sites of your favorite distro will have lots of information (many of them are keeping there nice wikis and Books nowadays, e.g. Slackbook, Gentoo handbook, etc.). Also nearly all major s/w on your system have there own sites as well, for e.g. having trouble with X windows system, check out x.org and consult there wiki. Also forums are invaluable source. I call them dynamic documentation. You can be quite sure that most of your problems have already been faced by someone around the globe and solved on respective forum. However, please don't be a leecher there opening new threads for all your tiny-miny problems. Search first both on net and forum, then ask if required. Also do contribute if you know answer to some of the problems present there.
4. Man-pages: Well they may be notorious for there cryptic presentations, they have taught me a lot. After certain attempts they will become clear to you. Developers out there, do install manpages-dev so as to get man pages on all functions. Also you may consider installing manpages for your required gui libraries.

3. Teach the beast some new things
Now you should be more careful as the possibilities are infinite. Casual users might consider stopping there journey here. Die hard geeks may carry on. Well the general pitfall here is that most of the pro's out there try to attack the kernel without any armor or weapons. For all those who have strong base in OS and related subject might skip these points. But to most of those, please take a break, get prepared ... very very prepared.

First of all learn C and assembly. There is no escaping it. ( well yes if you are only considering some application development in your favorite java, python...). Learn them thoroughly. Right from K&R' C book to writing inline assembly. Many online documentation are available but some good books will surely be required. Some from my book shelf:
The C programming language. (Well obvious)
Expert C
Advanced C
For assembly, let me clarify, there are many assemblers out there and so are the dialects. As we are talking about the Linux environment I shall hope you are using gnu assmebler (as) and AT &T syntax. There are other considerable options too (like nasm,which support both unix and Windows environment.). Choose what suites you however I will recommend the first option, as with AT&T syntax. Some good refrences:
1.Assembly language step by step. There are three versions out there (with Dos, Dos+Linux, Linux). Of course we will need any of last two.
2.Professional Assembly: for as and AT&T syntax
3. Some good h/w book. Write great code part 1 by Hyde is also good.

Learn about Operating System:
Both of the Tanenbaum books (Modern operating system and OS design and implementation) are good and very practical (corollary, He created minix from which Linus got inspired to write Linux). Galvin et all are also good. Perhaps some classes on this subject will be more beneficial.

Learn about Networking:
Stevens has been considered demi-god on this subject in *nix world. Also Comer' s series is good one. But you have plethora of information freely available in form of RFC's on the net. This subject is quite useful for sysadmins also.
Learn about system calls:
Perhaps Steven's APUE and man-pages will suffice. Its important to understand them thoroughly and write some code on them as they will show you what the kernel is supposed to provide.

Now go to Kernel:
Remember, Its just a piece of code. Well why I said that because most of them get afraid by its sheer size (64.5 MB at time of writing, with millions of lines of code). But again, its just a code written by some very organized and intelligent people. Please remember everything is written there to be read, understood and tweaked by others. Also, now many good guides are available. My favorites are Robert Love's Linux kernel Development and Orielly' s Understanding Linux kernel. Also the background we have developed so far, c, assembly, system calls, networking, o/s basics, will make things much easier for us. I am still in this phase so you may share your experiences with me. I might also learn some new things. That's all linux is all about. Learning and Sharing.

P.S.: 1. Learning from other OS is also not a bad idea. I learnt a lot from Free BSD systems. Their source is more stable (please remember they have complete OS out there not just kernel) and better organized. Please do read McKusick's Free BSD design and implementation. It will really enlighten you.
2. Do learn data structures and other core subjects. It shall help you in better understanding the kernel architecture.
So... Bon Voyage....

Saturday, May 15, 2010

Three kind of IT people in India

India is surely well known for producing numerous IT people, mainly due to general belief IT opens the Gates to foreign lands. However very few know that there three types of geeks in India:
1. The Geeks:- These are mainly found in campuses of companies like Infy, Wipro, Micros*, Google etc. etc. or as a laughing joker on the "our toppers" columns of their institutes' websites. Some of them however totally denounce the world and take renunciation to a dark room to practice their sacred art of hacking or cracking... who cares. They are characterized by fat belly and fat packages. They generally don't blog.

2. The Gurus:- These are the middlewares. They learn everything accidentally or 'by accidents'. These are the ones who could neither be in list of toppers nor could relax with their inabilities. They are the one's who utilizes google to their full extent to search everything which technically unnescesary , like ' how to make your desktop more geeky' , 'hacking yahoo account', '10 kewl linux commands', 'draw your picture in ascii' etc. etc. And with their half filled jugs they then become the self-proclaimed 'Gurus'. Please do note it as one of them 'Master wolf' shall be with us in many of blogs. They are the pole star to the 'Laakhans', the last category which we will discuss next . And yes, its those who blog the most (one of whom you are reading now).

3. The Laakhans:- These are the ones who have been condemned to technology. They entered IT fields not because they loved it but because of their parents, packages and peers. But please don't underestimate them. Their sheer numbers and their fan following outweighs above two categories. Every piece of technology has to go through the acid tests designed according to their TQ(Technical Quotient) level, which pretty much explains the constant domination of Micros* in Indian market. They generally come from the suburbs or villages and even from the less tecnical, but highly sophisticated crowd of cities. They strongly believe that it's the technology which should serve them and not vice versa. They are the one who posses possibly much higher level geek stuff ,right from blackberry to flashy keyring with capacity in GBs, than any of the above two categories. Its a different matter altogether that most of these gadgets are reduced to entertainment Genies's working on will of their master's . However there is on major flaw with them. They are highly susceptible to the Gurus. These gullible souls serve as great students for these Gurus. They look forward to them reverently for when these Gurus insanely type in something in black windows. These Gurus are the last aid when it comes to lab exams or even installing Windows. Gurus on the other hand derive great pleasure and other unspeakable benefits for their technical might. So all in all its symbiosis. However one major difference Gurus love the Geeks (from which they derive the inhuman powers), whereas The Laakhans loathe them (however insanely love their packages).
One of these will be appearing now and then in our posts.

The VS war

Lets accept this. Every open source freak face it in his life. Its known as "Confusion". One of the main goal of whole open source community is to create lots and lots of option (which is a great thing seriously) to make poor indecisive souls like me to cry.

But on the other hand the struggle to decide through these options also offer a great entertainment (try it, seriously, they are sometimes more fun then all those war movies and games). Also if you get bored of one category (like choosing Operating System) you can bump to some other(CMS systems). I was witness to many of them, just like sanjaya of Mahabharata. I think it will be great to share some of the interesting among them. However before commenting on any of them please read my disclaimer here.
(Click and open the portals of time)
1. The Great Operating Systems Wars (coming soon)
2. The clash of the CMSes (coming soon)
3. Blogging Civil War (coming soon)
4. Option skirmishes (coming soon)

But before that let me introduce you to the 3 kinds of IT people in India, mainly to meet our main characters.
Again, all these options are great and there is no such conflict as in reality. These are all my views (with some poor comedy), as a normal everyday IT guy.

Back to Blogging

At last I again get my good old PC back at home running my good old slack. It has been long time since I did any serious blogging. After facing the hectic schedule of college I at last get vacations. But all those buried desires suddenly pop up after such long period of repression. As soon as I got bailed from classes I was dragged in my passion of open source. After battling through all those VS. wars I settled backed to my good old machine and slack, and as they say 'it just works'.
So with all sanity :-) I blog now .
Hope the readers enjoy there stay here.