I have observed that I have this habit of slouching and have had help from several resources to help me overcome this bad habit. Indeed it is a bad habit and it can inflict future problems like back pain. I believe that there are more tips to look up on the Internet, but the following is what I tried and tested.

1. Self-Awareness

I acknowledged this habit I had and decided that I needed to correct this before it became a problem for me, both physically and emotionally. It may be like a smoking habit that needs kicking. It must begin with a strong desire to overcome it. Starting with this self-awareness, I was then more conscious of myself and so worked out plans to stop slouching.

2. Reminders

First I had reminders from myself. I started telling myself each day that I should not slouch. When reading or walking or sitting, I must sit up straight and walk upright. Telling myself these reminders made me conscious of my posture and so I corrected immediately. Next I had the help of my family members to remind me whenever they noticed that I slouched. Because they are with me some portion of the time, they reminded me. Lastly I also recruited my friends and colleagues to remind as well. I told them my habit and they were more than willing to support me in this venture. 

3. Furniture Replacement

As I told my working colleagues about this habit, they have recommended to re-look at the kind of furniture I used. Especially in the office, they are some tables and chairs which are not healthy ergonomically for the body. So having approached the Environmental Health Safety department, they have provided me with certain special facilities which forced me to maintain good working posture. I was provided with a fixture which lifted up my laptop screen so that I maintained a headsup view of the screen. I was also given a back support for my chair so that it did not give me an opportunity to adopt a poor sitting posture, but positioned me to sit upright.

4. Use of Mirrors

My kind colleagues also gave me a mirror so that I could look at myself while working and observe if I was slouching or not. I also placed on the mirror a little notepad "SIT UPRIGHT" to remind me of my goal. I brought these ideas back home too because I personally found them very useful.

5. Participate in Sports or Exercising Activities

I have tried out and discovered that participation in certain sports and exercising helped me overcome this slouching habit too. For example, while running or jogging, I somehow had to maintain my posture in a vertical position while doing this activity. I supposed if I slouched I may lose my balance and fall as a result. I also took up swimming. 

On and off this slouching habit does come back to haunt me, but with the help of the above resources, I was able to overcome it progressively. It took a lot of discipline and perseverance but the process was worth it.