I keep hearing people say that they only hire the top 1 percent of job seekers. At my company, Fog Creek Software, I want to hire the top 1 percent, too. We're doubling in size each year, and we're always in the market for great software developers. In our field, the top 1 percent of the work force can easily be 10 times as productive as the average developer. The best developers invent new products, figure out shortcuts that save months of work, and, when there are no shortcuts, plow through coding tasks like a monster truck at a tea party.

From a recruiting perspective, the problem is that the people I consider to be in the top 1 percent in my field barely ever apply for jobs at all. That's because they already have jobs. Stimulating jobs. Jobs where their employers pay them lots of money and do whatever it takes to keep them happy. If these pros switch jobs, chances are the offer came through networking, not because they submitted a resumé somewhere or trolled a job site like Monster (NASDAQ:MNST). Many of the best developers I know took a summer internship on a whim and then stayed on. They have applied for only one or two jobs in their lives.

A lot of companies think they're hiring the top 1 percent because they get 100 resumés for every open position. They're kidding themselves. When you fill an opening, think about what happens to the 99 people you turn away. They don't give up and go into plumbing. They apply for another job. There's a floating population of applicants in your industry that apply for nearly every opening posted online, even though many of them are qualified for virtually none of these positions. So if the top 1 percent never apply for jobs, how can you recruit them? My theory is that the best way is to find them before they realize there is a job market--back when they're still in college.

Here's where you start.

Ah, college. Most kids wait until their last year to worry about finding their first job. And they are not that inventive. At more prestigious schools, the kids tend to feel that they are in such demand that they don't bother reaching out to employers. They simply go to on-campus recruiting events to see what's there. At Fog Creek, I've had a lot of success recruiting college students. In fact, I hired more than half of my developers as college interns, then recruited them for full-time work.

Before I go any further, I need to clarify that these are paid internships. Although unpaid internships for school credit are common in other fields from fashion to music, we pay $750 a week, plus free housing, free lunch, free subway passes, relocation expenses, and various other benefits. Every time I talk about internships, somebody inevitably gets confused and thinks I'm taking advantage of slave labor. You there, young whippersnapper: Get me a frosty cold orange juice, hand-squeezed, and make it snappy!

That's not how it goes. The annual routine starts in September, when I begin tracking down the best future software developers in the country. I send a personalized letter to every promising computer science major that I can find. Last year I sent 300 letters to fill six intern positions. Not e-mail. My letters are printed on a real piece of Fog Creek letterhead, which I sign myself in actual ink. Apparently this is rare enough that it gets kids' attention. I also call professors and former interns at schools such as Stanford, Duke, Dartmouth, and the University of Illinois to ask them for recommendations. Finally, I write an article for my blog, which gets about a million unique visitors per month, that's especially relevant to students. At the end of the article, I solicit internship applications.

How to find the best talent in a stack of applications.

Eventually, we get hundreds of applications for these internships, and they're good candidates because they represent the whole population, not just the job-seeking population. We call the most promising candidates for a phone interview. It's a three-part conversation. First, I ask the candidates to tell me about themselves and their classes. Then I pose a software development challenge. For example, how would you implement a Web-based clone of PowerPoint (NASDAQ:MSFT)? This gives me a feel for how smart they are, and if they know the basics of software development. Finally, I ask the candidates to interview me for the last 15 minutes of the call. They can ask about the company or living in New York City--whatever they want. If they pass the phone interview, Fog Creek flies them out to New York City to be interviewed in person.

By that time, there's a pretty good probability that we're going to want to hire them, so it's time to launch into full-court-press recruitment. Even though Fog Creek is a bootstrapped company where money is not spent lightly, we roll out the red carpet for our prospective interns. A limousine meets them at the airport. A uniformed driver grabs their luggage and whisks them to their hotel, probably the coolest hotel they've ever seen--ideally it's right near the fashion district with models walking through the lobby at all hours and complicated bathroom fixtures that may be a part of the permanent collection of the Museum of Modern Art but good luck trying to figure out how to brush your teeth. Waiting in the hotel room is a hospitality package with a T-shirt, a suggested walking tour of New York City written by Fog Creek staffers, and the DVD of Aardvark'd, a documentary about our 2005 interns made by Lerone Wilson, a filmmaker whose work has appeared on PBS. After a long day of interviews, we invite candidates to stay in the hotel for two more nights at our expense, so that they can explore the city before the limo takes them back to the airport for their flight home.

Only one in three applicants who make it to this stage will be hired, but still we don't skimp on them. We want the kids who don't make the grade to go back to campus thinking we're a classy employer. Our hope is that they tell all their friends how much fun they had and encourage them to apply for an internship the next summer, if only for the free trip.

Get the people you want to stick around.

During the summer of the internship itself, the students generally start out thinking, "Okay, it's a nice summer job and some good experience." We're a little bit ahead of them. We use the summer to decide if we want them full-time. So we give them real work. Hard work. Our interns always work on production code. Sometimes they work on the coolest new stuff in the company, which can make the permanent employees a little jealous, but that's life. One summer we had a team of four interns build a whole new tech support product, Fog Creek Copilot, from the ground up. That particular intern class paid for itself by the end of the year. Even when they're not building a new product, our interns work on real shipping code, with the helpful advice of experienced mentors, of course. Our interns are totally, personally responsible for some major area of our software's functionality.

And then we make sure these kids have a great time. We host parties and open houses. We get them free housing in a rather nice local dorm where they can make friends from other companies and schools. We have some kind of extracurricular activity or field trip every week: Broadway shows, movie openings, museum tours, a boat ride around Manhattan, a Yankees game. Believe it or not, one of last year's favorite excursions was a trip to Top of the Rock at Rockefeller Center. It's just a tall building with a nice view of the Manhattan skyline. You wouldn't think it would be such an awe-inspiring experience. But it was.

At the end of the summer, a few interns will have convinced us that they are truly great programmers and that we just have to hire them. Not all of them, mind you--some are merely great programmers who for some reason we are willing to pass on, and others would be great somewhere else but not at Fog Creek.

For the ones we really want, there's no sense in waiting. We make an early offer for a full-time job, conditional on their graduation. And dollarwise, it's a great offer: $75,000. We want them to be able to go back to school, compare notes with their friends, and realize that they're getting a higher starting salary than their peers.

Does this mean we're overpaying? I don't think so. You see, the typical first-year salary has to take into account a certain amount of risk that the person won't work out. But we've already auditioned these kids, so there's almost no risk that they won't be great. When we hire them, we have more information about them than any other employer who has only interviewed them. Because there's less inherent risk, we can pay them more money.

At this point, if we've done our job right, the intern gives up and accepts our offer. Sometimes it takes a little persuading. Sometimes they want to leave their options open. That's fine with us. An outstanding offer from Fog Creek ensures that the first time they have to wake up at 8 a.m. and put on a suit for a high-pressure interview with Oracle (NASDAQ:ORCL) --well, when the alarm goes off, there's a good chance they'll say to themselves, why the heck am I getting up when I already have an excellent job waiting for me at Fog Creek? My hope is they won't even bother going to that interview.

An internship program creates a pipeline for great employees. It's a pretty long pipeline, so you need to have a long-term perspective, but it pays off in spades.

Joel Spolsky is the co-founder and CEO of Fog Creek Software in New York City and the host of the Joel on Software blog at joelonsoftware.com.