I went through all this crap you describe right up front. Then, as I got more skilled *and* more savvy, I learned to see the warning signs and avoid the crap jobs. I also learned to spot trends and be proactive in acquiring new skills. I don't get that crap anymore. (Which is a good thing, `coz this damn stock market has torpedoed my early retirement.)

New skills are key. Nobody cares about 370 Assembler anymore. C++ helps, but it's a bit generic. Learn something new, and in demand. On your own time if need be. Publish in a magazine, or as open source.

And never, ever take a perm job that involves nursemaiding a legacy system. It'll pay the bills short term, but it'll kill your marketability in a year or two.

The school of hard knocks is a tough school, but the quality of education beats anything you'll get in college. I guess I was lucky to be placed in the accelerated learning program. I sure didn't feel lucky at the time.