During my search for my first "real" computer science job during my senior year of college, I compared a lot of factors for various jobs including city, company, project, salary, and benefits. The salary stuff was fun to think about (especially after four years of being a poor college student) and I was looking to move to a bigger city somewhere outside of the Midwest (after growing up and going to college there). But mostly I thought about the company and project. Which companies would I want to work for? What project would interest me the most? Where would I learn the coolest stuff?
In hindsight, I realize I'd overlooked the single most important question - is this company going to own my ideas?
I never even thought to ask my prospective employers about their policies on IP and moonlighting. It wasn't until I'd accepted an offer and received their legal documents that it dawned on me. And even then, I didn't mind. I thought it was just standard practice and I really didn't have much of choice*.
For those of you that don't know, many large software companies technically own everything you think of while you're working for them. No, not just the stuff that you do at work. They also own the stuff that you do at home, after hours. There is no clean separation of "work" and "personal" projects.
This manifests itself in a few ways. First of all, you may notice that the company explicitly bans working on open-source projects. Or they may require you get explicit permission for "moonlighting" i.e. working on non-work-related projects after hours.
At the very least, you should ask any potential employer about their IP policy before you accept a job. You may be able to get them to loosen their restrictions, especially if they really want you (I haven't personally done this and I'm not sure if the bigger companies would go for it, but it's worth a shot).
In fact, I'd argue that you should not accept any job that claims ownership over your outside-of-work ideas - even if that means compromising salary, benefits, project, company, or location. The benefits of owning your ideas are just too numerous and important.
Side projects make you a better programmer. I don't care if you're contributing to open-source projects, building a for-profit website, or just toying with a personal project in your own time, writing code that doesn't relate to work will expand your skills and make you a better programmer at work.
Side projects help your career. Working on projects that anyone can examine are much more valuable than a good resume or recommendation.
As Paul Graham writes in Hackers and Painters:
It seems surprising to me that any employer would be reluctant to let hackers work on open-source projects. At Viaweb, we would have been reluctant to hire anyone who didn't. When we interviewed programmers, the main thing we cared about was what kind of software they wrote in their spare time. You can't do anything really well unless you love it, and if you love to hack you'll inevitably be working on projects of your own.
Your side projects won't just help you during your next active job search. They form a sort of passive job search in which you're letting the outside world know how awesome you are. If a better offer comes along, great. Even if you're happy where you are, you can use external offers as leverage with your current employer (and not just for salary, either. A higher profile outside the company may convince your boss to give you more responsibility at work, publish whitepapers, or attend more conferences).
You can start your own company. If you own your own ideas, then when that little site you built in a weekend starts getting a bajillion visitors a day - you're free to pursue it. Hello, no boss/early retirement**.
Even if you quit and your startup fails, your career will probably be better off anyway. In Hiring is Obsolete, Paul Graham writes:
Even if your startup does tank, you won't harm your prospects with employers. To make sure I asked some friends who work for big companies. I asked managers at Yahoo, Google, Amazon, Cisco and Microsoft how they'd feel about two candidates, both 24, with equal ability, one who'd tried to start a startup that tanked, and another who'd spent the two years since college working as a developer at a big company. Every one responded that they'd prefer the guy who'd tried to start his own company.
If you're trying to rationalize taking that more restrictive job anyway (I mean, they've give you free soda at work!), you might be thinking:
"I don't want to do a startup anyway." Well, OK. But are you sure you'll feel the same way in a year? In any case, working on side projects is good for your career, even if you never do a startup.
"No one will know." Maybe you're thinking that when you have that good idea for a startup, you'll just keep it in your head until you quit. There's a couple of problems with that. First, you won't really understand your idea until you start working on it. Secondly, some of the best startup ideas come from projects that didn't initially have any commercial value (and therefore wouldn't appear to be worth quitting to pursue)
"They won't be able to enforce it." You mileage may vary by state (I'm no lawyer, but I vaguely understand the California courts may be ruling against companies in these kinds of disputes), but it probably won't matter anyway. Since you don't want to spend time tied up in court, just the threat that your company could come after you will prevent you from working on most ideas. And even if you have a great idea and decide to go for it - do you really think future business partners and investors will want to hear that your old company might own the core IP of your company?
"My new employer lets me list the IP I own before I joined the company, so what's the big deal?" The big deal is that you're almost certainly going to think of new (and likely better) ideas during the time you're employed at the company. Do you really think all your future ideas will fall into the narrow set of things you've thought of before you join? Doubtful.
If you feel you like have to take the job (or you've already done so), make sure to get permission in writing before starting to work on your new idea. But of course, just the hassle of getting permission is a strong disincentive to not work on your idea at all.
"All CS jobs are going to require me to sign away my IP" On the contrary, many jobs will let you keep your IP - especially if you are doing programming for a company that doesn't consider delivering software to be it's core business. Clearly some jobs let you do other stuff - or no one would be contributing to open source. For instance, Matt Mullenweg got to hack on WordPress while he was working on blogs and new media for CNET (in fact, working on WordPress was part of his job, which is extra cool but probably harder to accomplish).
In order to own your ideas, you may have to sacrifice other aspects of your job (not work at a "brand name" company, work on more mundane projects at work***, make less money), but I'd argue that it's worth it, especially at the beginning of your career. It's just too limiting to give away that much of your potential - because you never know where the next idea will take you.
*I ended up accepting the job at Microsoft. For the record, I really loved parts of the job (but also wish I could have worked on open source). I hear they have relaxed their policies since I left, which is definitely a good thing.
** For the record, I am not advocating taking ideas from work (the stuff you are being paid to work on) and starting a company based on that (or, for that matter, putting those ideas into open-source code). That's illegal and immoral. I'm referring to the case where you're working on X at work - but you want to keep your options open to do a startup that does Y.
*** Being less satisfied at work might actually be a good thing if you are interested in eventually doing a startup, since it will increase the chance that you'll work on something really cool in your free time.