Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Al Sweigart

    inventwithpython.com · Personal blog · on HN since 2009

    Al Sweigart writes free books and tutorials teaching Python through games, ciphers, and practical projects for beginners.

    Visit blogRSSHN submissions
    ProgrammingGames
    What HN says

    Commenters recommend his books for beginners who want to learn by building things rather than through academic study, especially for game programming.

    Stats for nerds
    100HN people shared it
    74linked in comments
    1.7Kstory points
    Jan 2023last shared
    2009people per year2023

    Top posts on HN

    1. 1
      Nobody Wants to Learn How to Program
      1 person · 316 points · first shared 2012 · 106 comments on HN
    2. 2
      Lost Chapter of Automate the Boring Stuff: Audio, Video, and Webcams in Python
      1 person · 217 points · first shared 2025 · 23 comments on HN
    3. 3
      Ideas for Game Clones to Code (2012)
      3 people · 163 points · first shared 2012 · 49 comments on HN
    4. 4
      Invent Your Own Computer Games with Python (Free e-Book)
      34 people · 129 points · first shared 2009 · 22 comments on HN
    5. 5
      Free Python Books
      1 person · 123 points · first shared 2014 · 19 comments on HN
    6. 6
      A 5 Minute Quickstart Guide to Python’s logging Module
      1 person · 113 points · first shared 2012 · 25 comments on HN
    7. 7
      Learn Python by writing games (free book)
      6 people · 85 points · first shared 2009 · 10 comments on HN
    8. 8
      The Recursive Book of Recursion
      1 person · 79 points · first shared 2025 · 52 comments on HN
    9. 9
      Why Is Object-Oriented Programming Useful? With a Role-Playing Game Example
      2 people · 75 points · first shared 2014 · 85 comments on HN
    10. 10
      Python IDLE Reimagined
      1 person · 66 points · first shared 2014 · 29 comments on HN

    What HN people wrote when they linked it

    • sixtofourMay 2011

      My kid is 13.

      He didn't ask to learn, I suggested it as a possible activity. I stressed that he doesn't have to want to. We'll know whether he's trying to please his old man or not after awhile. So far he's liked the new and foreign concepts.

      We did a little bit last summer. Based on that experience I'm changing it up a little, in part by teaching a little more about surrounding concepts like the shell, and what processes are. This video came around at exactly the right time.

      I showed him how to set up VirtualBox, create and destroy a VM, take snapshots and why you'd want to, how to install Linux on the box, and the basics of navigating the shell and running programs.

      He's learning Python, with Vim and the Python REPL. Last summer I started him on Python 3.0, but this year I've had misgivings about that and he's doing 2.7, because if he does remain interested then any framework or other tool he's likely to use next will be pre-3.0-based.

      He's admin on his own VM, because I want him to learn "Dad, how do I do this?" and then do it for himself, rather than "Dad, it says it needs your password again."

      Last year we focused on Invent Your Own Computer Games With Python, http://inventwithpython.com/. It's a fine tutorial, and he/we got through as far as the hangman game. This summer I want to take a more broad perspective, so we'll probably work a little more holistically, sometimes focusing on the little things we're doing to get something working. Like, what is this shell…

    • iamwilJan 2010

      I recently had a kid that wanted to program as well. He's about 12. Wanted to program games, but didn't get very far in a directX book.

      I had a couple choices for him, due to some requirements:
      1) Something easy to install or didn't have lots of things to install
      2) Something with a all-in-one gaming library
      3) Something with some sort of community around it.
      4) It'd be nice if there was a book for it.

      So with those there, there was:
      Ruby and HacketyHack. http://hacketyhack.heroku.com/ It also has a app framework called shoes that you can use to build both games and apps. However, since _why left, all this requires a lot of hand hold to set up.

      Lua and Love. http://love2d.org/
      Lua is an easy language to pick up as it's pretty minimal, and love's 2D engine is pretty fantastic. I've used it before and it's pretty easy to get started with, and plenty of examples, as well as a vibrant community.

      Python and Pygame. http://www.pygame.org/news.html
      Pygame has all of the above, and for me, the final winner, since there was a book that walks the kid along from basic text games to the graphics part. http://inventwithpython.com/

    • joagOct 2010

      I'm trying to learn python and I picked learn python the hard way by Zed Shaw, I don't have a programming background I'm more like a sys-admin combined with a degree in Electrical - Electronic Engineer and the book is really good.

      I was able to follow the book very well until I got into chapter 23 "Read Some Code", I thought it was a good idea to learn the lansom code as he created it but as I'm learning python and at the same time learning to program the concepts of packages and API's all combined together just didn't help me, so I started reading code from http://inventwithpython.com/, chapter 9 specifically where the real code start to show up; the code in the book is just one file so you can leave packages and API's until you get more background.

      I providing my personal experience because I'm sure that even HN is a site for programmers there is a fair amount of guys here like me just starting in the world of programming and this can help them a bit.

      BTW, if some one drops the offer I'll willing to take his place because I really want to learn python + django.

    • alan_pMar 2010

      Python comes with a turtle module, which means you can do all the neat drawing stuff you could do in Logo back in the days.

      Also Python's interactive console provides two helpful functions: help and dir, which let you stay in the console even when you have to look up documentation, check properties of an object or find what else is contained in an imported module. There are other shells for Python that provide other functionality like saving your session's input in a file so you can actually write entire programs in Python for later use.

      Also there's http://www.inventwithpython.com/, which is aimed at children and lets them create simple games to see results early on.

      My first programming language was PHP at age 15, so I never had to make the jump from BASIC, but I've seen people stick with BASIC way past its expiry date just because they were used to it, becoming increasingly frustrated with its limitations. I think Python has the advantage that you don't easily hit a wall like that because you are writing in a "real" programming language from the get-go.

    • dutchrapleyOct 2016

      If you have absolutely no experience programming, start with Python. There are three things to learn when programming: 1) language syntax, 2) concepts (conditionals, logic gates, loops, etc.), and 3) how to solve problems.

      What makes python a good choice is that you don't have to spend too much overhead learning language syntax in order to implement concepts, and you'll easily be able to keep the learning of those two items separate.

      Once you have a strong foundation in concepts, you can much more easily pick up a different language. The biggest downfall there is that if you decide to later learn Ruby or JavaScript, you might approach a solution as, "This is how I would do it in Python." Don't fall into that trap. Learn the features each language provides and how to use them.

      Since you mentioned games, there's a couple of books on the topic that are free: http://inventwithpython.com/

    • avinasshMay 2015

      This repo maintains list of free programming books [0].

      Many of the books at Green Tea Press[1] are available for free:

      - Think Python: How To Think Like a Computer Scientist

      - Think Bayes: Bayesian Statistics in Python

      - Think Complexity: Exploring Complexity Science with Python

      - Think Stats: Probability and Statistics for Programmers

      - The Little Book of Semaphores

      - Physical Modeling in MATLAB

      - Learning Perl the Hard Way

      few others. Do check the site.

      Secondly, books by Al Sweigart[2] are also freely available. They include:

      - Automate the Boring Stuff with Python[3]

      - Hacking Secret Ciphers with Python

      - Invent Your Own Computer Games with Python

      - Making Games with Python & Pygame

      [0] - https://github.com/vhf/free-programming-books

      [1] - http://www.greenteapress.com/

      [2] - https://inventwithpython.com/

      [3] - https://automatetheboringstuff.com/

    Related

    David Beazleydabeaz.com162 people

    (Python) Generator Tricks For Systems Programmer (pdf)

    David Beazley
    Personal · last shared 2026
    Jesse Nollerjessenoller.com50 people

    A lot happens

    Jesse Noller
    Personal · last shared 2020
    Zed Shawzedshaw.com280 people

    Dear Paul

    Zed Shaw
    Personal · last shared 2026
    Ian Bickingblog.ianbicking.org107 people

    Firefox Was Always Enough

    Ian Bicking
    Personal · last shared 2026
    Not a Monad Tutorialnotamonadtutorial.com40 people

    Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM

    Not a Monad Tutorial
    Publication · last shared 2023
    Trey Hunnertreyhunner.com31 people

    Python built-ins worth learning

    Trey Hunner
    Personal · last shared 2026
    Miguel Grinbergblog.miguelgrinberg.com94 people

    Python 3.14 is here. How fast is it?

    Miguel Grinberg
    Personal · last shared 2026
    Python for Engineersnew.pythonforengineers.com16 people

    Web automation: Don't use Selenium, use Playwright

    Python for Engineers
    Personal · last shared 2024