Recursive Functions To Piss Off Your CS Professor
Posted by Al Sweigart in misc
Here are some recursive functions that are technically correct and technically recursive.
Posted by Al Sweigart in misc
Here are some recursive functions that are technically correct and technically recursive.
Posted by Al Sweigart in misc
The third edition of Automate the Boring Stuff with Python is now available for purchase or to read for free online. It has updated content and several new chapters, but one chapter that was left on the cutting room floor was "Working with Audio, Video, and Webcams". I present the 26-page rough draft chapter in this blog, where you can learn how to write Python code that records and plays multimedia content.
Posted by Al Sweigart in misc
TurtleSC provides a mini-language of shortcut instructions to carry out turtle.py function calls, like 'f 100'
instead of forward(100)
. Git Repo, PyPI Project Page.
Posted by Al Sweigart in misc
This article and its content were written, reviewed, and verified by a human, Al Sweigart. In my research I found that most "GitHub vs GitLab" articles are AI slop containing false or outdated information. I wrote this article with links to actual documentation pages, and not just copying what every other article on this topic says. For those who have heard of this "Git stuff," here's a summary of the differences and details. My hot take: For the needs of most individual or small group users, they're basically the same. GitLab seems to be more oriented towards self-hosting and custom configuration. Wikipedia has an extensive comparison list of source code repo hosting servers.
Posted by Al Sweigart in misc
Posted by Al Sweigart in misc
At PyCon 2025, I handed out a pocket-sized zine that lets you play a procedurally generated choose-your-own-adventure version of tic-tac-toe. The zine itself is available as a PDF for viewing on your computer and a PDF for double-sided printing. Here's how I made it using Python.
Posted by Al Sweigart in misc
Part 5 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, we'll learn how to change the size of shapes by scaling them with the scale() method. We'll also get some more practice drawing in general. We'll draw this forest:
Posted by Al Sweigart in misc
Part 5 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we learn about grouping, cloning, and rotating shapes.
Posted by Al Sweigart in misc
Part 4 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we learn about drawing with paths.round color of a canvas as well as the shapes fabric.Polygon
and fabric.Line
.
Posted by Al Sweigart in misc
Part 3 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we learn how to set the background color of a canvas as well as the shapes fabric.Polygon
and fabric.Line
.