For survival I usually find a corner of the map that is very elevated and make stone walls around the whole thing to keep creepers getting in and blowing it up. Plus, if you kill any outside the wall it'll make big trenches to get them stuck in. After the wall is done I just start making huge caves under it to find mushrooms and to get around the map.