Sat 04 May 2024

Fabric.js Tutorial Part 4

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.

Read more...


Sat 04 May 2024

Fabric.js Tutorial Part 3

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.

Read more...




Tue 20 February 2024

Make Lively Movement Animation with PyTweening's Tweening Functions

Posted by Al Sweigart in misc   

Tweening functions allow you to easily add many different styles of natural-seeming movement to the graphics in your program. In this blog post, you'll learn about how tweening functions can make more lively movement animations using Pygame and the PyTweening third-party library. Tweening functions apply to any programming language, but this tutorial has actual Python code for you to run and experiment with. Start by installing these libraries by running pip install pygame and pip install pytweening from the terminal. Then follow along with the code examples.

Read more...




Thu 15 June 2023

Using ChatGPT-4 to Review My Recursion Programming Book

Posted by Al Sweigart in misc   

My 2022 book, The Recursive Book of Recursion (read online for free, buy direct from the publisher) covers recursive algorithms, a notoriously tricky subject for programmers and computer science students. I feel like I did a good job writing it (and my editors at No Starch Press did an incredible job editing it), but I wondered how well Large Language Models (LLMs) like ChatGPT could understand it. I ran the entire book through to see what mistakes or changes ChatGPT would make. The results were disappointing in some places but pleasantly surprising in others, so I wrote this blog post about the role AI could play in editing technical books.

Read more...


Tue 28 March 2023

Book Review: Python Distilled

Posted by Al Sweigart in misc   

5 stars. Python Distilled has a perfectly suited title: This book is for experienced programmers who want to learn Python and need the Python programming language's core syntax, standard library, and Pythonic idioms. However, if you're a developer who wants to add Python to your toolbox, I recommend Python Distilled as one of the first books you should read.

Read more...