Over the course of my career I’ve had different conversations with people who defended their decisions to stay at a job that either wasn’t fulfilling, or didn’t offer them any room for growth. Frequently, one of the main reasons given for staying ends up being, “but at least I’m learning what not to do”.
That has got to be one of the worst excuses to stay. Ever.
You don’t learn about success by studying failure. Think about it for a moment — can you learn to be a world class tennis player by watching poor players? How about trying to become a champion chess player? You study Bobby Fischer and Boris Spassky, not Grandpa and the guy down the street!
Want to learn how to have a successful marriage? Don’t waste your time studying failed marriages, and say that you’ll just do the opposite. If you study failed marriages, you will notice that they probably argue a lot. But guess what, people who have successful marriages argue too?! The difference being that in successful marriages they fight fair. If you decide that in order to have a successful marriage that you will never argue, well, good luck with that. Going to bed angry with your spouse is heading down a path that could quite likely lead to the end of your marriage.
If you want to grow, surround yourself with people who are better than you. If you want to be a better programmer, work with great programmers. If you want to be a better manager, observe how great managers operate.
Now, go out there and do it!