The Watch and Code Blog       Subscribe       RSS

The Single Piece of JavaScript on Hacker News




This video was inspired by a tweet Sam Altman wrote last year.

Sam’s tweet caught my attention because it wasn’t obvious to me that Hacker News had any JavaScript at all. So of course, I wanted to figure out what it did and how it worked. I thought it would be weird and complicated, but it turned out to be quite the opposite. You’ll have to watch the video to see what I mean.

This was also inspired by my students — I just had a hunch that it would be a really cool example because a lot of them are startup people and Hacker News readers.

I spend a lot of time looking for and writing realistic code examples because I know it makes a huge difference for my students. As a kid, it was hard for me to stay motivated because the subjects I was learning didn’t seem very useful. Using unrealistic code (like most tutorials do today) creates the same problem that turned me away from school all those years ago.

As you’re watching, make sure to stay tuned till the end of the video because there’s a very special offer that lasts through the end of this month (March 2016). I got the idea for the offer from one of my favorite Paul Graham essays, Do Things that Don’t Scale. I’m guessing many of you have already read it. If not, set aside a few minutes to read it today.

If you liked this post, please help me out by sharing it on your social networks. And if you’re on Twitter, say hi! I’m @gordon_zhu.


If you want to learn how to build real software with JavaScript, you should sign up for Practical JavaScript.