Tue 30 September 2025

Python Violates PEP 8

Posted by Al Sweigart in misc   

Sweigart's Law of PEP 8 Complaints is: "Any time someone complains about source code violating PEP 8, they are always complaining that the source code uses camelCase instead of snake_case. The complaint is never about any other part of PEP 8." What is the point of Python Enhancement Proposal document number 8, and how does it get used and misused? Why do we write code the way we do, and how meaningful are conversations about code style and readability?

Read more...


Mon 29 September 2025

Scroll Art Python Package

Posted by Al Sweigart in misc   

Scroll art is moving ASCII art produced by stdout text printed from a loop, animated as the text scrolls up the terminal. It's especially useful as creating computing projects for beginner programmers. Because it only uses text, no environment setup or additional libraries are needed and scroll art can be made in every programming language. I've published examples of scroll art on https://scrollart.org, but now I've also included Python implementations in the scrollart package, which you can install by running pip install scrollart and view with python -m scrollart --help.

Read more...


Fri 26 September 2025

Rock Paper Scissors Arena Simulation

Posted by Al Sweigart in misc   

As part of an AI-generated code experiment, I had ChatGPT 5 create a Rock Paper Scissors "arena simulator" where different emojis play a game of tag. Emoji converts the "prey" emoji that they catch. This idea follows the tradition of "spatial rock paper scissors" simulations, such as this Julia-language "agents" framework example. I did multiple attempts, but you can view one chat log here.. You can download the rpsarena package from PyPI and see the source code in its git repo. The rpsarena package uses tkinter and has no dependencies outside of the Python standard library. After installing, run python -m rpsarena --help to view instructions on how to set up a game.

Read more...


Mon 22 September 2025

Fractal Art Maker for Python Turtle.py

Posted by Al Sweigart in misc   

Fractals are beautiful, self-similar patterns that can be created by a computer from very simple rules. My Fractal Art Maker package makes it easy to use Python's turtle.py package to draw your own. You don't need to know recursion, but you can read my free book, The Recursive Book of Recursion if you're curious. If you want to learn how to draw pictures with Python code, I also have The Simple Turtle Tutorial.

Read more...


Thu 18 September 2025

Turtle Colors and RGB App

Posted by Al Sweigart in misc   

I've been working on turtle-related projects and I needed a simple, interactive, single-file Python program to explain RGB color values. I wrote this one up as part of my work writing a Simple Turtle Tutorial written in Wikipedia-style Simple English so it can be translated to non-English languages. You can download the app from PyPI and look at its code on its git repo

Read more...


Wed 17 September 2025

Automate the Boring Stuff Workbook Now Available for Preorder

Posted by Al Sweigart in misc   

"This workbook transforms Al Sweigart’s best-selling guide from a reading experience into a coding experience. Following Automate the Boring Stuff with Python chapter by chapter, this workbook will help you turn concepts into muscle memory through carefully designed exercises, projects, and real Python scripts."
Thumbnail cover of Automate the Boring Stuff with Python Workbook
Preorder links: Direct From the Publisher (preferred) | Amazon | Barnes and Noble | Bookshop.org | Powell's | Kobo | Thriftbooks | Goodreads

Read more...



Mon 15 September 2025

List of 87 Programming Ideas for Beginners

Posted by Al Sweigart in misc   

After you've learned the basic concepts, the best way to improve your coding skills is to work on projects. You may not know enough to contribute to popular open source projects, but you can create small programs on your own. Here's a list of 81 projects suitable for beginners. They're short, can be done in any language, and don't require additional software library installation. These projects are drawn from my free books, The Big Book of Small Python Projects, Cracking Codes with Python, and Invent Your Own Computer Games with Python. Each program has a link to a sample Python implementation, but I encourage you to make it from scratch.

Read more...