The key is having a plan and actually sticking to it. Most of us fail on that second part.
Many gamblers have a bankroll it may be written down or just something in their head but only a few actually stick to it. And it is the sticking to it that is the hardest part of it all. One of the ways to ensure you can stick to it is to have a gambling buddy that puts you in check. It works well for me.
There are other ways that can work for different people too, so we must explore and see what works to help us stick to our bankroll management so that we can leave to gamble another day.