This is something my father expressed to me many years ago. I know a lot of people who are not happy with their work / job and quit before finding new employment. Not everyone can quit and look for new work due to financial situations.
Be careful putting in your two week notice, some places will fire you immediately. If this happens communicate with your future employer, sometimes they will hire you sooner.