Sit up straight with your feet flat on the floor (or on a footrest), and your thighs roughly parallel to the floor.
This is something that I continuously struggle with. I spend a ton of time on the computer from having a full-time job and being enrolled five college classes. There are times I am so tired of being at the computer, so I slouch over the desk. While I might think that I am helping myself, I am technically doing more harm than I am good. Sitting up straight with my feet on the floor can be so challenging. I like to have my feet in the chair. I hope to be more diligent about my posture as I move further.