I hear this a lot, but surprisingly few people actually make it all the way. I almost didn't—and that's because I didn't realize what it was fundamentally about until it was almost too late. Hopefully, this can help you. I don't profess to be an expert on hacker mythology, nor even a particularly notable member in their meritocracy. But I do know that being a good programmer and a good hacker is almost entirely about perspective. I will attempt to explain the hacker fu—the je ne sais quoi about our culture that makes it so appealing. If it's not appealing to you—well, maybe you should consider something else. I extend a gracious nod to the Jargon File's description, and note that I shall attempt to more closely pin down the fuzzier side of being a hacker.
First, let's get one thing straight: being a hacker or a computer programmer does not entail playing video games all day. I get that a lot for some reason, so let's get that out of the way.
Secondly, I will clarify that when I say "hacker", I mean a real hacker. Not a script kiddie or a black hat—someone who attacks other peoples' machines using other peoples' exploits or their own persistence. These are crackers, and are light years distant from the hacker fu. The Jargon File demotes crackers from "mediocre" hackers, to "incompetent" ones. Having invented both terms, the hacker culture has some authority on their meaning: hackers "good", crackers "bad".
Here's the key. If you are considering learning to program just so you can break into other peoples' systems, you are missing the point. Computer Science is about creating anything you can imagine, building higher and higher! If you think pressing a button in a program someone else wrote, to clobber a whole bunch of peoples' file systems is somehow more enjoyable than constructing your own dreams and creations from pure will and passion, then may Eris help you.
Anyone with the right mindset, that is. You don't have to be skinny or fat to program. Your height, your gender, your religion, your affluence, don't matter. You don't even have to think you're particularly smart to program. Anyone can do it. But the key thing you need to have is rather subtle.
See, it's not about being right or wrong, or doing dull math, or playing favorites with companies or getting and holding down a job. It's not about a 9 to 5 working day or the bottom line. Corners cut are personal embarrassments, and the hack value of five lines of clever C can make a good day into a great one. It's almost never the end product that's important.
Hackers don't know all the answers. No one does. We gain wisdom because we care about learning knowledge. This caring is the key to being a good hacker. You're interested in everything interesting, and you try because you can. Being a hacker is about running into problems. Tough ones. But the nourishment you get by solving them makes you a better person. I often say that Mathematics teaches one knowledge, but that Computer Science helps one understand knowledge.
Real hackers—the really good ones—will constantly be working on something. Hacking is a process that never stops. It's the attitude that matters. If you take nothing else away from this, remember the following. Hacking is both a science and an art. It is difficult to create something beautiful, and that is why hackers love doing so.
To write code like a hacker is to write code like an artist paints a painting. There is delicate, precise, complex beauty. A hacker's code tells you something fundamental about the hacker. Not just stupid things like a predisposition towards recursion—subtle, deep things, like the author's philosophy and attitude. A hacker's codebase is their life story, and an exploration into the way their mind works.
1: A logical mind. A class in logic can help, and it's something you have to want to achieve. It can be learned. See my crash course in logic for a start.
2: Ability to take criticism. Mainly from yourself. Be open to the idea of mining your own works for faults, contradictions and stupid mistakes. Everyone makes these, and arrogance and hubris about your own works will make you fail. Be proud of your finished works, but realize that while you're making them, you will not get it right the first time, all the time.
3: Familiarity with basic mathematics. More is better, but I find basic Algebra to be a good minimum. I rarely need more than Calculus, but I find Trigonometry and Geometry to be VERY helpful ALL THE TIME.
4: Creativity. Often neglected, programming is about solving problems. You must like doing that. Most of the problems you'll run into (especially if you get good) are problems no one has ever encountered before, and YOU are the one that need to solve them with little to no help from outside.