http://www.amazon.com/gp/product/0979303605/
I found it to be immensely helpful, and my posture is now dramatically improved. The suggestions are clear and actionable. I'd try to explain them here, but honestly the book will do it way better.
I think that the key for me is to check in with my muscles. When my posture isn't right, I can feel it because the muscles on one side or another (or forward and backwards) of my spine or neck are slightly tense.
I've found that not everyone seems to be able to monitor whether a muscle is engaged or not, but if you can, that's a tell-tale sign that your posture isn't neutral. I learned this technique from many years of karate, honestly no idea if it's transferrable if you don't do any physical activity. I feel like it should be possible, but maybe 10% of people I've described it to can feel it.
Other thing that I know for sure is that physical activity will repair a lot of the damage you can do to your body. When I don't do karate for more than about three weeks, my lower back starts hurting (old injury). Regularly not just stretching it out, but working the muscles in those areas by rotating at the hips (in my case with karate punches) smoothly and repeatedly seems to get a lot of blood flow to the affected area, work out deep muscle spasms that are pulling my spine out of alignment, and basically smooths out the action of the joints in the spine. I'm not sure biking or running would help, but I bet swimming would. Needs to be a fairly full body exercise with rotation action around the axis of your spine I think... at least for lower back.
http://www.amazon.com/Steps-Pain-Free-Back-Solutions-Shoulde...
Read books like this: http://www.amazon.com/Steps-Pain-Free-Back-Solutions-Shoulde...
Instead of buying expensive things go buy experts book on the area of posture, or better, go talk with expert people in the field. Books like this helped me in the past(I had pain in my back years ago) : http://www.amazon.com/Steps-Pain-Free-Back-Solutions-Shoulde...
But I assert you that in the area you live there is already lots of good people that could help you. In my area I found a martial arts expert(that won Olympic gold medals when young) that could identify wrong postures from an eye shot.
PS: I code mostly standing up and with a high stool.
http://www.amazon.com/Steps-Pain-Free-Back-Solutions-Shoulde...
* daily inversion (Teeter Gravity Boots on a pull-up bar—I actually pull down on the door frame while inverted for extra decompression)
* daily yoga (at home, from YouTube videos)
* using a standing desk most of the time
* Rolfing about once every eight weeks (type of massage focused on aligning fascia. It's pricey and a little pseudoscience-y but actually works really well)
* occasional targeted sports massage (if I'm crying, I know it's good)
If there's one thing of all those that's made the most difference, it's inversion. I feel so tall now. Seriously, invest in an inversion table or inversion boots if it's safe for you to do this exercise.
My posture is still not where I want it to be, but it's much better than it used to be. I still get tight in the neck (likely due to poor sleep posture). I had chronic pain in my left foot (likely plantar fasciitis) that disappears but comes back about once every two weeks. Both have gotten much better with some targeted yoga exercises, but it's a journey.
I'm slowly going through the book 8 Steps to a Pain-Free Back by Esther Gokhale (https://www.amazon.com/Steps-Pain-Free-Back-Solutions-Should...). The author studied posture in industrial vs. non-industrial societies, and she concluded that most pain is not inevitable. We have just forgotten about the importance of posture in industrialized societies. The book gives you eight sessions to practice primal posture for sleeping, standing, and sitting. I'm thinking about investing $400 in the Gokhale Method in-person course.
I now prioritize flexibility over strength. 20-40 minutes of yoga per day is a large commitment, but it's worth it. I'm still basically as strong as I was when I did CrossFit, even though my "exercise" is limited to yoga, basic bodyweight exercises like pull-ups and inverted sit-ups, and long, meditative walks.
Finally, I make some lifestyle choices around posture. For example, always getting an aisle seat for flights longer than 3 hours, so I can easily get up to stretch and walk around. Choosing a more-supportive chair at a restaurant over a slouchy booth. Not reading in bed often.
If you have back pain, maybe something here will be worth trying to you. Keep at it!