Better HN
topnewbestaskshowjobs
Log inSign up

AlSweigart

376 karma · joined Nov 9, 2009 (17y ago) · 71 submissions

Submissions

1.

Show HN: Tsofa – The Simple, Offline Flashcard App(inventwithpython.com ↗)

2 points · by AlSweigart · 1y ago · discuss

comment 1y ago · link · parent

> Applying to Zapier? Here's why you might meet an AI recruiter

Because it's cheaper for Zapier.

comment 1y ago · link · parent

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...

4.

"Slippery Zips and Sticky Tar-Pits" from Python's Security Dev Seth Larson [pdf](alpha-omega.dev ↗)

2 points · by AlSweigart · 1y ago · 1 comment

comment 1y ago · link · parent

This is why most organizations take a blind eye when popular people in their community behave badly; if they even so much as give them a three-month ban from the forum, people will keep bringing it up years later.

comment 1y ago · link · parent

> 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.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

Who, in 2025, is still giving the Trump administration the benefit of the doubt when it comes to the rule of law?

9.

Python Foundation goes ride or DEI, rejects strings-attached government grant(theregister.com ↗)

10 points · by AlSweigart · 1y ago · 1 comment

comment 1y ago · link · parent

Agreed. And it is... quite revealing that many people in these comments are so insistent to view the text in isolation.

comment 1y ago · link · parent

I am going add more on top of that: we should automatically assume bad faith of anyone still willing, in 2025, to give the Trump administration the benefit of the doubt.

12.

Python Violates PEP 8(inventwithpython.com ↗)

2 points · by AlSweigart · 1y ago · discuss

comment 1y ago · link · parent

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.

14.

Recursive Functions to Piss Off Your CS Professor(inventwithpython.com ↗)

3 points · by AlSweigart · 1y ago · discuss

comment 1y ago · link · parent

I know I've been saying this for years, but I seriously will get around to updating the videos in the Udemy course this year.

comment 1y ago · link · parent

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.)

comment 1y ago · link · parent

Hello, this is Al. Ha ha, I'm always surprised when people spot my name in supporter credits. Here's a (very out of date) web page of other folks I support: https://alsweigart.com/patreon.html

comment 1y ago · link · parent

Oh, thanks for pointing this out. This was an early unpublished draft. I later changed to `playsound3` which is a modern fork of `playsound`. I've updated the web page.

19.

Lost Chapter of Automate the Boring Stuff: Audio, Video, and Webcams in Python(inventwithpython.com ↗)

217 points · by AlSweigart · 1y ago · 23 comments

comment 1y ago · link · parent

The primary use case of LLMs is producing undetectable spam.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

"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)

23.

Scrolling ASCII Art Music Video(youtube.com ↗)

2 points · by AlSweigart · 2y ago · 1 comment

comment 5y ago · link · parent

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.

comment 8y ago · link · parent

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.

26.

Save time switching branches with this Git trick(michaelbrooks.co.uk ↗)

2 points · by AlSweigart · 9y ago · discuss

27.

Optimizing React Rendering(flexport.engineering ↗)

3 points · by AlSweigart · 9y ago · discuss

comment 10y ago · link · parent

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)

123