Holding an upright posture requires exercise. It <i>IS</i> exercise, actually, which is why it is hard to maintain for a while. So for that aspect of the problem, one part of the solution == training, strengthening back muscles, yoga, meditation, etc. By this, I mean as a extra-curricular activity.<p>As for posture itself, there is no simple answer. The way you sit, the placement of your peripherals, how much time you spend sitting, these are all factors. In order, then, and in brief:<p>Rolling your hips forward pushes the spine up. This is fundamental, literally. Try a sitting position where your legs decline from your butt at a downward angle. Sitting "indian style" on a decline is a good place to start (or the "beaver" stretch position, with flat feet together. Obviously, your average chair is not conducive to this. ALternatively, you could sit on a pillow on the floor. You can sit with the lower half of your ass off a flat chair, with legs tucked under, but it is not the best for circulation.<p>Your workspace is all important. If you're a pro programmer, it's worth every effort to make your workshop (or command center, if you prefer) as close to some ideal as possible. For instance, putting your monitor above the parallel plane of vision is probably a big deal. Parallel plane = straight ahead. Ergo(nomically): you should look upward to your monitor. This will encourage your posture.<p>Again, since maintaining the position is actual work itself, it follows that your should take regular breaks, stand up, walk away (or pace), return after a few minutes, and get back to work. This also helps circulate blood. A programmer I work with espouses the Pomodoro Technique, which is a time-on/time-off regimen for deep cycle work flow. The effect is you set a timer, and follow basic rules without fail. It's also good for your eyes to to turn away from the screen every 45 minutes.<p>Bonus: breathing is life. Breathe deep for a deeper life. Regulate breath, keep yourself extra-oxygenated. This is good for awareness and staves off fatigue, which are critical for not recessing down into a slouch.