we 'd wandered all over old town , stopping by the grave of the famous canine grey friars bobby , and the nearby cafe the elephant house where j.k. rowling was said to have written some of harry potter in the back room that overlooked edinburgh castle .