Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Learn how to build a small Twitter clone in 7 days (trysparkschool.com)
190 points by shane_burkhart on Dec 17, 2016 | hide | past | favorite | 63 comments



"Small Twitter clone" can be taken two ways, and this one, I think, is the less interesting of the two. (Not to denigrate the project for what it is; it's a good idea.)

On a one-machine scale, Twitter can be a single Postgres table, or a single ElasticSearch index. At the scale they actually are, it's really a whole lot more.

I'd really love a tutorial—or possibly a whole book—that instead took you through setting up the sort of distributed system that is required to make a Twitter clone run at a Twitter-like scale. Either through IaaS APIs, or on your own with something like OpenStack DevStack.

It could probably start where this tutorial ends—with a one-node system running a Twitter-backend-alike monolith. And then each chapter would increase the scale, introduce a problem the scale causes, and then walk you through adding in an additional component: a message queue; a fragment cache; app-level health checks; a search indexing cluster; distributed logging + request tracing; geographic sharding; multi-master DB replication—in order to solve that scaling problem.

There would also be scale-points that would require changes in the business logic: making IDs globally unique and sortable ala https://github.com/twitter/snowflake; deprecating but keeping around old APIs as new ones are added; "Ball of Mud" refactorings; isolated Enterprise clusters of the app; etc.

Bonus points if later chapters actually go back and rip out solutions that were introduced in earlier chapters—not because they were mistakes, but just because they were right for 10^3/s but not 10^6/s. And bonus bonus points if they assume an SLA that requires that such switchovers occur without downtime.


I really like this idea! It has a very real world feel and I'm not sure there is another course that does what you're talking about.

I think the course is more advanced than my target audience could handle right now, but it might a nice follow up to a bigger web app course.

I'll definitely write this down as an idea for a future course. I'd like to create a series of courses that take people from zero to employable and I think that would be a nice addition. Thanks!


"How would you build Twitter?" is a long time interview question of mine. It usually brings out really interesting stuff.


I finished the course a few days ago and it was awesome. Of course it is not a fully functional complete clone, but it is an incredible learning resource.

It really starts from the beginning as in "first you have to install the proper tools and prepare your software development environment" beginning. Which is great to teach you things that you wouldnt learn in other free online courses.

I think it is a essential resource that present you the full stack of a web app, acting as the perfect complement to more pure code oriented courses like freecodecamp and codecademy.

And you can really start from zero coding knowledge. I fully recommend it.


>Of course it is not a fully functional complete clone

Indeed, that would require adding a decade of neglect and abuse. :-)


Thanks for the awesome recommendation and I'm glad you enjoyed the course!


This looks like a really cool course.

In case anybody is interested in learning how to build a Twitter clone in Nim then consider taking a look at my book[1]. It's not free but it is a good way to learn Nim and web development concepts in a systems programming language.

1 - https://manning.com/books/nim-in-action?a_aid=niminaction&a_...


Interesting that your site doesn't work at all without allowing third party scripts. I don't think I've ever seen anything like this before, hosting the entire page on another domain.


Yeah long story on how I ended up here. I was using http://teachable.com, but then I decided it would be easier to use jekyll since it's good for code highlighting. I already had the homepage built in leadpages, so I used their snippet to include it on the page.

I don't like it, but I haven't had time to rewrite the page.


Ouch - I'm the CTO of teachable, had syntax highlighting on the todo list forever - it just got bumped up on the list.


Hey, love the product, but there were just a few things I needed to be a little better.

The code highlighting was a big one, but I also had issues when updating raw HTML. I would create a code block in raw HTML and then go to update it later. When I updated it, the elements that were there previously would be escaped after updating. So any time I needed to update raw HTML, I had to recopy the entire snippet since saving it would mess up what was there.

Other than that, I would've liked a little more detail for stats. I think I was trying to segment users by how much of the course they completed, but didn't find an easy way to do that.

I like the Teachable platform and I'll be making other courses in the future. I'll more than likely switch back to Teachable when the syntax highlighting gets done.

If you have any questions, feel free to reach out at shane at trysparkschool.com. Thanks!


This is why I love hackernews.


I visited the page with uBlock on and nothing showed up. The I noticed that leadpages.net is blacklisted on it. So I had to remove the Ad Block and refresh the page.


Cool, may I recommend building an OStatus-compliant twitter clone?

https://www.w3.org/community/ostatus/


I don't have time right now, but I'll definitely write that down as an idea for a future course. Thanks for the recommendation!


The last activity I see there is from January 2012, nearly 5 years ago. Is that still active, perhaps somewhere else?


It's used in GNUSocial which has been gradually rising in activity.


Thanks for the course! I have a question unrelated to the contents: Why did you choose to release it for free? I guess you spent a lot of time preparing it, so I assume there must be some kind of (non-monetary?) benefit you expect to get from it.


There are already enough barriers to overcome when getting started, I didn't want money to be an additional barrier. I have a bunch of friends that want to learn to code, but have struggled with courses that try to get technical too quickly. My goal was to create the best resource for getting from 0 to 1.

I'm always going to offer this course, and a few others, for free. Having said that, some people want to keep learning after taking these courses. I'm going to offer a paid course that builds a full web app with users, payments, git, etc. People that take the paid course will be able to build just about any web app they want. My hope is, with a little more practice, they would be able to get a job as a web developer.


Awesome! Thanks for your reply!


@Shane, is the course emailed in one hit, or in batches. If so that is an interesting way to do it (phased roll-out of course by email) in itself.


It's sent out one lesson per day for 7 days. I used to do all in one day, but the course completion rate was significantly lower. I think people were getting overwhelmed.


"I think people were getting overwhelmed."

Good point.


If you're interested in that style of learning and would like to learn more I recommend Nathan Barry and ConvertKit. It's basically a tool for running courses via email amongst other things.


Ugh, I had to unblock a bunch of scripts to even view this page. Super fail. I'm going to reblock everything I just blocked. Thanks.


when someone builds a free resource to help people do you not think that the tone of your comment is a bit harsh. Maybe something like 'hey Shane if you did x or y it might help those people who have config z access your stuff'


Can you let the emails roll in, then do the course later in your own time? Or do the links expire?


Yeah you can definitely do that. The links don't expire.


The page is empty. Blocked by uBlock Origin.


My Script blocker killed it too. If it wasn't a link from HackerNews, I wouldn't have bothered to even try to unblock it.


Yep, I can confirm the same thing.


How did we as an industry go from "create a blog in 10 minutes" with rails to a "create a twitter clone in 7 days"?

It seems we have gone backwards in terms of speed of getting things done in the last decade.


Not really creating a blog in 10 minutes using a framework is very different from learning to build a twitter clone with without one is not comparable in my view.


Back in undergrad I picked up PHP for the first time one day and built a blog with comments in one sitting. Super easy, anyone could do it, no frameworks (or javascript) required.


How did you do ajax requests without js?


Ajax might have existed back then, but it was probably still called "DHTML" :-).

To be honest I'm not really sure why you'd want javascript running on a blog today let alone more than decade ago.


I got an email with the first course today and was pretty blown away tbh.


Thanks! I love hearing these things. I hope you enjoy the rest of the course :)


That 1.5MB of image on the landing page should be shrunk drastically—you could trivially shave a megabyte off it, or even more.


You're right. I built the page with leadpages so I figured they would do that for me. I'll have to shrink it down manually.


This[1] might be helpful.

[1]: http://tinypng.com


Thanks. Unfortunately, it came back with an error when I uploaded my image.


pngquant is more developer friendly :)

https://pngquant.org/


Is their any other sites/courses like this freely available?


Though I have not used it yet, https://www.railstutorial.org by Michael Hartl also focuses on building a Twitter clone.


Rails Tutorial is probably the single most influential training course among the Rails community -- at least anecdotally.

I have worked with dozens of Rails devs over the years and in my estimation at least 80% have done the Rails Tutorial. In my opinion, it's the single best resource for learning Rails in a way consistent with real-world best practices.


100% this. I learned rails with that tutorial and highly recommend it.


Not free, but if you don't mind paying the cost of 2x pizzas you can get life time access to a 10 hour self paced video course that will teach you how to build a large real world application with Flask and Docker.

Instead of building a watered down application, it concentrates on building a production ready application. Instead of a Twitter clone, we build up a payment processing application that protects a game behind multiple tiers of pricing plans.

Some students are building their next start-up based on the code examples used in the course. One student even landed a $5,000+ contract a few weeks after taking the course.

Details (along with a demo video showing exactly what we'll build) can be found here:

https://nickjanetakis.com/products/build-a-saas-app-with-fla...


>Instead of building a watered down application

>with Flask and Docker

Sounds more like one bread stick and two eclairs sort of deal.


I'm not sure if you're complementing or insulting the technology choices, but thanks... now I'm in the mood for bread sticks.

Tons of students loved the Docker content. It is definitely secondary to learning Flask but you learn enough to get comfortable using Docker in development. It's what we use to set up a development environment.


Minor nitpick: it says "...you will learn how to:" and then one of the bullet points (the one about SQL) starts with "How to..."


Good catch! I updated it, thanks.


if the feature scope and traffic scale is small enough you can build a Twitter-like in 7 hours. if not 7 minutes. given all the tools, frameworks and services avail today.

scope and scale are key


Is there anything like this for heavier topics like AI,ML etc?


I teach an online course: https://www.udemy.com/python-for-data-science-and-machine-le... on these topics


I built writedown.co which is a blockchain enabled immutable Twitter clone. Check it out.if you like


sad to be downvoted each time I mention this free site I built with love. Haters gonna randomly hate I guess


Twitter clones are the easiest thing to teach in a beginner programming class. That's ok, but don't say it like it is an amazing thing.


Lurker here. Someone mentioned this the other day here too. Too bad Twitters dying, but you get the idea. https://news.ycombinator.com/item?id=13157254


Twitter is far from dying given the restructuring and the current pile of VC cash it's sitting on atm.


Twitter dying is a huge opportunity, they've certainly proven the demand for it. It's a surprise there aren't thousands of VC-backed wannabes popping up already. Would be really interested if FB or Google bought them out and sought to integrate.


At the same time they proved demand they also proved difficulty in monetization. Even if you have better execution there is the large network effect for acquiring/maintaining users.


They have proven sizable, but finite demand. And they have proven that even being as popular as they are, making it work as a business is tricky. It makes very little sense to invest in disrupting a niche where the #1 player has not found financial success.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: