Yeah, the military will definitely help you sort that out. I still can hear my platoon NCO growling in my ear that if he saw a curve in my back that day, he was going to rip my balls off and shove them up my ass... It worked! The downside is that my line of work stuck me back in front of a computer for most of the day, so certain bad habits crept back. Not everyone can join the military, so here's what I've done to correct the problem:
- 1) Contract your stomach muscles at all times. This instinctively straightens you out a bit. Then draw back your shoulders. Any time you notice you're slouching, remind yourself to do these things and soon they become instinctive. If it helps, have your friends or family give you a slap on the back of the head if they catch you slouching. Another technique I use is to always imagine that a girl is checking me out - that always gets me at attention and I make sure to straighten up.
2) Keep both feet on the ground as much as possible when standing or sitting. Particularly when sitting, lots of back problems come about when you're twisting your body or putting all your weight on one ass cheek. Your body compensates for muscle pains or strains with bad posture, so minimize them.
3) Exercise. With bad posture, the support muscles become really weak to the point that even if you know good posture, it's hard to maintain it. Strong abdominal and back muscles make a HUGE difference with posture. Work situps and some kind of rows into your regular routine, and you'll find it's much easier to maintain good posture.
4) Stretch. This kind of goes with exercise, but stretch you back out every day. It sounds like you have to stand up a lot for work, and sore muscles will definitely tighten up. 12 years ago, I hurt my back in school, and I got a great book of shoulder and back stretches by Bruce Lee that I use religiously to this day.
Anyhow, I hope these help you out. It's not easy, but it does get easier over time. Damn, if only we'd listened to our moms when we were younger and straightened the fuck up at the dinner table!