Accept that software is not a meritocracy. Not even close. The politics are as vicious as in any other industry. You want to know why that idiot is calling technical shots while you're downwind of the complexity that he imposes? Because he played the game, and you didn't.

Now, the good news is that most software companies are running at about 5% efficiency. Most of the code they have exists to serve dipshit requirements that aren't necessary and make no sense. It's junk complexity that no one would miss if it were gone. Why is this relevant? Because if you're putting 8 hours per day into order-following grunt work, you're an idiot. Do that, and of course you'll have no time to work on interesting stuff. The way you get a better job is to spend at least half your day learning the skills that you'll need to get where you want to go.

Treat it as an optimization problem. You want not to get fired. That's one constraint, but not a tight one because a lot of people keep their jobs for years while doing very little. Your objective: you want a better job in a year. Are you going to get a better job within the same company, doing more interesting work? Or are you going to leave for an external promotion as soon as it's viable? No one is going to know if you put side-project accomplishments on your resume, so you should.

Most people only "look for work" when they're in shitty situations. The rest of the time, they either (a) coast, or (b) put their all into their assigned work because they "really believe in the company". Both of these extremes are ridiculous. Always keep an eye open for something better, and start your search process when things are going well, not when they've gone to shit, politics have turned against you-- note, 95% of firings are about politics, not "performance"; that's an attempt to use middle-class guilt to prevent a fired employee from seeking legal recourse-- and you've lost your confidence.

You need to be selfish, because no one will look out for your advancement. Treat well the people who treat you well. Find ways to read machine learning books at work. (Don't open a book at your desk; that's political suicide. Get an e-reader or PDF.) One thing: don't write any code that you care about owning using company resources or "working time". If you want to turn a side project into something salable, get up at 5:00 or dedicate your weekends. It's not worth the risk.

So yes, the disgusting truth is that 90% of the work you'll be assigned will actually hurt your career. This is why, in most jobs, you should be putting just enough into your assigned work to get by, and using the surplus for your own advancement.

By the way, most of the work going on in the corporate "big guys" is junk as well. Yes, there are people at Google and Amazon who get to work on cutting-edge machine learning algorithms, but most people at those companies don't, you'll almost certainly not get such work in your first year, and the politics you have to navigate to get onto those projects will disgust you and, if you succeed, make you a worse person.

One solution would be only to work at open-allocation companies like Valve, but in 2012 there aren't that many of those yet. There will be more in the future, as they outshine the closed-allocation dinosaurs and starve them of talent, but that will probably take 10-20 years.

For the mean time, you have to learn to fight. One of the problems with most career advice sites is that they give AFC advice instead of teaching Game. The people who get to work on the good projects are those who figure out how to control the division of labor. They found a way to make people trust them "prematurely" and gained enough influence over the division of labor to have a niche. It's not a trivial thing to do. You'll have to go far out of your comfort zone, learn some social skills you might have been weak in, and it will take years. Right now, though, I don't see any other option.