I'm 25 yo with a CS degree from a top school in the US. I have plenty of experience and I don't think I'll ever be out of a job or not want to code for a living.
A lot of people my age, in a similar situation, tend to not put any money into retirement savings.
I think part of that stems from the skepticism we millennials have about the uncertainty that the future holds, stock value, etc...
i.e. "Why should I put in 6-10% of my salary when I don't know what 25 years from now look like?"
Personally I'm putting in 6%, but I can probably do 12%.
I'd like to know what other people's stance on this is.
Are there better ways than a 401k to invest 6-12% of my salary?
Beyond that, a good 401k Provider is going to give you the option of HOW you invest that money you are "forced" to save. It's a stock account that you ultimately own and control. The only difference between that and say a Scottrade account you set up on your own without your Employer's involvement is the way taxes on your 401k work: Money that goes into the 401k is BEFORE your income taxes are calculated and if you manage to wait to your retirement age to withdraw from that account you NEVER pay income taxes on it. (This is why there are people that try to minimize their income taxes by maximizing their 401k contributions as much as they can afford...)
That said, you can withdraw from your 401k at any time if an emergency were to happen and you need access to those funds. It's your money. You just have to be sure to set some aside for Uncle Sam and the IRS when you do. (A good 401k Provider will even help you with that.)
I am not a Accountant, and you may want to ask one for specific advice for your lifestyle, but I had the same question when I was trying to figure this stuff out at 25. Hopefully this helps.