Zuckerberg was already a great programmer before Facebook, and had a number of successful projects under his belt. Facebook also took years to build, its growth was not anything like what Pinterest has been experiencing.
http://www.thecrimson.com/article/2004/6/10/mark-e-zuckerber...