Thu 09 April 2026

Just a Huge List of the Prime Numbers

Posted by Al Sweigart in misc   

Prime numbers are whole numbers greater than 1 that only have 1 and themselves as factors: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137 and so on. It's surprisingly hard to find a just a huge list on the internet of them (even Wikipedia only lists the first thousand), so I made this page. To save on bandwidth, this page uses JavaScript code to generate them in batches of 100,000 prime numbers at a time. Click the Generate 100,000 More Primes button at the bottom to continue the list of primes.

Read more...


Thu 09 April 2026

Can Large Language Models Understand Caesar Cipher? (April 2026)

Posted by Al Sweigart in misc   

Yes, even the "instant" or non-deep thinking models can understand Caesar Cipher text. As a quick test, I presented several different LLMs with the following (encrypted with key 13): PNA LBH HAQREFGNAQ GUVF GRKG? VS FB, PNYY ZR OL ANZR: PUEVFGBCURE ...which, when shifted back 13 spaces in the alphabet, is the original plaintext: CAN YOU UNDERSTAND THIS TEXT? IF SO, CALL ME BY NAME: CHRISTOPHER

Read more...


Wed 08 April 2026

Nested Loops Visualization Tool

Posted by Al Sweigart in misc   

Nested loops are a concept that beginner programmers sometimes have trouble with, so I created a nested loop visualization tool using Claude Opus 4.6 to demonstrate the behavior of nested loops using a clock interface. The loops are represented by clock hands and just as a seconds clock hand must make a full loop before the minutes hand increments by one, the innermost loops must complete a full loop to increment the outer loops.

Read more...


Wed 18 March 2026

Al Sweigart's Quickstart uv Tutorial

Posted by Al Sweigart in misc   

uv (written in lowercase even if it begins a sentence) is a Python package and project manager that has seen rapid popular adoption by the Python community. This is not a full tutorial nor necessarily a good tutorial for you (the uv documentation is great for that) but it's mainly a writing exercise for myself to think about the parts of uv that I use. It's a quickstart, with just the commands I used on my macbook to use it with terse notes that make sense to me. If a sentence exists in this tutorial, it's something I feel I should memorize like a flashcard. As such, it often lacks context or supporting details.

Read more...


Mon 16 March 2026

François Morellet Generator (JavaScript)

Posted by Al Sweigart in misc   

In the New York Museum of Modern Art, there's a piece by Francois Morellet titled Random Distribution of 40,000 Squares Using the Odd and Even Numbers of a Telephone Directory. It's a 200 by 200 grid, and Morellet would have his wife or one of his sons read out numbers from the phone book as a source of random odd and even numbers, and he'd mark the grid so that he could later paint them red or blue. This was 1960, so he had to do it manually. (I always thought it odd that his wife and sons aren't included in the credits.) Here in the 21st century, I knocked out a Morellet Python package in 15 minutes to generate them in milliseconds. But I wanted a more accessible version, so using Claude Opus 4.6 I vibe coded a JavaScript version with a few more features.

Read more...


Fri 13 February 2026

List of Free LLM AIs for Coding (February 2026)

Posted by Al Sweigart in misc   

Large language models (LLMs), the generative AIs that respond to text-based questions, can be a useful resource for learning to program. This blog post is a simple list of LLM services that are free, do not require a credit card to use, and have a web interface. I'll update this blog post from time to time. Assume that free services may have daily usage limits, and that sites that don't require registration may limit how much you can use them before signing up for a free account.

Read more...



Thu 15 January 2026

Clipboardle - A Copy/Paste Puzzle Game

Posted by Al Sweigart in misc   

An often ignored part of teaching people to code is also getting them comfortable with text editors. This is different from word processors; it's more than typing and more than learning keyboard shortcuts. One thing I found while live streaming code and narrating what I was doing was that I spent a lot of time moving text around: copy/paste, multiple cursors, using regular expressiosn with find-and-replace. These are skills that programmers kind of pick up over time, unless they stay permanently in a blind spot. So I made a silly little web game to practice these skills: Clipboardle.

Read more...


Wed 14 January 2026

Two Pieces of Bad Advice for Escaping Tutorial Hell

Posted by Al Sweigart in misc   

Tutorial hell is the frustrating cycle where people go through tutorial after tutorial, sampling different languages, tools, and frameworks, yet never feeling like they know how to write a program themselves. Programming never seems to click. This problem is made worse by AI-generated slop tutorials that copy the same vague, shallow text found in every other mediocre coding guide. Learners are left with what I call blank editor syndrome: the paralysis that occurs when you’re confronted with an empty file in a code editor and have no idea where to start. There are two pieces of advice commonly given to beginners: “Work on your own projects” and “Contribute to open source projects.” These aren’t bad pieces of advice, but they are certainly not without caveats. Here’s how to actually escape tutorial hell.

Read more...