In The Monk Who Sold His Ferrari: A Fable About Fulfilling Your Dreams & Reaching Your Destinyby Robin S. Sharma, it talks about the Magic Rule of 21. You apply this rule when you want to have a new habit.
It is very tough to get rid of old habits because old habits die hard. However, what we can do is to have a new habit that has so much energy that the old one will go away. This is when you replace your bad habit.
In order for this to work, you need to apply the rule. You need to spend 21 days in a row to permanently have a new habit. You need to make it like a ritual, doing it at the same time, same day and same place.
For example, I have a major problem with tidy desks, so my bad habit of allowing my desk to become messy should be kicked. I want to break this habit by having a new habit, which is to tidy my desk daily, so that things will not pile up and go missing. I will have more space on my table and I will feel happier with a neat table.
However, as I have not applied this Magic Rule of 21, my table is constantly in a mess. Perhaps I have unwittingly applied the Magic Rule of 21 by putting things on my desk everyday, and leaving my things there without putting into drawers or acting on them.
Hence, to get this to work, I shall spend 5 minutes every day, early in the morning when I get to work, to tidy my table. I shall put away all books, and stack the papers properly. Things that need to be filed should be filed. My pens should go back to the same containers I had taken them out from.
By the end of 21 days, it should become a routine for me to start my day, and I will not have to waste huge amount of time on finding papers.