I recently started a job in assisting my company with operations. This essentially is a software job, so I spend my 8 hours at a desk. I sustained an upper back strain before starting this position that did not fully heal before starting. I now find that sitting at my desk for 8 hours a day is really bothering my neck and shoulders. I get up every hour and try my best not to slouch. Stretching too frequently aggravates my injury, so I am in a tough spot right now. Does anyone have any other tips to alleviate the tension in my upper spine and neck?
In addition to the other excellent answers, and to obtaining and following medical advice, check the relative heights of floor or footrest, seat, arms, keyboard, head, and screen. In particular, having the top of the screen too low can cause neck strain - at least, that was what an ergonomics person told me when advising ordering a monitor riser to lift a monitor up an inch.
If your work involves thinking time as well as typing, close your eyes or otherwise disconnect from the computer while you are thinking. A lot of us get into the habit of staying in typing position while thinking because that makes it clearer we are working.