Late one night in the fall of 2005, Mark Zuckerberg was showing me around his crappy little apartment in Palo Alto, California. Facebook, the company he’d founded the year before in his Harvard dorm room, was in its infancy, and the slight 21-year-old, dressed in jeans and a Patagonia hoodie, still lived like an undergraduate. There was just a mattress on the floor, 10 pairs of Adidas sandals in the closet and an electric guitar leaning against a bare wall. “I don’t even think the shower has a shower curtain,” he said with a shrug.

Although the moguls of Silicon Valley were already courting him, Zuckerberg seemed genuinely uninterested in cashing in. He had started his career as a hacker, busting into Harvard’s online student database to create a better way for people to keep track of their friends—an online face-book of his own. (“Let the hacking begin,” he famously blogged that night.) As he brewed a pot of green tea in his kitchenette during my visit, he still lived by those words. “I just want to build something cool,” he told me. And so he did.

For the past two decades, I’ve traveled the world for publications including Rolling Stone, The New Yorker and Playboy to find and write about the most innovative people online. Most had begun as hackers. Often they were in the early stages of their careers. Some became billionaires (like Zuckerberg, two years after we met). Some became prisoners (WikiLeaks founder Julian Assange). Others remained unknown (the hacker collective Anonymous). Dozens crashed and burned.

But as I’ve observed firsthand, a singular obsession drives this generation of hackers, gamers, activists and geeks: building access to information and one another, even if it means breaking something old—or the law. Their work has turned the web into a kind of Wild West—a no-holds-barred fight over freedom and information that reached a fever pitch this year. Whether these “hacktivists” end up loved, hated, feared, politically exiled (as in the case of “traitor” National Security Agency hacker Edward Snowden) or even dead (Aaron Swartz and Barnaby Jack, both master hackers who died this year), there’s one crucial legacy they all share.

The internet would suck without them.

If you want to understand why the world needs hackers, you have to start with games. I first learned this one afternoon in the early 1980s. I was around 13 and, like many guys my age, blew my time and my lawn money on video games. In Tampa that meant biking down to ShowBiz Pizza, a strip mall restaurant that had all the latest arcade games: Donkey Kong, Defender, Spy Hunter and the rest. Although we all had Atari 2600s at home, we preferred to get our game on away from our parents. Arcades were our secret frats, places to wiggle our joysticks, curse and get high.

But one day we discovered that ShowBiz was a place for something else too: hacking. The arcade had just gotten a few personal computers, technology that was emerging at the time. For a couple of tokens you could sit at the machines and play some rudimentary computer games. You could also type in words and listen to the computer read them back to you. It took about three seconds for us to type “Fuck the manager,” but some kind of security program prevented the machines from saying profanities. With a little experimentation, however, we realized that “Phuck the manager” circumvented the restrictions—until the old guy chased us out the door.

That discovery taught us something important: You don’t have to be a programmer to know how to hack. Hacking isn’t really about coding. It’s about questioning and modifying a system, whether that system is a computer or a way of life. Yes, we were young punks at ShowBiz, and it sucked to get booted from the place. But our little hack was a good thing for one fundamental reason: It questioned a system and exposed a vulnerability. We wanted more freedom, more access, and we figured out how to get it. Little did we know there was a generation of kids like us seeking freedom with new technology, and by hacking games, they were paving the way for the digital revolution to come.

I met two of the most important ones 15 years later when I was writing my book Masters of Doom, about the ultraviolent shooter franchises Doom and Quake. Co-founders John Carmack and John Romero, also known as the Two Johns, had grown up in arcades as we had and were considerably more skilled as hackers. They got their break by hacking their own version of Super Mario Bros. 3 on a PC—an astonishing feat at the time—and building around it one of the most successful game companies ever, id Software.

Instead of building games that prevented hackers from messing with their code, Carmack, the lead programmer, specifically designed his games so they would be easier to hack. With a little time and will an industrious player could, say, tweak the code in Doom to make an entire level of the game’s playing world look like the Millennium Falcon instead of an underground labyrinth. The internet of the mid-1990s began to teem with modified versions—or “mods”—of Doom and Quake, giving rise to a subculture of hackers who would later make some of today’s biggest game franchises, from Halo to Gears of War.

The Two Johns understood an essential tenet of the nascent digital age: By breaking systems and building something new, hackers developed the skill and passion for driving innovation. As Carmack explains in Masters of Doom, “In the information age, the barriers just aren’t there. The barriers are self-imposed. If you want to set off and go develop some grand new thing, you don’t need millions of dollars of capitalization. You need enough pizza and Diet Coke to stick in your refrigerator, a cheap PC to work on and the dedication to go through with it.”

In the early days of the internet, anyone with a modem and a computer could freely exchange information with others. Deadheads swapped music. College students traded games. Scientists shared research. Prescient geeks knew it was only a matter of time before commercial interests invaded the space, and early freedom fighters took up the cause.

An MIT hacker named Richard Stallman founded the Free Software Foundation, dedicated to keeping software free for sharing, modification and use—a cause that continues to this day. On the West Coast, a nonprofit activist group called the Electronic Frontier Foundation—with powerful supporters including Apple co-founder Steve Wozniak and Lotus creator Mitch Kapor—formed to ward off government control of digital rights. By the late 1990s the DIY geeks were forging an online underground in the form of file-sharing sites such as Napster and Gnutella. They allowed surfers to swap music, movies and other data directly with one another—much to the consternation of entertainment corporations and the federal government, which sought legal means of shutting them down.

If there’s one thing people like about the internet, it’s access to content. Access to music. Access to video. Access to news, sports, games. The problem is, accessing stuff sometimes pisses other people off. Especially when there’s money or sensitive information at stake. But no one could keep the hackers down. And so the fight over internet freedom grew in size and scope.

I saw this one afternoon in 2005 when I arrived at a small house on a leafy street in Bellevue, Washington to interview Bram Cohen, a 30-year-old hacker who, at the time, was considered the most dangerous man online. Cohen had created BitTorrent—the free file-sharing program that lets people easily swap huge files with one another—which already boasted 45 million downloads. Today, anyone who “torrents” Hangover III or BioShock Infinite is doing it thanks, in great part, to Cohen.

The music and movie industries tried for years to go after the file­sharing sites, as they’re now going after Kim Dotcom, the embattled creator of the file-sharing behemoth Megaupload. But this has always been a difficult fight because the underlying technology is not illegal; it’s the use of the programs that can result in copyright violation. Cohen saw how the desire for free information online was never going away. When I interviewed Cohen for Rolling Stone, he told me, presciently, “The model of selling data on physical media is going to melt. This has been obvious for, like, 20 years. The content-distribution industry deserves to go away because it will soon be obsolete. It has no business existing.”

While district attorneys continued to crack down on web start-ups that helped users share content, the smart people chose to adapt instead—to ride the proverbial wave. The smart ones observed the basic tenet of the hacker: It’s about questioning and modifying a system, whether that system is a computer or a way of life.

Take the comedian Louis CK. Tired of others profiting off his shtick by distributing it, he cheaply produced his own comedy special and threw it up on the web, charging $5 for it. No TV, no publishing company, no DVD special. It cost the price of a ham sandwich—why would anyone waste the time to pirate it? He understood the power of online distribution. People paid the $5, and he made more than $1 million. (He ended up giving much of that money to charity.) Tommy Mottola, the music mogul, recently told Howard Stern that the music industry’s biggest mistake was going after Napster instead of getting hip to the net sooner. As a result, he said, the industry was outscored by Apple, which introduced iTunes and completely changed the game before the major music publishers had a chance to set their terms.

Since the early days of the web, hacktivists have grown increasingly bold. In 2006 a fledgling Australian journalist named Julian Assange began running WikiLeaks, a cloak-and-dagger clearinghouse for anonymously leaked secret and sensitive documents. The site was causing much controversy after publishing inside accounts of corruption from Kenya to Guantánamo Bay. But Assange told me it wasn’t just technical prowess behind the site—it was nerve. “You can do a lot,” he said, “just by having balls.”

Few had more balls than a certain 26-year-old who died in 2013, a hacktivist who took the fight for online freedom to the next level.

On January 6, 2011, a young man with longish dark hair, a black coat, blue jeans and an overstuffed gray backpack sneaked into a restricted equipment closet in a basement at MIT. Inside was a tower of computers linked together with thick blue cables. Strapping a bicycle helmet in front of his face to hide from surveillance cameras, the man slipped a hard drive from his bag and connected it to a laptop that he’d plugged into the machines. He finished illegally downloading nearly an entire archive—4.8 million files total—called JSTOR, the premier online repository of scientific and academic research. A few moments later, he removed his hard drive and left.

This was no ordinary thief. He was Harvard fellow Aaron Swartz, one of the most renowned whiz kids of his generation. As a programmer he had helped code some of the most important online programs, including Reddit, the social media site, and (at the spry age of 14) Really Simple Syndication, or RSS, the standard for feeding news and other information online.

Swartz hadn’t downloaded the JSTOR files for himself. He had planned to unleash them online so anyone could access the knowledge instead of just libraries and members of academic institutions. It was part of an ongoing mission he called his Guerilla Open Access Manifesto. “It’s time to come into the light and, in the grand tradition of civil disobedience, declare our opposition to this private theft of public culture,” he wrote. “We need to take information, wherever it is stored, make our copies and share them with the world.”

There was only one problem: Swartz was busted by the cops. With concern about cyberattacks growing in the U.S., the feds wanted to make an example of him. Facing charges including wire fraud and computer fraud, Swartz was looking at a possible sentence of 35 years in prison and $1 million in fines for a crime that was essentially victimless and motivated by a passion for intellectual freedom. “It’s a serious problem where you think we’re in the middle of an information revolution, but computers and copyright law are being used to lock up information rather than encourage its dissemination,” said Jennifer Granick, director of civil liberties for the Center for Internet and Society at Stanford.

As news of Swartz’s fight with the Department of Justice traveled the internet, he became a folk hero.

While awaiting his fate in the MIT case, Swartz organized a massive online rally against the federal government’s Stop Online Piracy Act, which, many have argued, overstepped its bounds by enabling the authorities to stomp on citizens’ freedoms online. Among other things, SOPA would allow the Department of Justice to effectively cripple a site: barring ads, blocking search engines and stopping online payment services. As part of what became known as Internet Blackout Day, Swartz urged geek hubs including Reddit, Boing Boing and Major League Gaming to go dark on January 18, 2012 as a statement against SOPA. Wikipedia went dark too, running a banner that read, “Imagine a world without free knowledge.” Google joined in the fight, amassing 7 million signatures. It was a protest on a scale the net, and Washington, had never seen.

The next day, the DOJ and FBI struck back by shutting down Megaupload. Anonymous, the hacker collective, fired back by crashing the sites of the Recording Industry Association of America and CBS, which supported SOPA. Proponents of the bill could not ignore the hacktivist uprising anymore. SOPA was defeated. For Swartz and the other freedom fighters, it was the greatest victory in the history of online protest.

On January 9, 2013 prosecutors told Swartz’s attorney they wanted him to plead guilty to 13 counts in the MIT case, for which he’d likely receive six months in prison. Swartz and his lawyers rejected the deal, assuming they’d win the trial scheduled for April. Swartz, however, would not live to see the judge. Two days later he hanged himself in his Brooklyn apartment. The man who had devoted his life to keeping the net free was dead.

Although the feds dropped the case against him, his fight continues. Anonymous hacked the U.S. Sentencing Commission website, leaving a memorial in Swartz’s honor. MIT and the House Oversight Committee announced investigations into Swartz’s prosecution. Online petitions grew, calling for the removal of U.S. Attorney Carmen Ortiz. In tribute to Swartz’s efforts with JSTOR, scholars began to release their papers online for free.

What was Aaron Swartz’s most vicious crime? As Demand Progress executive director David Segal said in a statement, “It’s like trying to put someone in jail for allegedly checking too many books out of the library.”

For the legions of online freedom fighters who remain, the skirmishes are far from over. But here’s the thing: The fighting will likely lessen greatly with time. The reason? The generation gap between the people who grew up online and the ones who didn’t will fade. It’s naive to think, with money and sensitive information at stake, these battles will ultimately disappear. But they will diminish. Many of the struggles have been brought by people—publishers, politicians, parents—who feel threatened by the democratization of power and access online. It’s not surprising that some of the most important innovations of the online age—from Napster to Facebook—were invented in dorm rooms and not in corporate offices.

This is not to say freedom online comes without consequence. The line between good and evil is hard to define in the shadowy world of the internet. Take renowned hacker Barnaby Jack, who died mysteriously in July. (As of press time the cause was unknown.) Jack had become famous for publicly demonstrating “Jackpotting”—his ability to hack into ATMs and make them spit out money. He famously hacked into insulin-pump systems and was about to demonstrate how to hack into a heart pacemaker (“human hacking”) at the time of his death. His work was called “white hat” hacking; he was a good guy—exposing weaknesses so they could be fixed. But what put his work in the spotlight was its whiff of the sinister, suggesting just how devious hackers could get.

An even bigger case is that of Edward Snowden, the hacker at the center of what will go down as one of the most important news stories of 2013. While working with Booz Allen Hamilton as a contractor for the National Security Agency, Snowden used his skills to gather highly classified secrets from the U.S. government. Then he leaked those secrets to journalists. Some called him a traitor. He believed he was exposing surveillance methods that were unconstitutional. The U.S. government has charged him with espionage. In August, Snowden, nationless and trying to avoid major prison time, was granted temporary asylum in Russia.

All of which is to say: Freedom on the internet is like freedom anywhere. When laws are stripped away, human nature reveals itself in all its glory and inglory. The important thing is to be able to distinguish one from the other and act accordingly.

The net has always been a young person’s medium. That’s why, since the emergence of the web in the mid-1990s, many internet pioneers have been demonized just as rock-and-rollers were in the 1950s. When rock and roll emerged, Elvis was shown only from the waist up on The Ed Sullivan Show because his gyrating hips were considered threatening. Same thing with the net. Whether it’s Doom or Formspring or Snapchat, either you grew up with it or you didn’t. The ones who feel threatened have tried to tame online freedom through lawsuits and legislation, ultimately to no real avail. They still seem to believe they can stop a guy like Swartz and “send a message” to other hacktivists down the line. But they can’t.

So what to do? Stop trying to disempower the empowered. Instead, adapt—as quickly as possible. Those who embrace the power of the web and use it to reinvent industry will ultimately lift themselves, their nations and their generations to new heights.

In addition to giving people more access to information and one another, the hacktivists I’ve met have one other trait in common. They innovate to fill a personal need. Zuckerberg coded Facebook because Harvard didn’t have a good means for students to keep track of one another. The Two Johns created Doom because it was the kind of game they wanted to play. Swartz freed the files on JSTOR because they were the kind of articles he wanted to read. But their personal need is a generational one as well, and that’s why they find so much support among their peers.