HN user

AlSweigart

376 karma
Posts23
Comments46
View on HN
inventwithpython.com 8mo ago

Show HN: Tsofa – The Simple, Offline Flashcard App

AlSweigart
2pts0
alpha-omega.dev 8mo ago

"Slippery Zips and Sticky Tar-Pits" from Python's Security Dev Seth Larson [pdf]

AlSweigart
2pts1
www.theregister.com 8mo ago

Python Foundation goes ride or DEI, rejects strings-attached government grant

AlSweigart
10pts1
inventwithpython.com 9mo ago

Python Violates PEP 8

AlSweigart
2pts0
inventwithpython.com 1y ago

Recursive Functions to Piss Off Your CS Professor

AlSweigart
3pts0
inventwithpython.com 1y ago

Lost Chapter of Automate the Boring Stuff: Audio, Video, and Webcams in Python

AlSweigart
217pts23
www.youtube.com 2y ago

Scrolling ASCII Art Music Video

AlSweigart
2pts1
michaelbrooks.co.uk 9y ago

Save time switching branches with this Git trick

AlSweigart
2pts0
flexport.engineering 9y ago

Optimizing React Rendering

AlSweigart
3pts0
opensource.com 10y ago

APIs, not apps: What the future will be like when everyone can code

AlSweigart
3pts0
opensource.com 11y ago

6 Kinds of Tasks That Programming Can Automate

AlSweigart
2pts0
www.youtube.com 11y ago

First 3 online video tutorials for “Automate the Boring Stuff with Python”

AlSweigart
2pts0
automatetheboringstuff.com 11y ago

Free Python Book for Office Workers: Automate the Boring Stuff with Python

AlSweigart
3pts2
inventwithpython.com 11y ago

Programming a Bot to Play the “Sushi Go Round” Flash Game

AlSweigart
2pts0
inventwithpython.com 11y ago

Making a Text Adventure Game with the Cmd and Textwrap Python Modules

AlSweigart
8pts0
inventwithpython.com 11y ago

Free Python Books

AlSweigart
123pts19
inventwithpython.com 11y ago

Why Is Object-Oriented Programming Useful? With a Role-Playing Game Example

AlSweigart
75pts85
inventwithpython.com 13y ago

Multithreaded Python Tutorial with the “Threadworms” Demo

AlSweigart
3pts0
inventwithpython.com 13y ago

New book "Hacking Secret Ciphers with Python" released. Free to download.

AlSweigart
6pts2
inventwithpython.com 13y ago

Why I Recommend Against Hackety Hack

AlSweigart
46pts39
inventwithpython.com 13y ago

8-bit NES Legend of Zelda Map Data

AlSweigart
13pts0
inventwithpython.com 13y ago

"How Does Compression Work?"

AlSweigart
3pts0
inventwithpython.com 14y ago

A Modest Proposal: Please Don’t Learn to Code...

AlSweigart
3pts0

The Python Software Foundation Security Developer-in-Residence, Seth Larson, published a new white paper with Alpha-Omega titled "Slippery ZIPs and Sticky tar-pits: Security & Archives" about work to remediate 10 vulnerabilities affecting common archive format implementations such as ZIP and tar for critical Python projects.

PDF link: https://alpha-omega.dev/wp-content/uploads/sites/22/2025/10/...

PSF Blog: https://pyfound.blogspot.com/2025/10/slippery-zips-and-stick...

Alpha-Omega.dev: https://alpha-omega.dev/blog/slippery-zips-and-sticky-tar-pi...

If we accepted and spent the money despite this term, there was a very real risk that the money could be clawed back later. That represents an existential risk for the foundation since we would have already spent the money!

I was one of the board members who voted to reject this funding - a unanimous but tough decision. I’m proud to serve on a board that can make difficult decisions like this.

Kudos to Simon and the rest of the board. Accepting that money would be more than a strategic mistake, it'd be an existential danger to the PSF itself.

I mean, it's also just the plain common sense move: accepting that money would just be putting a noose around their neck and handing the other end to the Trump administration. (And there is a 100.0% chance they'll just claw it back eventually anyway.)

It's a shame that months of NSF grant-writing work was completely wasted though.

LLMs are really not good at following specific processes like math. They operate off vibes.

Ask Claude to multiply two ten-digit numbers. It gets the first one or two digits correct, and then makes up the rest.

ChatGPT used to have the same problem, but now it writes a program to perform the math for it.

Page count. Automate the Boring Stuff with Python is supposed to be a beginner book for people with no coding experience, but it's almost 600 pages. The biggest hurdle to coding isn't being "smart" enough, but rather getting over the intimidation factor.

The editor recommended we cut this chapter. It made me realize that even though I work with multimedia stuff all the time, this isn't really something most office workers do (at least, not at the scale where you'd want to write Python scripts).

A lot of teaching people to code is hiding details so you don't fire hose them with information they don't need yet. So many software nerds don't get this, and they're excited about all these cool advanced techniques without realizing that beginners don't need to know about recursion or operator overloading. (I completely skip OOP in the book.)

I'm guessing that the text interface is nicer if your use case is reading mostly text-based emails from newsletters or forums. But yeah, for general email use I don't see this as a plus unless you really like TUIs.

"Scroll art" is procedural generated ASCII art that fills the terminal and causes the text to move up, producing an animated effect. Once text is printed, it can't be erased. The window can only scroll up. I made these as a series of programming projects for beginners that can be done in any language and doesn't require installing additional libraries. You only need print and loops and random numbers. A collection of scroll art is online at [https://scrollart.org](https://scrollart.org)

It's funny that this got posted right now. I'm working on exactly this project. You can find a collection of text-based Python programs written in the style of the games in Basic Computer Games here: https://github.com/asweigart/gamesbyexample and installable through `pip install gamesbyexample` More info here: https://pypi.org/project/gamesbyexample/

Hi, I'm Al Sweigart. I wrote Automate the Boring Stuff with Python. My next book (working title The Big Book of Small Python Projects) is exactly what Jeff talks about in the article. I started on this three years ago, and the style of the programs are 1) short (under 256 lines, as an arbitrary limit) 2) text only (so that readers can link cause-effect between the print() calls and the text that appears on the screen 3) requires no additional libraries outside the standard library 4) fits in one source code file for easy copy-pasting, along with some other guidelines.

My main fear is that I'm just old, and I'm mistaking the nostalgia of how I learned to program for good pedagogy in modern times (this is a mistake the One Laptop Per Child project made). But I figure this might be a good start for beginners who want to see what programs "look like". I already have JavaScript, Java, C#, Kotlin, and Go versions also planned. The books, like all of mine, will be released under Creative Commons licenses. The first book should be out in a few months.

Teaching. All education politics aside, in my experience teaching is hard because you have to juggle and be responsive to so many people at the same time. Teaching is hard to scale. Everyone complains that schools are so regimented and conformist, but when YOU are the one in front of a group of two dozen (or three dozen!) kids who don't want to be there and are distracted by everything and you only have 90 minutes to get them through a lesson, you realize how hard it is to convey information.

Especially since in every class there will be one or two kids who take up like 40% of your energy, and you end up completely ignoring self-disciplined kids.

If there was a way we could provide automated teaching, that would be huge. And I mean teaching, not just making resources available. Stack Overflow and Wikipedia and Khan Academy are great, but they won't replace schools and teachers. An AI system that could motivate, answer questions, pose questions, encourage learning without judging failure, etc. would be wonderful.

Those who have worked with Jake won't be surprised at all by this. These are accusations coming from multiple people in the tech/privacy/infosec crowd, not from the government.

For those thinking these are government-sponsored lies, do you think [Meredith Patterson](https://twitter.com/maradydd) of [Status 451 Blog](https://status451.com/) is working with the government?

https://twitter.com/maradydd/status/738801590333624320

[blog.torproject.org/blog/jacob-appelbaum-leaves-tor-project …](https://blog.torproject.org/blog/jacob-appelbaum-leaves-tor-...) is a gross disservice to the Tor community. People deserve to know why Tor evicted its resident sociopath.

https://twitter.com/maradydd/status/738802325565755392

Tor had the chance to nip this in the bud back when Jake was just a plagiarist. They ignored it, and he graduated to sexual assault.

https://twitter.com/maradydd/status/738802983173922817

.@mmeijeri Jake finally raped enough people that Tor as an organisation couldn't ignore it anymore.

I worked around Jake around 2009ish in the early years of the Noisebridge hackerspace in San Francisco. I've seen his charismatic pushiness routine that he uses to get what he wants. I joked that if you ever wanted to find him in a group photo, just look front and center. As time went on, I did hear more uneasy things about him. His name came up with a person I met at PyCon last year in Montreal, who then relayed a story that didn't go as far as sexual assault, but was very troubling. He's one of those people that you step aside and warn your friends about. Keep an eye on your intoxicated friends when he's around.

The stories I read on http://jacobappelbaum.net/ fit exactly with the Jake that I knew. He is focused on his own wants and laughs off people's boundaries. Reading the stories on that site doesn't make me think of an elaborate conspiracy to discredit him but of how Cosby was able to get away with his crimes for years.

Before people start saying I'm a shill: I don't have any connection to the http://jacobappelbaum.net/ nor do I know the people who made it (or, at least, I don't know if any people I know made it). [I wrote a book on cryptography, and 100% of the proceeds go to the Tor Project, the EFF and Creative Commons.](http://inventwithpython.com/hacking/proceeds)

We're looking at it from modern eyes though. Compare BASIC to the other programming languages of the 70s and 80s: https://en.wikipedia.org/wiki/History_of_programming_languag...

* Pascal * Prolog * C/C++ * Ada * MATLAB * Eiffel * Erlang * Perl * Tcl

If I were a beginner, I'd take BASIC over most of those. BASIC does have warts and having it ubiquitous did help its adoption, but the language itself was "easy to use" for its day. (Perl is pretty good, but BASIC had a two decade head start on it.)

Author here. I guess so, but there are plenty of software companies with products to "increase office productivity".

But at the same time, there are a lot of times where you need a very specific, one-off, 30 line script to do something for your particular job/company. This is where knowing a general (and easy to use) programming language like Python comes in handy.

Hence why I wanted to write a programming book for office workers who wanted to skip the computer sciencey and software engineering aspects. Who cares if a throwaway script is O(N^3) if N is going to be a few hundred? Most of the time these things don't matter, because it's still faster than doing this stuff by hand.

Author here. I'm hoping the back cover material will work, and the opening story in the first chapter is catchy enough:

“You’ve just done in two hours what it takes the three of us two days to do.” My college roommate was working at a retail electronics store in the early 2000s. Occasionally, the store would receive a spreadsheet of thousands of product prices from its competitor. A team of three employees would print the spreadsheet onto a thick stack of paper and split it among themselves. For each product price, they would look up their store’s price and note all the products that their competitors sold for less. It usually took a couple of days.

“You know, I could write a program to do that if you have the original file for the printouts,” my roommate told them, when he saw them sitting on the floor with papers scattered and stacked around them.

After a couple of hours, he had a short program that read a competitor’s price from a file, found the product in the store’s database, and noted whether the competitor was cheaper. He was still new to programming, and he spent most of his time looking up documentation in a programming book. The actual program took only a few seconds to run. My roommate and his co-workers took an extra-long lunch that day.

You... probably aren't the book's intended audience. :)

But seriously, Python makes easy things easy. In bash, just to extract a substring you need to do something like echo someletters_12345_moreleters.ext | cut -d'_' -f 2 That's not very beginner-friendly.

Author here. Yes, I can confirm that if you order the ebook now you will get the full ebook. The physical books have also been printed, so they'll probably get shipped before the 25th (don't quote me on that).

Yeah, I've always been of the mindset that until your programs get over 1000 lines of code, you probably don't need OOP.

Thanks for the pip3 tip, I'll post it on the website as I get content up.

Hi, author here. The HTML version of the full book content will be up in a few days. (I'm formatting it right now.)

Meanwhile, you can use PYBUTLER for a 30% discount on the book/ebook, and I'm offering a 70% discount on my other books: http://inventwithpython.com/blog/2015/04/21/celebrating-the-...

Basically, it's a book for complete beginners who don't necessarily want to be software devs but do want to automate parts of their office job. Part 1 is a bare bones Python tutorial (I skip OOP entirely) and Part 2 covers practical stuff: moving/renaming/copying files, updating Excel spreadsheets, parsing PDFs and Word docs, web scrapping, GUI automation.