Hacker News new | comments | show | ask | jobs | submit login
Building a Hacker News clone in Django - Part 1 (Screencast) (arunrocks.com)
125 points by arocks 1398 days ago | hide | past | web | 42 comments | favorite

Is there any kind of streaming service like Twitch.tv but for programmers?

Maybe it's weird... but I really like watching other people writing a project (Like in the Ludum Dare), I like to see how they tackle the design, how they work, what cool tricks they use, etc.

You can even interact with them via chat, and not only help but also ask questions about what they are doing... is great for people who are still learning.


This would be so great. It's really difficult to get a good video stream for displaying text, and often the only recourse is to go for super high quality, which is killer if you have limited upload rates.

Yeah, my upload speed is about 0.5Mb so I guess I can stream at 640x480 :P

Although many people seem to do fine for the Ludum Dare.

I remember the guys at Big Block Games made this game in a 2 week sprint for charity where one of the artists or programmers had to be online at any time of the day:


It was completely streamed live and was really enjoyable, they'd work and chat to the watchers at the same time, answer any questions and give advice on what they were currently doing. Rather annoyingly it worked really well but I haven't seen anyone repeat anything similar since.

Baader-Meinhof -- I was just looking an hour ago for something like this. The best I could find was: http://thecodeplayer.com/

http://codestre.am/ seems to be gone, but served this role.

Maybe this is a nitpick but I'd revise the opening sentance: "There is no better way to learn something than to watch someone else do it".

I think we can all agree that when it comes to programming the _best_ way to learn it is to actually program.

Hi! This is the author. I was pretty sure that someone would point this out and I completely agree.

But, even Programming has to be taught. Among the many ways to learn programming, I think the best approach is to demonstrate how a good progammer programs and explain the thought process.

I gotta say, this looks like it was copied from tutsplus. But hey, if it helps people, who cares. I don't.

I would like to clarify that I was working on this, on and off, since last year (yes, it takes quite a bit of effort to create video tutorials). I read the tutsplus course page and it seems it is a course for teaching Django to beginners. It seems our approaches are different too.

Anyone have a reference to the Tutsplus tutorial? Curious to see how that differs from this one.

yeah is copied from tutsplus :-/ the only difference being its distributed for free

Rubs me the wrong way where people don't give the necessary credit.

I agree with you on that. I didn't mean to say that the idea or the video wasn't good.

When you say programming has to be taught, do you include being self taught?

Definitely agree with this. I learnt to program with a lot of trial and error.. no screencasts or online workshops.

Also - I haven't actually watched the screencast, but looking at the text the virtualenv setup seems very wrong.

Embarrassingly enough, I learnt to program in Game Maker when I was pretty young. I still remember the day when it clicked what variables were :P

Game Maker is fun, I still play around with it now and then.

I still consider Game Maker to have the best standard library for actually making 2D games of any engine I've encountered.

It is really quite good at what it does, and it's an easy way of building quick and dirty .exes too.

I do wish knowing GML was good for something somewhere else though. Or that it used another language like Python for its scripting.

Nothing would make me happier than being able to use Python with Game Maker's functionality.

Don't be embarrassed. You've got to start somewhere.

I would agree that the best way to learn programming is to program, not just following along, but find a real problem and try to solve it, but then again, I know a lot of people who kept getting stuck because of the fear of "doing it wrong". So, yeah, watching other people do it has its merits as well.

It helps a lot if we watch some videos before actually program in a new language. It is also faster way to learn than reading a book, although reference books can be invaluable. I practically learned ActionScript by watching a screencast.

I know many people enjoy screencasts, but they are just not for me.

I can't copy-paste code from a video.

Searching is orders of magnitude slower than just pressing "Page Up"/"Page Down". This is particularly important when I just want to take a glance and figure out if the text/video is of any interest.

I have to adapt myself to the speed of the video, and maybe most importantly, I have to swallow all the non-relevant parts (such as moving windows, launching commands, typing, etc.).

It takes me so much more effort (and patience) to watch a video instead of reading an equivalent text, that I almost never do so (khan academy being the exception).

Different strokes, I personally get pretty bored by watching people enter code and manipulate their windows, I read a lot faster than that and don't get distracted by all the non-code parts. Never mind different setups. I also much rather read a blog article than watch a long-winded podcast.

As Sartre said, Hell is watching other people use a computer.

Cool! Doing this from scratch is great for learning.

I wrote the same article and demo a month ago, albiet a more comprehensive and complete approach using Mezzanine (a Django based CMS). The article focuses on how most of the features needed for something like this come out of the box with Mezzanine:


Probably worth noting that stephen_mcd is the author of Mezzanine.

I really like some aspects of Mezzanine, and I've used it on a couple of projects with success. But I don't like Grappelli much, I prefer django-admintools so for this reason alone I prefer FeinCMS or Ella.

Mezzanine intentionally works fine without Grappelli, just remove it from your project settings :-)

Will do, thanks.

Never understood why Grappelli removes the button click from admin actions!

This is brilliant and looks much more comprehensive. My intention was to use Django to the fullest without the help of a third party library. Mainly to cover some of the recent features of the framework which were not covered elsewhere.

neat, and a nice clean demo of django.

myself, i wrote a HN clone one afternoon (when HN was down for several hours) using flask. since i'm the only user, i feed it with twitter. what i did was set up a twitter account - @hacktweetnews - and have it follow most of the top twitter users from the HN community [1] and then score it reddit-like. no votes aside from what people post as duplicates, no comments - so it definitely lacks the full features you have, but then again it's just me. however, like your django example, it was super easy to set up in a framework. yours is definitely far more feature-filled!

1. http://talkfast.org/2010/07/28/twitter-users-most-followed-b...

That's great - coming from Rails I was always curious learning Python and especially see how Django differs from Rails. Will definitely watch this..

Curious. I was watching a screencast from Tuts+ Premium the other day that was meant to teach Django to beginners, by building a Hacker News clone.

[1] https://tutsplus.com/course/django-unchained/

This is pretty interesting. Looking for 2nd part!

I built something similar with Rails as a 'hacker news for poker' and open sourced the code, if anybody wants to play around with it (or use it). Pull requests welcomed :)

https://github.com/wilfra/theplayr (live site: http://theplayr.com)

How does this compare to 2scoops of django(1)? I bought it but it seems like that's the book after this one. If so, how come you put that one out first? It would be nice if these books came out in order of skill

1) https://django.2scoops.org

Disclaimer: I'm one of the authors of Two Scoops of Django.

This screencast looks awesome! Okay, now to your questions:

First, the screencast for creating a HN/Reddit clone is a tutorial. It's a good place to start when developing in Django, or as a reinforcement for the existing tutorial.

Second, Two Scoops of Django came out first because we (me and Audrey Roy) wrote it first. Arun Ravindran, who is making this tutorial, is a separate person and completely unaffiliated with us.

I'm not affiliated with either party, but I wanted to chime in and say that I HIGHLY recommend two scoops for anybody looking to learn Django, expecially if you found this screencast helpful and are looking for something more to supplement it. There's so much to learn in that book that I can pretty much consider it required reading for serious prospective Django developers. Thanks Pydanny/Audrey! You guys did an amazing job!

I have been intending to buy this book for over 3 months now. I finally got around to it today. The coding conventions won me over in the first 5 minutes.

Isn't the more interesting aspect of HN how it scales? Simply writing a few models, views and templates is certainly a nice exercise but only a first step.

Not to mention getting the audience, but that's not really a technical problem.

I think this is more of a Django tutorial than anything.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact