Supplemental files and examples for this book can be found at http://examples.oreilly.com/9780596004613/. Please use a standard desktop web browser to access these files, as they may not be accessible from all ereader devices.
All code files or examples referenced in the book will be available online. For physical books that ship with an accompanying disc, whenever possible, weve posted all CD/DVD content. Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to .
How to Become a Hacker
The Jargon File contains a bunch of definitions of the term"hacker," most having to do withtechnical adeptness and a delight in solving problems and overcominglimits. If you want to know how to become ahacker, though, only two are really relevant.
There is a community, a shared culture, of expert programmers andnetworking wizards that traces its history back through decades tothe first time-sharing minicomputers and the earliest ARPAnetexperiments. The members of this culture originated the term"hacker." Hackers built theInternet. Hackers made the Unix operating system what it is today.Hackers run Usenet. Hackers make the Web work. If you are part ofthis culture, if you have contributed to it and other people in itknow who you are and call you a hacker, you're ahacker.
The hacker mind-set is not confined to this software-hacker culture.There are people who apply the hacker attitude to other things, likeelectronics or music actually, you can find it at the highestlevels of any science or art. Software hackers recognize thesekindred spirits elsewhere and may call them"hackers" too and some claimthat the hacker nature is really independent of the particular mediumthe hacker works in. But in the rest of this document, we will focuson the skills and attitudes of software hackers, and the traditionsof the shared culture that originated the term"hacker."
There is another group of people who loudly call themselves hackers,but aren't. These are people (mainly adolescentmales) who get a kick out of breaking into computers and breaking thephone system. Real hackers call these people"crackers" and want nothing to dowith them. Real hackers mostly think crackers are lazy,irresponsible, and not very bright being able to break securitydoesn't make you a hacker any more than being ableto hotwire cars makes you an automotive engineer. Unfortunately, manyjournalists and writers have been fooled into using the word"hacker" to describe crackers; thisirritates real hackers no end.
The basic difference is this: hackers build things, crackers breakthem.
If you want to be a hacker, keep reading. If you want to be acracker, go read the alt.2600 newsgroup and get ready to do five toten in the slammer after finding out you aren't assmart as you think you are. And that's allI'm going to say about crackers.
The Hacker Attitude
Hackers solve problems and build things, and they believe in freedomand voluntary mutual help. To be accepted as a hacker, you have tobehave as though you have this kind of attitude yourself. And tobehave as though you have the attitude, you have to really believethe attitude.
But if you think of cultivating hacker attitudes as just a way togain acceptance in the culture, you'll miss thepoint. Becoming the kind of person who believes these things isimportant for you for helping you learnand keeping you motivated. As with all creative arts, the mosteffective way to become a master is to imitate the mind-set ofmasters not just intellectually but emotionally as well.
Or, as the following modern Zen poem has it:
To follow the path: |
look to the master, |
follow the master, |
walk with the master, |
see through the master, |
become the master. |
So if you want to be a hacker, repeat the following things until youbelieve them.
1. The world is full of fascinating problems waiting to be solved.
Being a hacker is a lot of fun, but it's a kind offun that takes a lot of effort. The effort takes motivation.Successful athletes get their motivation from a kind of physicaldelight in making their bodies perform, pushing themselves past theirown physical limits. Similarly, to be a hacker you have to get abasic thrill from solving problems, sharpening your skills, andexercising your intelligence.
If you aren't the kind of person that feels this waynaturally, you'll need to become one in order tomake it as a hacker. Otherwise you'll find yourhacking energy is zapped by distractions like sex, money, and socialapproval.
(You also have to develop a kind of faith in your own learningcapacity a belief that even though you may not know all of whatyou need to solve a problem, if you tackle just a piece of it andlearn from that, you'll learn enough to solve thenext piece and so on, until you're done.)
2. No problem should ever have to be solved twice.
Creative brains are a valuable, limited resource. Theyshouldn't be wasted on re-inventing the wheel whenthere are so many fascinating new problems waiting out there.
To behave like a hacker, you have to believe that the thinking timeof other hackers is precious so much so thatit's almost a moral duty for you to shareinformation, solve problems, and then give the solutions away just soother hackers can solve new problems instead ofhaving to perpetually re-address old ones.
(You don't have to believe thatyou're obligated to give all your creative product away, though the hackers that do are the onesthat get most respect from other hackers. It'sconsistent with hacker values to sell enough of it to keep you infood and rent and computers. It's fine to use yourhacking skills to support a family or even get rich, as long as youdon't forget your loyalty to your art and yourfellow hackers while doing it.)
3. Boredom and drudgery are evil.
Hackers (and creative people in general) should never be bored orhave to drudge at stupid repetitive work, because when this happensit means they aren't doing what only they cando solve new problems. This wastefulness hurts everybody.Therefore boredom and drudgery are not just unpleasant but actuallyevil.
To behave like a hacker, you have to believe this enough to want toautomate away the boring bits as much as possible, not just foryourself but for everybody else (especially other hackers).
(There is one apparent exception to this. Hackers will sometimes dothings that may seem repetitive or boring to an observer as amind-clearing exercise, or in order to acquire a skill or have someparticular kind of experience you can't haveotherwise. But this is by choice nobody who can think shouldever be forced into a situation that bores them.)
4. Freedom is good.
Hackers are naturally anti-authoritarian. Anyone who can give youorders can stop you from solving whatever problemyou're being fascinated by and, given the wayauthoritarian minds work, will generally find some appallingly stupidreason to do so. So the authoritarian attitude has to be foughtwherever you find it, lest it smother you and other hackers.
(This isn't the same as fighting all authority.Children need to be guided and criminals restrained. A hacker mayagree to accept some kinds of authority in order to get something hewants more than the time he spends following orders. Butthat's a limited, conscious bargain; the kind ofpersonal surrender authoritarians want is not on offer.)