Fabric.js Tutorial Part 6
Sat 04 May 2024 Al Sweigart
Part 6 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we get more practice by drawing a forest.
Writings from the author of Automate the Boring Stuff.
Sat 04 May 2024 Al Sweigart
Part 6 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we get more practice by drawing a forest.
Sat 04 May 2024 Al Sweigart
Part 5 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we learn about grouping, cloning, and rotating shapes.
Sat 04 May 2024 Al Sweigart
Part 4 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we learn about drawing with paths.
Sat 04 May 2024 Al Sweigart
Part 3 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we learn about Line shapes and drawing a house.
Sat 04 May 2024 Al Sweigart
Part 2 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we learn about Polyline shapes and styling shapes by drawing a gingerbread figure.
Sat 04 May 2024 Al Sweigart
Part 1 of a tutorial series on the Fabric.js canvas/graphics library for JavaScript, where we learn about drawing basic shapes.
Tue 20 February 2024 Al Sweigart
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.
Mon 15 January 2024 Al Sweigart
4 stars. I came across Selçuk Artut’s Geometric Patterns with Creative Coding while researching several topics on computer-generated art for beginners. I admit, the single 1-star review for this book annoyed me enough to read and review. I’ve come away believing that this book certainly deserves wider and better attention than that.
Thu 09 November 2023 Al Sweigart
Here are all the new additions and updates in the third edition.
Thu 15 June 2023 Al Sweigart
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.
Tue 28 March 2023 Al Sweigart
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.
Tue 28 March 2023 Al Sweigart
5 stars. Python in a Nutshell is an excellent book for professional developers who have some experience with Python but want to take the leap to being a senior Python developer, Python in a Nutshell is required reading.
Fri 27 January 2023 Al Sweigart
Sun 20 November 2022 Al Sweigart
If you are an instructor leading a Python programming workshop, getting third-party PyPI packages installed on students' machines with pip has several hurdles: navigating the command-line, operating system differences, distinguishing between pip
and pip3
, dealing with multiple versions of Python, misconfigured PATH environment variables, and virtual environments are all possible pitfalls.
You can avoid all of this and save time by using pipfromrepl, which allows you to install PyPI packages from the interactive shell. These same steps work no matter what the computer's Python setup is.
Sat 19 November 2022 Al Sweigart
As you can tell from the lengthy title, there are many linting tools for Python. Some of them have near-identical names as each other. In November 2022, I upgraded my text editor to Sublime Text 4 and then took the opportunity to spend a few hours reviewing all of the Python linters I could find. After personally reviewing all of them, I've selected the following as must-haves: Pyflakes, Mypy, and Black. If you'd like additional tools, I also liked: Radon, Pyroma, and docformatter. I'm using Python 3.12.0. I don't care for my linter to point out when I stray from the certain dictates in the PEP 8 document, and my linter choices reflect that. You might have different needs and values than I, so in this blog post I give my reasoning and views for each linter.
Tue 15 November 2022 Al Sweigart
I like to program computers. An army of a million file clerks wouldn't be as productive as my laptop running the right code. And my house only has one bathroom so the line would be quite long too...
Mon 31 October 2022 Al Sweigart
JavaScript is not the only programming language you can run in the browser. Brython is a Python interpreter implemented in JavaScript so you can run Python code in your browser. This lets you have a Python interactive shell without having to install Python. You can also write Python code to interact with the DOM and create browser apps just like you could with JavaScript. The primary downside is that a browser must download about 6 megabytes of JavaScript files before it can run, which can be a significant delay. This blog post guides you through setting up Brython.
Sun 30 October 2022 Al Sweigart
Installing Python is easy, but maybe you're on a smartphone/tablet, are on a library computer that doesn't let you install software, or can't install Python for some other reason. This article has a list of 10 free Python interpreters and interactive shells (also called REPLs) that you can access from a web browser.
Sat 29 October 2022 Al Sweigart
Programming and hacking in movies often involves streams of ones and zeros flowing across the screen. This looks mysterious and impressive, but what do these ones and zeros actually mean? You're probably aware that binary numbers (numbers written using only the two digits, zero and one) have something to do with computers but don't know why.
Mon 10 October 2022 Al Sweigart