While I don't think HLGEM's answer is incorrect, I think that "playing politics" requires a bit more guidance.
Executive Summary
Here is a three-step process to minimize the damage to your own career.
- Push to make the project succeed
- Suggest solutions rather than harp on problems
- Turn the failure in to a selling point
Push to make the project succeed
Most projects are not doomed to failure at the start. They start off well and then take an unfortunate turn. Your job, above anything else, is to do your darnedest to make sure the project doesn't go south.
Success or failure, nobody likes a Negative Nancy, so pushing to make the project succeed from day one will give you a leg up as someone who was doing the right thing (even if the result ended up wrong).
Someone in management decided that this project was worth assigning resources to, and your job isn't to question their decision (that is usually above your pay grade), but rather to find a way to make that decision work. If you can't do that, you should do your best not to be assigned to it in the first place.
If you can't push to make the project work, you are a very easy target to get thrown under the bus when it doesn't.
Suggest solutions rather than harp on problems
Caveat: The below section assumes that the failure of the project is not due to ethical or legal missteps. If the project is going to fail because someone is doing something seriously unethical or clearly illegal, then I would argue you have a moral obligation to blow the whistle (anonymously or otherwise). If the stars are just aligned against the project, then I suggest the below course of action
So you're giving it your all, but you are having nagging doubts that it is possible to succeed. You can see the writing on the wall that this could go south, and you can create a list of reasons it is going to fail.
The rookie mistake is to see an issue and cry it from the mountain. Right or wrong, the issue with being outspoken is two-fold:
- You are being openly negative which kills team morale
- You aren't giving management the chance to save face/fix it themselves
Instead of speaking your mind and attracting attention, use tact and make people feel good about your role to improve your chances if things can't be turned around.
Trust in the Project Manager
If there are issues that need to be dealt with, bring them up to the project manager -- don't go above his/her head, or spread it around the team first.
This will make sure he/she is less likely to throw you under the bus.
Bring Up Solutions, Not Problems
If the project is going south, the project manager probably knows it better than anyone. Giving them solutions rather than stating problems they already know will give them a better impression.
Instead of saying, "You know the cog we're making will be obsolete by the time we finish with this project" you could say, "Parts X and Y of the cog we're working on would be great in our current widget for reasons A, B, and C."
This gives your project manager a way to pivot the project and save some face. It also gives them ownership of the idea which will lessen the chance of getting thrown under a bus.
If the Project Manager Doesn't See the Problem...
In the rare case that the project manager is really blind to the writing on the wall, and you do need to inform them that there is an issue threatening the success of the project, be tactful.
Don't say, "Hey project manager, this cog will never work because of reasons A, B, and C. It's obvious that the project will fail unless we do X, Y, and Z." This will serve to paint you as a Negative Nancy and could turn the project manager defensive. Instead try something like, "Hey project manager, I'm sure you already noticed, but A, B, and C may cause some problems down the line."
I'd recommend writing a casual e-mail to have a nice record showing that you informed the project manager about A, B, and C, especially if they actually do cause the project to fail. Using this e-mail is a last resort, as blame games never end well for anyone, but it does cover your arse if the project manager points his finger.
Turn the failure in to a selling point
So you worked hard, did your best, but the project failed anyway. While your company may do some form of a post-mortem (and perhaps assign blame), I'd use the opportunity to show the company that:
- You learn from failure
- You take failure in stride
- You have the self-confidence/maturity to admit faults
My personal style would be to give a presentation to my group/team, or send an e-mail that included a bit of self-deprecating humor with some serious lessons learned.
As the quote attributed to Edison goes:
I have not failed. I've just found 10,000 ways that won't work.
The point is to give some serious thought to what you could have done better, and deliver it to the people around you in a way that shows that some good came of the failure, and you're a better employee for it. The "stench of failure" is the inability to learn from mistakes. As the story goes:
A promising young executive at IBM was involved in a risky venture that lost $10 million for the company. When Tom Watson Sr., the founder and CEO of IBM, called the executive to his office, the executive tendered his resignation. Watson is reported to have said, "You can't be serious. We've just spent $10 million dollars educating you!"
Don't look at this as something you need to run from, embrace it. Everyone makes mistakes, the people that rise learn from them.