When you're starting off as an anthropologist, you aim is to explore a subculture your peers have yet to uncover, spending years living with the locals and learning their ways.

That's what Gabriella Coleman did. She went to San Francisco and lived with the hackers.

Coleman, an anthropologist who teaches at McGill University, spent three years living in the Bay Area, studying the community that builds the Debian Linux open source operating system and other hackers – i.e., people who pride themselves on finding new ways to reinvent software. More recently, she's been peeling away the onion that is the Anonymous movement, a group that hacks as a means of protest – and mischief.

When she moved to San Francisco, she volunteered with the Electronic Frontier Foundation – she believed, correctly, that having an eff.org address would make people more willing to talk to her – and started making the scene. She talked free software over Chinese food at the Bay Area Linux User Group's monthly meetings upstairs at San Francisco's Four Seas Restaurant. She marched with geeks demanding the release of Adobe eBooks hacker Dmitry Sklyarov. She learned the culture inside-out.

Now, she's written a book on her experiences: Coding Freedom: The Ethics and Aesthetics of Hacking. It's a scholarly work of anthropology that examines the question: What does it mean to be a hacker?

Earlier this month, she dropped by Wired's offices to talk about the book. Here's an edited transcript of the conversation:

Wired: What made you decide to live with the hackers?

Gabriella Coleman: I did want to be somewhere with a high density of hackers. I didn't want to just do online research – which a lot of my Anonymous research has been. I was like: "No, there are hackers and they're in places, so let me go to San Francisco. There seem to be a lot of them here."

What I quickly discovered was that there is a lot going on in hacking which has very little to do with open source. You know, like Infosec, and the transgressive tradition, and – a little later on – the hardware explosion. And that became the focus of my teaching. Because while the book is on open source, I wanted to grapple with and grasp the different dimensions of hacking, and I got really interested in what divided hackers.

It was interesting when I started hanging out with info security hackers in New York. That's a really different beast. They're like, if you're a builder, you're not a hacker. You've got to be breaking something. But the Infosec really tend to police their boundaries quite a bit.

Wired: What did your peers in the academic world think about your work?

Coleman: They, I think, thought that it was interesting and kind of great that someone was moving forward. But I think there was this idea that the geek hacker world, especially in the context of the west, was culturally thin and anemic. "Oh very interesting politically – they're coming up with these alternative licenses – but isn't it just about white men tinkering with their computers?"

And in some ways, I think I thought that too. But then, I was like, wait a minute, when it comes to the culture of computer hacking and the aesthetics of hacking, I was blown away by how culturally deep it was.

There's a whole chapter on joking, humor and cleverness among hackers. And that, to me, was one of the fascinating areas. And I feel that I've just scratched the surface with that chapter – to how deep and complex their oral histories are and their folklore is. And how they record it in everything from how they name pieces of software, which are often historical references to the past, to just the enormous amount of writing that computer hackers do in the non-technical sense: manifestos and zines and science fiction, you know

And I was just kind of astounded by that at some level. And astounded by the way in which on the one hand the hacker world was the place where the culture of civil liberties was on fire. And that's something that anyone can relate to because people beyond the hacker world know about free speech and privacy. And on the other hand, there was this aesthetic world that was intensely focused on itself and was very difficult to translate to the general public.

And so that kind of melding of the deep pleasures of hacking and the cultures of civil liberties were something that I thought was quite anthropological. But my peers were really unconvinced of it.

Wired: Did you get grief for not traveling to somewhere exotic?

Coleman: Yes. All the time. They just kind of laughed at it. They were like, 'You're so lucky. You get to be in San Francisco going to cafes and hanging out with hackers. I had to really sweat it out and be in the jungle. It was really difficult.'

It's funny because my committee loved my dissertation, and it did very well and won all these prizes, but I always had trouble getting job talks in anthropology departments. Even today, I rarely get invited to give talks in anthropology departments.

Wired: What is the funniest hacker joke you know?

Coleman: I absolutely love the Mutt flea one. The man page for Mutt, in the man page, the bug category is flea, because fleas are on mutts.

Wired: It's hard to tell a good geek joke because there are all these layers to them.

Often, the humor you talk about is used as a way of identifying like-minded people. I think that a lot of people from that community spend a lot of their time not being understood or talking to people who don't care about the same things that they do. So they need a shorthand to figure out, "OK we can have a conversation."

It's actually a hack that allows you to connect with people who it's worth your time time talk to.

Coleman: One of the things in that chapter that I argue is that hackers, first of all, are good at joking because to hack is to rearrange form. That's what jokes are. That's a pragmatic utilitarian argument, but they really culturally value it for all sorts of reasons.

Even a wonderful piece of code is up for debate, but a very funny joke, it gets affirmed with laughter and then it's kind of indisputable.

Wired: Do you think that it's possible to convey what's interesting about hackers in film?

Coleman: I have generally thought that it's really difficult. And I was pretty impressed with We Are Legion. He [Director Brian Knappenberger] did a very good job. And one of the reasons why he did a good job is because the world of Anonymous has a very rich visual vocabulary that they've created through their artifacts. They come from the meme world.

But let's just say that you're trying to convey the open source geeks and the transgressive hackers. Man, I have thought about this and I think it would take a kind of genius filmmaker to do it. I've talked to a lot of filmmakers to try to kind of inspire them to do it, and to spend time at CCC and the camps to get a sense of what it's like and be, like, 'Can you convert it?'" Because I haven't seen any film yet that I think does it well.