I have big dreams of writing the next Facebook (unrealistic I know) and I'm in the planning stages as we speak and I'm umming and ahing about using a php framework for this and how many development hours it would actually save me. If any? Also is it unrealistic for one person to hand code an entire social network solo? Whats the largest application anyone has written on their own? I should also point out that I have a day job, so late nights and evenings it is. And pregnant partners to deal with :)

  • 16
    Whether or not you succeed, attempting something like this will definitely make you a better programmer - so, I offer my encouragement. However, it's difficult to say how many man hours it will take. Getting a minimally functioning social-networking site up and running using today's frameworks isn't so difficult - you're looking at a week or so tops. But getting it polished, usable and scalable is another story entirely. That could takes months or years. You also need to ask yourself: what is your competitive advantage? Why would someone use your service over Facebook? Jan 26, 2011 at 0:08
  • 1
    Thanks Charles, it's good to hear some encouragement, some people on SE are fairly negative. I hope I had a competitive edge over facebook but would be foolish to divulge that information :) I see what you mean though, if I can get a bare bones site up functioning correctly within a couple if weeks I'll be happy! Jan 26, 2011 at 0:14
  • 2
    I hear there is just one guy who created and maintained the dating website plentyoffish: highscalability.com/plentyoffish-architecture Jan 26, 2011 at 5:34
  • 3
    Do not even consider this without talking it over with your pregnant partner. If I were pregnant and my spouse decided to take on a project of this nature just when I was going to need his help the most, I'd be divorced very quickly. You need to consider the needs of your child to have interaction with his daddy and your wife to have the help a spouse is supposed to give. Having a baby is a full-time job on it's own. Your life as you know it is about to radically change, personal projects are often a thing of the past if you do parenthood right.
    – HLGEM
    Jan 26, 2011 at 18:07
  • 2
    @job, child is on the way, that means less than 8 months to go (unlikely she would know she was pregnant for at least a month) and lots of things to do to get ready for the event now as well as the 24-hour care afterwards. And people aready pointed out this is a huge project probably in excess of 10000 development hours done part time and at night and not counting the marketing hours (another full time job for the next several years). The chances of it being done and making money before he is a parent are roughly 0.
    – HLGEM
    Jan 26, 2011 at 22:15

7 Answers 7


Somehow, I think writing a webapp is not the main concern.

Much more important is thinking about how to make the damn thing gain traction.

Other than that, your question doesn't probably make a lot of sense. Writing something as complex and big as Facebook is not something you can do all by yourself, and I am pretty sure that nobody has the resources to start out that big anyway, even without a day job and offspring and stuff.

  • What do you mean by traction, in this context? Jan 25, 2011 at 23:51
  • 3
    @benhowdle89 I mean people using it, of course. Everything else, such as people willing to invest money to have their ads appear on your social network, will come as a consequence.
    – s.m
    Jan 25, 2011 at 23:52
  • 3
    @benhowdle89 Traction, as in, getting people to join and marketing it and getting the word out. Facebook has 500 million people and is used by celebrities and media outlets. When Facebook first started becoming popular/mainstream, they had the huge advantage of not sucking like MySpace did, so there were tons of users that switched over.
    – Corey
    Jan 25, 2011 at 23:55
  • 2
    @Corey +1. Facebook may suck according to some individuals, but since millions around the world seem to think otherwise, I don't see a serious Facebook competitor having a chance to succeed any time soon. As of now, FB is probably "good enough" for a lot of people. That being said, everything can happen.
    – s.m
    Jan 25, 2011 at 23:58
  • 2
    It's not enough that I think your site is better than FB, I would have to convince all my 'friends' and future friends to switch as well.
    – JeffO
    Jan 26, 2011 at 1:46

I'm umming and ahing about using a php framework for this and how many development hours it would actually save me. If any?

My instinct on this is no - simply because you said the "next Facebook" and the nature of a social network is many, many users. If you were putting together a team to do this, and you hired a CTO worth anything at all, and you asked what PHP framework (if any) should be used, he'd tell you to back up and consider what language should even be used. The language must be:

  • Popular. If you become the next Facebook, you're going to need a lot of developers. Facebook reportedly has nearly 500.
  • Scalable. Nearly any language can be scalable - if you have the know-how to mess with the internals. That article is all about how Facebook writes PHP extensions in C++, has rewritten parts of the Zend Engine, and eventually wrote a compiler which transforms PHP into C++ code and then compiles it.

If you are going to need scale like this, it's unlikely that any framework is going to help you unless it's already an open-source social network platform (maybe), or you plan on just dumping it and rewriting everything as soon as you've got a few hundred thousand users.

Also is it unrealistic for one person to hand code an entire social network solo?


But, what exactly does "an entire social network mean"? What features is it going to have? The original Facebook was obviously easy enough to write by a single person. But what it has now has been developed by teams of hundreds of developers for years:

  • News feed. pulling in data from all features of the application for hundreds of connections per user, scoring it for importance, and displaying it in real-time. Realize that the uniqueness per user of the scoring relevance and sheer number of concurrent users makes caching of any kind an insanely difficult problem.
  • Photos. Not just your average photo sharing site. How/when are thumbnails generated, stored, and served? What about full size images? These must come from a CDN of some kind otherwise you'll quickly be overloading the bandwidth of your average data center plan. How do they get there? What about user interface? Multiple uploads, invalid images, live editing (rotating, etc.)? What about tagging?
  • Permissions. This one is a beast. Just the architectural concepts alone, let alone coding it in a way that doesn't bring down your servers the first time you need a complicated check (All wall posts and photos and comments that I can see from a friend of a friend). On Facebook, not only can every category of data have custom permissions, but almost every post can too! In the end, the UI must also know ahead of time what the permissions will be so you don't present the user with invalid links.
  • Likes. If you thought the graph you created with friend connections was insane, now extend it to the ability for every one of your users to "like" anything on the internet. Create a full-fledged API for this, and allow content-owners to come into Facebook after the fact and access the page created by this data.
  • And so on... Too many more features to name.

Whats the largest application anyone has written on their own?

Impossible to know, but I guarantee if they did any good at it, they weren't on their own for long. If you are successful, then you're going to need more hands to continue building.

I should also point out that I have a day job, so late nights and evenings it is. And pregnant partners to deal with :)

Good luck :)

  • Renesis, thanks for this very helpful. I think i am going to start it and see what happens! Jan 26, 2011 at 9:12

Writing a functional social network that people would actually want to use would require many many thousands of hours. Probably 10,000 At minimum.

Having 5 programmers work full time for 1 year would consume 10,000 man hours. Facebook for example most likely required many more times that for its first two years of operation.

  • 1
    Really? What are you basing this on? Jan 25, 2011 at 23:49
  • 6
    This isn't just coding, you know. To make a Facebook clone using PHP, MySQL and jQuery as your tools, it probably wouldn't take very long. The design is rather simplistic. Rather, most of the work is probably spent making it scale. They have some ridiculous amount of servers that require many man-hours to install and maintain.
    – Corey
    Jan 26, 2011 at 0:03
  • 1
    @Corey: scaling probably isn't even remotely close to the most significant and difficult problem that a budding social network developer will have to face. There is a humongous amount of work that goes into all the polish that makes a service like facebook or stackoverflow work well. Even then, twitter had significant uptime and scaling issues early in its life. That didn't prevent it's success. Scaling is a problem that can be dealt with after you have a few ten or hundred thousand users. Throwing some more expensive hardware at the problem will suit you well for quite awhile. Jan 26, 2011 at 0:07
  • 1
    @Corey also scaling isn't just installing more servers. For a site the size of Facebook, it's going to touch every tier of the service, fundamentally changing the nature of the DB layer and server layer, and even affecting UI/front-end architecture.
    – Nicole
    Jan 26, 2011 at 0:20
  • Throwing expensive hardware at the problem has to wait until you either have wealthy backers or have already begun monetizing it... especially if you have family responsibilities with your own money Dec 18, 2014 at 11:29

So practically whatsisname's man hour number is right, if maybe even a little low. Facebook, according to Wikipedia:

Facebook has over 1,700 employees, and offices in 12 countries.

A lot of man hours has gone into the Facebook as you see it.

Having said that, two things:

  1. Looks like the original launching site took about a month to write. However, something that takes a month for a programming genius who had been programming for 12 years (wikipedia, again). Someone with less experience or talent would take considerably longer

  2. The state of the art has advanced since 2002, a lot. We have things like SocialEngine (PHP), Pinax (Python), and CommunityEngine (Ruby). Thousands of hours have already gone into the development of these frameworks, so you will save yourself a significant amount of time by using things people have already written. Because, unless something's really special about your "users should be able to send messages to users" functionality, you save yourself all that time you would spend writing the messaging functionality... and that's just a small bit of the site.

  3. It'll still be a lot of work. Using a framework will speed this up a lot - even just writing to a database can be annoyingly frustrating without a framework... but even beyond normal web frameworks and the frameworks I listed will be the secret sauce that makes everyone care about your site. Maybe it's design, maybe it's some wizbang feature, maybe you just do things differently... but that differentiating factor will still take time.

  • There's a catch though to those frameworks and the functionality they provide: users expect that capability right from the beginning. So you will have to expend effort adding onto that with some new spiffy feature. Jan 26, 2011 at 0:20
  • excellent point: users will ask, "What's so special about this?" when every site has (messaging, friending, following, etc). So it boils down to a marketing question: highlight your differences, and be different somehow
    – RyanWilcox
    Jan 26, 2011 at 0:28
  • 1
    "programming genius"? Not necessarily. Experienced yes. Genius. No evidence.
    – S.Lott
    Jan 26, 2011 at 2:10
  • @S.Lott Zuckerberg was what, 8 when he started programming? I wouldn't bother counting that as experience unless he WAS a genius and actually learned something beyond basic BASIC. Jan 26, 2011 at 4:37
  • 1
    It's true there's a difference between experience and professional experience. On the other hand, it sounds like Zuckerberger had at least a fundamental grasp on the basics (and Wikipedia paints it like he had a very strong grasp)... vs "I'm going to write a social network to teach myself programming"
    – RyanWilcox
    Jan 26, 2011 at 19:07

To get a recent example of a social network creation effort, you should have a look at the Diaspora social network project, which is an open source, decentralized, privacy friendly social network.

Regarding the man-hour aspect, I think they have started around May, last year and have just reached the Alpha stage, with 4 core developers and 200,000 US $ of donation. You can even have a look at their work on Github and see the number of active contributors.

Only counting 4 core developers they have probably already invested at least 7,000 man-hours and they are far from completion so I think whatisname's estimation of 10,000 man-hours sounds reasonable to get something basic, by today standard, working.

And they are also trying to be The Next Facebook.

  • 2
    I'm sure Mark Zuckerberg didnt get this sh*t when he said he wanted to make a better MySpace lol :) Jan 26, 2011 at 16:05

If I were going to write the next social network, I would begin by considering not using server side code at all. I would do it in HTML5 and only invite people who are clever enough to use browsers that can interpret it fully.

If you write the script to the sequel to the Social Network, please include the part where I sued you for taking this idea that I gave you on programmers.SE and you gave me an undisclosed amount of money in excess of 65 million dollars.

Oops, forgot to answer the question.

That'll take you about a week and there are no security concerns at all.

  • Well Peter Turner, you make a fair point. A million upvotes to kicking Internet Explorer in the groin. Jan 26, 2011 at 17:07
  • Peter Turner you are either extremely sarcastic and have a big humourous nature or you're an angry man! Ha :) Jan 26, 2011 at 17:09
  • @benhowdle89 Yeah, that was using the <sarcasm> tag profusely, it renders ok on my machine, but I understand if it doesn't work everywhere. :0 Jan 26, 2011 at 17:12

Writing a chat site and declaring it social network isn't difficult nor much coding effort. Hundreds of programmers are doing that right now, and all will fail to gain traction no matter how many features are coded in or how stylish it looks.

There is no user base to gain unless you can build a robust technical and usability interface to Facebook. That's a coding effort few are capable of, and some fail on proxy implementation willingness (Diaspora) to create a factual social network.

Btw, there might be easier target groups than Facebook users. (Though I'm probably not entitled to comment, since I have it cached in /etc/hosts as ever since those tracking buttons appeared.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.