A while back, Shamus Young did a whole series of posts on creating a procedurally generated city from scratch. When he was done, he released the source code.

I think the really valuable thing about this project is how his blogposts walk through the process, discussing the problems he ran into and the ways he tried to solve them, including some backtracking and lots of experiments. It’s a good look at what thinking about a project like this looks like when you’re working on it.