Another thing I suggest that my clients to do, besides what is listed above, is to draw the alphabet with their foot while sitting watching tv, in a meeting or waiting in traffic. They can also do towel exercises (with a bare foot, pick up a towel with your toes, pull your foot back toward you, drop the towel and start again).
Also, if the person is starting a running or walking program, be sure they are getting rest days and cross training (cycling is a great cross-trainer).
I think that what many of the excellent answers are addressing is minimizing the stress on the anterior compartment in the lower leg. Ankle rolls before the workout, dorsi flexion stretches following the workout and dorsi flexion against resistance (theraband) are perhaps the best ways to reduce the risk of so-called “shin splints.”
In addition to the other answers I would add shoes that are fitted for running. Usually running shoes are 1 size larger than your other regular shoes. Buying the right shoes can fix many problems associated with running and can even improve your overall performance. If you need help with choosing the right shoe, it’s best to visit one of the running stores close to you such as Fleet Feet, Dick’s and/or other similar ones.