Walk it slowly and duck into every close (alleyway) you see. Behind the tourist-facing shops are courtyards, stairwells, and views that most people stride straight past.
Start at Edinburgh Castle and end at the Palace of Holyroodhouse, or reverse it for the better uphill views. Best in morning light before the crowds arrive.