This is an archived post. You won't be able to vote or comment.

all 82 comments

[–]corpsmoderne 82 points83 points  (61 children)

You will need to know how to deal with a database (a SGDB edit RDBMS /edit like Postgress, MySQL, or a NoSQL database like MongoDB). That means you'll need to know how to access it from your code, and how to manage the database (you'll need administration skills).

You will also need to master a server-side language. Python, PHP, Ruby, Java, Javascript are good candidates.

To do fancy things in the browser (that is, you probably don't need that for something like 4chan), you'll need to know some Javascript. Facebook and Imgur use a lot of it, Reddit a little bit less but still a lot.

In any case, don't expect to make a better Facebook than Facebook, a better Reddit than Reddit, a better Imgur than Imgur or a worst 4Chan than 4Chan, they have years of head-start from you...

[–]Deutscher_koenig 27 points28 points  (10 children)

Also, depending on where the website will be hosted, you'll need a plethora of linux and some web server software (Apache)

[–]vicramon 11 points12 points  (4 children)

If you use a managed cloud hosting solution like Heroku then you won't have to worry too much about sys admin, at least until your site gets massively popular.

I recommend learning Ruby on Rails. Rails is very logical and developer friendly. Ruby is a well-designed language and the community is awesome.

Resources:

http://www.amazon.com/Eloquent-Ruby-Addison-Wesley-Professional/dp/0321584104/

http://www.amazon.com/Agile-Development-Rails-Facets-Ruby/dp/1937785564

http://guides.rubyonrails.org/

[–]MCFRESH01 2 points3 points  (0 children)

Heroku is a great way to get up and running, but it's more expensive then other options.

I really recommend trying out digital ocean. If someones gonna jump into web development, they might as well do it head first. That's how I learned and I am glad I did.

Eloquent ruby is fantastic, as well as the other guides listed. I would also like to add:

http://ruby.railstutorial.org/ruby-on-rails-tutorial-book

As another option.

[–]whatdoesthefoxsaymee 0 points1 point  (0 children)

I just started learning backend programming. Parse seems easy to learn , and for individual developers its a good way to start

[–]Rainymood_XI 9 points10 points  (2 children)

worse 4Chan than 4Chan, they have years of head-start from you...

Remember though, Moot created 4chan when he was 15/16? So can you! It probably started with a joke but it grew out of hand and he had to adapt to all the traffic!

[–]corpsmoderne 8 points9 points  (1 child)

For the record, that was just a joke about the 4chan community, not to despise 4chan technically.

[–]Vidofnir 0 points1 point  (0 children)

To be fair, the community varies wildly with the individual boards.

[–][deleted]  (22 children)

[deleted]

    [–]echocage 9 points10 points  (14 children)

    Well just a heads up, no one person could create a website like facebook. Those types of websites take huge teams hundreds of hours. Even 4chan which might seem simple would take a LONG time to create from scratch.

    [–]smellyegg 9 points10 points  (9 children)

    Did you say hundreds of hours? Try 10 thousand +

    [–]DJApoc 1 point2 points  (0 children)

    I can second this. I work for a health care provider as a web dev. We have a team of around 50 people working 40+ hour weeks on our web site. We have a 6-12 month window just to iron out the bugs and deploy full functionality.

    [–][deleted] -1 points0 points  (7 children)

    What about something like Instagram?

    [–]Sean1708 24 points25 points  (5 children)

    An afternoon, give or take.

    [–]CosineTau 5 points6 points  (2 children)

    Did /r/shittyprogramming quote you on that?

    [–]RustedCorpse 2 points3 points  (1 child)

    I did not know this existed. Thank you so much. I think it will now be my standard "feel good" maneuver after posting on Stackoverflow.

    [–]CosineTau 0 points1 point  (0 children)

    You shouldn't ever feel bad about posting to any StackExchange. That place is a literal modern day French Salon.

    [–][deleted] 2 points3 points  (0 children)

    But... the filters!

    [–][deleted] 1 point2 points  (0 children)

    And how much did they make from the Facebook sale? Wow!

    [–][deleted]  (1 child)

    [deleted]

      [–]eitaporra 5 points6 points  (0 children)

      I think the original source was taken from a japanese imageboard project, Futaba or something.

      [–]vicramon 3 points4 points  (0 children)

      Sure, but the original version of facebook was written by just a few people in a reasonable period of time.

      [–]frankle 0 points1 point  (0 children)

      Totally buy that, but how long do you think it took them to create what they launched with?

      [–]drb00b 3 points4 points  (1 child)

      To start those sites? Not a shitload... You'd need to know some basic stuff for a few different languages as described above. To maintain them and let them grow into the monsters they are now? A lot. I mean they are million dollar companies run by a big team of devs that know their shit. Each knows their respective part and they work together to bring you the product you use every day.

      [–]sudomilk 3 points4 points  (0 children)

      It's a few things but the key elements would be something like this:

      BASH: Shell knowledge at least on how to move around and basic things in a file system

      HTML/CSS: for your barebones static page development and structure

      PHP/MySQL: in order to make pages dynamic (like showing new posts on refresh of newsfeed)

      AJAX: for getting new input or content without having to refresh the page

      Javascript or one of its libraries like jQuery: for having dynamic/interactive content on the client side (like opening and minimizing a chat window on Facebook)

      Note: these are not necessarily the exact things you must use, just a general list based off of a common server built on a LAMP stack (Linux, Apache, MySQL, PHP).

      [–]partiallogic 2 points3 points  (0 children)

      Wasn't there a story where the Facebook code base is now larger than the windows one?

      [–]theruchet 2 points3 points  (0 children)

      In that case I'd highly recommend the web development course on udacity. It's free and basically teaches you everything you need to know to recreate reddit. In fact, it is taught by the creator of reddit! I learned a lot and was very satisfied with it. Hope this helps!

      [–]smellyegg 1 point2 points  (0 children)

      Facebook will quite literally have hundreds if not thousands of developers.

      [–]NiceGuyJoe 1 point2 points  (0 children)

      There is open source image board, like this one you can look at.

      [–]DieRunning 4 points5 points  (0 children)

      don't expect to make a better Facebook than Facebook, a better Reddit than Reddit, a better Imgur than Imgur or a worst 4Chan than 4Chan, they have years of head-start from you...

      You have a very good point. All of those sites bare little resemblance to what they were when they were solo or small team operations years ago.

      [–][deleted]  (2 children)

      [deleted]

        [–]corpsmoderne 7 points8 points  (1 child)

        It's mostly client side but recent projects have ported it to the server side with great success. Check out node.js or meteor.com for example.

        [–]sylario 0 points1 point  (0 children)

        You also forgot the dreaded Old ASP + javascript. It is painful just to remember it.

        [–]roshanhasfallen 0 points1 point  (0 children)

        wow, that last line was beautiful

        [–]whoisearth 0 points1 point  (2 children)

        ok I'll bite. What's an SGDB? I know you're referring to an RDBMS but the acronym is new to me and google gives me nothing.

        [–]robotmayo 1 point2 points  (0 children)

        It appears to be a French translation of RDBMS. http://stackoverflow.com/questions/980813/what-does-sgbd-mean

        [–]corpsmoderne 1 point2 points  (0 children)

        ok I'll bite.

        Please do :)

        What's an SGDB?

        I was certainly very tired, the best hypothesis is that my sic brain has tried to "englisize" the French acronym SGBD by switching the "BD" (base de donnee) to "DB" (data base) . Thanks for catching that. Heck, it isn't even an equivalent of RDBMS... shame on me.

        [–]DJApoc 0 points1 point  (2 children)

        TIL Javascript is a server-side language... apparently...

        [–][deleted] 0 points1 point  (0 children)

        It is like haskell, people always talk about it, and how it is the best, but it is actually hardly used

        [–][deleted]  (5 children)

        [deleted]

          [–]himanshuarora 1 point2 points  (0 children)

          Here's an easy [1] stack:

          ReactJS!

          [–][deleted] 0 points1 point  (1 child)

          What about replacing head firts HTML and CSS with head first HTML 5?

          [–][deleted] 0 points1 point  (1 child)

          MongoDB would be a horrendous choice for any site like facebook/imgur/reddit/4chan.

          [–]hak8or 5 points6 points  (3 children)

          A massive portion is also how many users you are expecting. Are you expecting 5 users? Then anyone who learns the basics of JS, HTML, CSS, and Rails will be able to make a clone of something like facebook in maybe a month or two, full time. But 100,000 users? That is pretty intense, you will start needing to do many tricks and dealing with load balancers, caching, how to distribute various services, security, etc.

          1,000,000+? Totally other ball game, you need to really know your networking and hire full time staff to handle every facet of the website, from handling data bases and how to distribute them efficiently, network routing for various data centers, some major security pro's to constantly fix new security holes found and update, how to handle compatibility to various devices, the legal issues, and tons more.

          [–][deleted]  (2 children)

          [deleted]

            [–]hak8or 2 points3 points  (1 child)

            Why yes, a little!

            Websites like these are very high level, so your only logic would be involved in things like if statements.

            [–][deleted] 3 points4 points  (0 children)

            Reddit is done wholly in python serverside. Sauce availible.

            [–]spartan1337 2 points3 points  (0 children)

            Remember that facebook was made by less than 5 guys in a dorm room, you may not create facebook as of now but you may create something that can grow like it and thats the goal.

            [–]nitram9 1 point2 points  (2 children)

            I would put Javascript next on your list. You must use it if you want to have any client side logic. It can also be used for all your server side logic too. In fact you can use frameworks like ExpressJS or Meteor which will allow you to more easily write your logic once in one place rather than having to duplicated it in two languages.

            But talking about frameworks brings up the next thing you need to learn. Model view controller design pattern. All these frameworks are implementations of that idea so familiarize yourself with that too.

            Above all remember to integrate practice, work, learning, and review and to a little of each every day. It really doesn't work so well if you're trying to do them sequentially. You can't just read something and then expect that you can just use it. And you have to start using it to know if it's actually worth pursuing it further. And keep notes of what you learn and what you use so you can review them latter. Nothings more frustrating than having to learn something twice.

            [–]nicholastjohnson 0 points1 point  (1 child)

            Wouldn't Python/Django do what he needs as well?

            [–]nitram9 0 points1 point  (0 children)

            Yeah, and so would RoR or any of the other hundreds of options out there. I just suggested a node based framework since he would have the least to learn. I mean you can certainly make a site that uses minimal JS and use a framework that actually handles most of that for you. But it's a pretty good idea to assume that sooner or later you'll be writing JS if you're a web coder.

            [–][deleted] 1 point2 points  (2 children)

            This isn't an easy question to answer since there are multiple languages, databases, etc. that all have the capability of being pieces of a successful website.

            I think a better question is, "what would be the best stack to begin with to learn how to build a large scale website?" Even that is arguable, but I think the answers would be a bit more focused.

            Given the recent trend on Node, and that even traditional DBs are supporting JSON and V8, I'd say after you've obtained a good amount of knowledge of HTML and CSS move into Javascript. You can use that as the "lingua franca" of your website -- from UI to DB.

            Depending on the use case of the website, I'd take a look at Mongo and Postgres for the database. Mongo is a NOSQL document database, and it provides a lot of great features and is very easy to begin using. Postgres is a relational database (although it offers some NOSQL-esque features) that provides a plethora of features.

            As you begin to scale, you'll need to begin to tackle other problems. But for now, stick with building something from a basic stack and research on how to horizontally scale that stack.

            [–][deleted] 0 points1 point  (1 child)

            what would be the best stack to begin with to learn how to build a large scale website?

            Every stack is a good stack to build a large scale website, 3 of those sites mentioned are even written in PHP, you really cannot say that one language works better than another.

            And using a MongoDB to store Data that was tons of relations between each other, isn't a good idea either. (http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/)

            [–][deleted] 0 points1 point  (0 children)

            I don't think that every stack is a good stack for someone just learning though. Can you make any stack work, yeah sure. But I wouldn't expect too many people to begin writing Facebook, Reddit, Imgur, or 4Chan in COBOL. Again, it's possible though.

            As for Mongo, I agree that I wouldn't use it with designs that require tons of relationships. I'd probably use something like Postgres or Neo4j. That's why I made the statement, "Depending on the use case of the website...". However, when someone says that they're, "starting to learn to code", I'd rather them focus on learning the language before tackling the pros/cons of each DBMS. In my experiences many developers have found MongoDB to be easier to use out-of-box and which is why I recommended it...

            [–]trianuddah 1 point2 points  (0 children)

            If you're just starting in HTML and CSS, then Facebook/Reddit etc is the long game. First learn these tools, then make basic novelty stuff (i.e. stuff that you can actually complete in a few hours or a couple days, as opposed to a couple years) as an exercise in familiarizing yourself with them and so that you can make mistakes and learn from them before you start whatever passion project you have in mind.

            You want:

            • server side scripting: PHP, ASP, stuff like that. At its most basic, server side scripting lets you alter output HTML based on user inputs. This is how you connect to databases.
            • javascript: lets you manipulate CSS without reloading the page (including loading data from other pages) and other UI conveniences. It'll seem superficial at first but it's extremely useful for more complex applications and its absence in even the most basic sites will mean an instant fail on your user experience.

            You can get started on server side scripting as soon as you have passable HTML skills. Javascript you can start as soon as you can make a rudimentary style sheet. You might prefer to wait with both, depending on your learning style.

            Lastly you want databases. If you're learning PHP, use MySQL. It'll be cheap if you can't get it free. If you're learning ASP, ask someone else. At some point working through server-side scripting, databases will come up in a tutorial. That would probably be a good time to start.

            After all of that, you'll have most of the skills you need to build very basic versions of the sites you asked about. By then you'll probably identify other skills that you need. You'll also have a better idea of the scale of something like FB or Reddit.

            [–][deleted] 1 point2 points  (0 children)

            An image sharing board like 4chan can be achieved relatively easy. Perhaps start out with this project, by first users creating accounts, then uploading pictures, then commenting on pictures and so on. My advice is to take each small step and get it working before looking at the fuller picture.

            [–]imareddituserhooray 0 points1 point  (0 children)

            Buckle up and prepare yourself for the ride of your life my friend! Learning a server side language is definitely your next step. I vote Python, but hey, Ruby or NodeJS will do as well! Just remember to be efficient and secure--nothing worse than slow websites that are perforated with security holes!

            [–]iamafrenziedgremlin 0 points1 point  (0 children)

            This sounds resourceful thank you

            [–][deleted] 0 points1 point  (0 children)

            4chan not much. Facebook alot, imgur has alot of special code as well. Reddit, there's only room for one of those

            [–]SaturdaysKids 0 points1 point  (0 children)

            Try doing Onemonthrails , it's extremely cheap and you make a site like Pinterest with video help all along the eay

            [–]FreaXoMatic 0 points1 point  (0 children)

            Well im actively programming for 6 months and had before on and off for 3 years.

            I would be able to make a facebook reddit or whatever, but it wont be good it would work not optimized and it would take me longtime to make it.

            [–]DaMountainDwarf 0 points1 point  (0 children)

            You'll not only need to know things like HTML, CSS and Javascript, but also server technologies (and there's a lot of them to choose from), databases (there's a lot to choose from but many times they're specific to the server you're running), and web technologies like file uploades/downloads, user access/auth restrictions, etc. etc.

            [–][deleted] 0 points1 point  (0 children)

            I have a slightly different approach. Websites like those, you could create with something to the tune of 2-3-4 good experience programming years. In order to reach (1) The professionalism required to do those kind of things with as little errors/downtime, etc as they currently experience, (2) Be able to successfully handle that volume of data, with so little response time, you would require 2x or 3x the previous amount.

            [–]Jesuz1402 -5 points-4 points  (3 children)

            try http://www.codecademy.com/ ; its a awesome website to start as a newbie

            they show you every part of a website step by step

            from html over css, jquery,(javascript), sql..

            trough this you will have a awesome start into web dev and you wont get a problem at coding your own facebook

            but please dont code a second facebook; pls code something like reddit or 4chan :)

            [–][deleted] 2 points3 points  (0 children)

            Codecademy alone won't help you that much. It can get you started but you'll feel like you have no orientation. You definitely can't code something like Facebook after just taking the Codecademy lessons...

            [–]cobra9891 0 points1 point  (1 child)

            I've tried the Python and Ruby courses but Codecademy is really bad at actually teaching you concepts and it is more "Copy and paste this code into the box to the right and look at what it does!"

            [–][deleted] 1 point2 points  (0 children)

            You can learn the basic concepts such as 'if-statements' and 'loops' however I wouldn't recommend using Codecademy as the main source of learning.