Thinking Like a Hacker
Adopt the mindset of a hacker. Hackers solve problems and build things, and they believe in freedom and voluntary mutual help. To be accepted as a hacker, you have to behave as though you have this kind of attitude yourself. And to behave as though you have the attitude, you have to really believe the attitude. So, if you want to be a hacker, repeat the following things until you believe them:
- The world is full of fascinating problems waiting to be solved. Successful athletes get their motivation from a kind of physical delight in making their bodies perform, in pushing themselves past their own physical limits. Similarly, you have to get a basic thrill from solving problems, sharpening your skills, and exercising your intelligence.
- No problem should ever have to be solved twice. The thinking time of other hackers is precious — so much so that it’s almost a moral duty for you to share information, solve problems and then give the solutions away just so other hackers can solve new problems instead of having to perpetually re-address old ones.
- Boredom and drudgery are evil. When hackers are bored or have to drudge at stupid repetitive work, they aren’t doing what only they can do — solve new problems. To behave like a hacker, you have to want to automate away the boring bits as much as possible.
- Freedom is good. The authoritarian attitude has to be fought wherever you find it, lest it smother you and other hackers. Not all authority figures are authoritarian. However, authoritarians thrive on censorship and secrecy, and they distrust voluntary cooperation and information-sharing.
- Attitude is no substitute for competence. Hackers won’t let posers waste their time, but they recognize competence — especially competence at hacking, but competence at anything is valued. Competence at demanding skills that few can master is especially good, and competence at demanding skills that involve mental acuteness, craft, and concentration is best.
- Earn respect as a hacker. Like most cultures without a monetary economy, hackerdom runs on reputation. You’re trying to solve interesting problems, but how interesting they are, and whether your solutions are really good, is something that only your technical peers or superiors are normally equipped to judge. This is why you aren’t really a hacker until other hackers consistently call you one. Specifically, hackerdom is what anthropologists call a “gift culture.” You gain status and reputation in it not by dominating other people, nor by being beautiful, nor by having things other people want, but rather by giving things away: your time, your creativity, and the results of your skill.
- Write open-source software. Write programs that other hackers think are fun or useful, and give the program sources away to the whole hacker culture to use. Hackerdom’s most revered demigods are people who have written large, capable programs that met a widespread need and given them away, so that now everyone uses them.
- Help test and debug open-source software. Any open-source author who’s thinking will tell you that good beta-testers (who know how to describe symptoms clearly, localize problems well, can tolerate bugs in a quickie release, and are willing to apply a few simple diagnostic routines) are worth their weight in rubies. Try to find a program under development that you’re interested in and be a good beta-tester. There’s a natural progression from helping test programs to helping debug them to helping modify them. You’ll learn a lot this way, and generate good karma with people who will help you later on.
- Publish useful information. Another good thing is to collect and filter useful and interesting information into web pages or documents like Frequently Asked Questions (FAQ) lists, and make those generally available. Maintainers of major technical FAQs get almost as much respect as open-source authors.
- Help keep the infrastructure working. The hacker culture (and the engineering development of the Internet, for that matter) is run by volunteers. There’s a lot of necessary but unglamorous work that needs done to keep it going — administering mailing lists, moderating newsgroups, maintaining large software archive sites, developing RFCs and other technical standards. People who do this sort of thing well get a lot of respect, because everybody knows these jobs are huge time sinks and not as much fun as playing with code. Doing them shows dedication.
- Serve the hacker culture itself. This is not something you’ll be positioned to do until you’ve been around for a while and become well-known for one of the four previous items. The hacker culture doesn’t have leaders, exactly, but it does have culture heroes and tribal elders and historians and spokespeople. When you’ve been in the trenches long enough, you may grow into one of these. Beware: hackers distrust blatant ego in their tribal elders, so visibly reaching for this kind of fame is dangerous. Rather than striving for it, you have to sort of position yourself so it drops in your lap, and then be modest and gracious about your status.
Learn how to program. The best way to learn is to read some stuff written by masters of the form, write some things yourself, read a lot more, write a little more, read a lot more, write some more, and repeat until your writing begins to develop the kind of strength and economy you see in your models. To be a real hacker, however, you need to get to the point where you can learn a new language in days by relating what’s in the manual to what you already know. This means you should learn several very different languages. Besides being the most important hacking languages, the following represent very different approaches to programming, and each will educate you in valuable ways:
- Python is a good language to start off with because it’s cleanly designed, well documented, and relatively kind to beginners. Despite being a good first language, it is not just a toy; it is very powerful and flexible and well-suited for large projects. Java is an alternative, but its value as a first programming language has been questioned.
- If you get into serious programming, you will have to learn C, the core language of Unix (C++ is very closely related to C; if you know one, learning the other will not be difficult). C is very efficient with your machine’s resources, but will soak up huge amounts of your time on debugging and is often avoided for that reason (unless machine efficiency is essential).
- Perl is worth learning for practical reasons; it’s very widely used for active web pages and system administration, so that even if you never write Perl you should learn to read it. Many people use Perl to avoid C programming on jobs that don’t require C’s machine efficiency.
- LISP is worth learning for a different reason — the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot. You can get some beginning experience with LISP fairly easily by writing and modifying editing modes for the Emacs text editor, or Script-Fu plugins for the GIMP.
Familiarizing Yourself With Unix
Get one of the open-source Unixes and learn to use and run it. Unix is the operating system of the Internet. While you can learn to use the Internet without knowing Unix, you can’t be an Internet hacker without understanding Unix. For this reason, the hacker culture today is pretty strongly Unix-centered. So, bring up a Unix (like Linux but there are other ways and yes, you can run both Linux and Microsoft Windows on the same machine). Learn it. Run it. Tinker with it. Talk to the Internet with it. Read the code. Modify the code.
- There are other operating systems in the world besides Unix. But they’re distributed in binary — you can’t read the code, and you can’t modify it. Trying to learn to hack on a Microsoft Windows machine or under any other closed-source system is like trying to learn to dance while wearing a body cast. Under Mac OS X it’s possible, but only part of the system is open source — you’re likely to hit a lot of walls, and you have to be careful not to develop the bad habit of depending on Apple’s proprietary code.
- Download Linux online or (better idea) find a local Linux user group to help you with installation.
- While other distros have their own areas of strength, Ubuntu is far and away the most accessible to Linux newbies.
- A good way to dip your toes in the water is to boot up what Linux fans call a live CD, a distribution that runs entirely off a CD without having to modify your hard disk. This is a way to get a look at the possibilities without having to do anything drastic.
Learn how to use the World Wide Web and write HTML. Most of the things the hacker culture has built do their work out of sight, helping run factories and offices and universities without any obvious impact on how non-hackers live. The Web is the one big exception, the huge shiny hacker toy that even politicians admit has changed the world. For this reason alone (and a lot of other good ones as well) you need to learn how to work the Web. This doesn’t just mean learning how to drive a browser (anyone can do that), but learning how to write HTML, the Web’s markup language. If you don’t know how to program, writing HTML will teach you some mental habits that will help you learn. So build a home page. Try to stick to XHTML, which is a cleaner language than classic HTML.
- Stick to one thing at a time.Do not try to learn everything at once. A lot of wannabe hackers make this mistake. By learning a category, then moving to another one, you’ll be more efficient.
- If you don’t speak English, it might be a good idea to learn it. English is the working language of the hacker culture and the Internet, and you might need to know it to function in the hacker community. Translations of technical books written in English are often unsatisfactory (when they get done at all). Being a native English-speaker does not guarantee that you have language skills good enough to function as a hacker. If your writing is semi-literate, ungrammatical, and riddled with misspellings, many hackers will tend to ignore you.
- Don’t be content with a narrow range of skills. Though most hackers describe themselves as programmers, they are very likely to be more than competent in several related skills — system administration, Web design, and PC hardware troubleshooting are common ones. Hackers don’t do things by halves; if they invest in a skill at all, they tend to get very good at it.
- Work as intensely as you play, and play as intensely as you work. For true hackers, the boundaries between “play,” “work,” “science,” and “art” all tend to disappear, or to merge into a high-level creative playfulness.
- To be a hacker, you have to enter the hacker mindset, and there are some things you can do when you’re not at a computer that seem to help. They’re not substitutes for hacking (nothing is) but many hackers do them, and feel that they connect in some basic way with the essence of hacking (hackers need to be able to both reason logically and step outside the apparent logic of a problem at a moment’s notice).
- Write your native language well. Though it’s a common stereotype that programmers can’t write, a surprising number of hackers are very able writers.
- Read science fiction. Go to science fiction conventions (a good way to meet hackers and proto-hackers).
- Train in a martial art. The kind of mental discipline required for martial arts seems to be similar in important ways to what hackers do. The most hacker-ly martial arts are those which emphasize mental discipline, relaxed awareness, and control, rather than raw strength, athleticism, or physical toughness. Tai Chi is a good martial art for hackers.
- Study an actual meditation discipline. The perennial favorite among hackers is Zen (importantly, it is possible to benefit from Zen without acquiring a religion or discarding one you already have).
- Develop an analytical ear for music. Learn to appreciate peculiar kinds of music, and to play some musical instrument well, or how to sing.
- Develop your appreciation for puns and wordplay.
- Master creative thinking. The hacker mentality is driven by creatively solving problems. This creativity gives you the ability to solve problems others see as unsolvable.
- Contrary to popular belief, you don’t have to be a nerd to be a hacker. It does help, however, and many hackers are in fact nerds. Being something of a social outcast helps you stay concentrated on the really important things, like thinking and hacking. If you can manage to concentrate enough on hacking to be good at it and still have a life, that’s fine. Mainstream culture is much friendlier to techno-nerds now.
- Read older pieces, such as the Jargon File or Hacker Manifesto by The Mentor. They may be out of date, but the attitude and spirit come through very clearly.
- You don’t have to believe that you’re obligated to give all your creative product away, though the hackers that do are the ones that get most respect from other hackers. It’s consistent with hacker values to sell enough of it to keep you in food and rent and computers. It’s fine to use your hacking skills to support a family or even get rich, as long as you don’t forget your loyalty to your art and your fellow hackers while doing it.
- Cracking is an illegal activity which can result in major penalties. It is a major offense and is punishable under the law.
- Doing any of the following will earn you a bad reputation in the hacker community. Hackers have long memories — it could take you years to live your early blunders down enough to be accepted. And also, what’s on the Internet stays on the Internet. Don’t think nobody will stumble across what you did three years ago.
- Don’t use a silly, grandiose user ID or screen name.
- Don’t get in flame wars on Usenet (or anywhere else).
- Don’t call yourself a ‘cyberpunk,’ and don’t waste your time on anybody who does.
- Don’t post or email writing that’s full of spelling errors and bad grammar.
- Don’t blindly believe the advice given here or anywhere online is true and the only path to embracing the mindset of a hacker.
- Don’t use your hacking skills to do bad things. You might get used to it and get caught, ending up punished.