Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Al Sweigart
Intriguing Stories in Computer Science
I am now... of a certain age... and there's a ton of anecdotes in the history of computer science and software development that I've heard, but I wondered if there's more. I had an LLM compiler a list (though I've carefully reviewed and fixed a bunch of the links). Many of these I had heard before but some were new to me. Click through them if you're interested. Most of the links go to Wikipedia; I've made sure the links at least don't go to slop content farm websites.
The Simplest MCP Example Possible in Python
A large language models is, at its core, a giant blob of many billions or trillions of floating point numbers which generate text following an initial prompt. By themselves, they don't have access to clocks, calendars, web browsers, calculators, or Python interpreters. MCP (Model Context Protocol) is a standard for giving LLMs access to tools like these.
Python Violates PEP 8
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 anyway?
Print Book (PREORDER) and EARLY ACCESS Ebook, $39.99 EARLY ACCESS Ebook, $31.99 Use coupon code PREORDER to get 25% off! Look Inside! Al Sweigart’s classic coding book Automate the Boring Stuff with Python, now in its third edition, has taught more than half a million readers how to dispense with tedious tasks using the Python programming language.
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.
What's New in the 3rd Edition of "Automate the Boring Stuff with Python"
The third edition of "Automate the Boring Stuff with Python" is almost out! You can preorder it on the No Starch Press website (use code PREORDER for 25% off), where buying the print book will get you DRM-free ebooks in PDF, epub, and Kindle formats for free. The estimated release is August 2024. A list of new things in the second edition is covered in this blog post. The third edition is has new chapters, programming projects, and revised editing.
Automate the Boring Stuff with Python, 3rd Edition
Practical Programming for Total Beginners Print Book and FREE Ebook, $59.99 EARLY ACCESS Ebook, $47.99 Look Inside! If you’ve ever spent hours renaming files or updating hundreds of spreadsheet cells, you know how tedious tasks like these can be. But what if you could have your computer do this work for you?
Using ChatGPT-4 to Review My Recursion Programming Book
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.
Python | No Starch Press
Python Programming for Hackers and Reverse Engineers April 2009 $39.95 Build Apps with Voice Control and Speech Recognition August 2021 $39.99 Write Concise, Eloquent Python Like a Professional April 2020 $39.95 A Hacker's Guide to Solving Problems with Code November 2020 $34.95 Black-Belt Advice on Deployment, Scalability, Testing, and More December 2018 $34.95
Python之Pyperclip模块 -- 复制粘贴神器
Pyperclip是一个控制剪贴板的工具。要使用Pyperclip,请在控制台输入以下指令: pip install pyperclip 当显示Successfully installed pyperclip时,说明安装成功了 可以在Python IDE中输入这行内容测试: import pyperclip 基本用法 Pyperclip的主要用法有两个: 1、复制内容到剪贴板 2、粘贴剪贴板里的内容 我们先来看第一个,复制内容 import pyperclip as pc pc.copy("Hello") 可以看到,剪贴板里多出了内容Hello 当然,也可以这么写 import pyperclip pyperclip.copy("Hello") Pyperclip也可以复制字符串变量 import pyperclip as pc text = "Hello,world" pc.copy(text) 来说说第二个功能,粘贴内容 import pyperclip as pc pc.copy("I love Programming") pc.paste() Pyperclip的源代码...
The Recursive Book of Recursion: Ace the Coding Interview with Python and JavaScript|Paperback
English 1718502028 An accessible yet rigorous crash course on recursive programming using Python and JavaScript examples. Recursion, and recursive algorithms, have a reputation for being intimidating. They're seen as an advanced computer science topic often brought up in coding interviews. Moreover, coders often perceive the use of a recursive algorithm as a sophisticated solution that only true programmers can produce. But there's nothing magical about recursion.
5 Free python eBooks for freshers to read before job interview
Career AdviceIshika Yadav | 27 Oct 2021, 09:49 AM | Views: 339 Whether you are an AI expert or a Computer Science student, you will come across Python Programming language sooner or later in your career. Whether you are an AI expert or a Computer Science student, you will come across Python Programming language sooner or later in your career, and having a good knowledge of Python will go a long way in your career. Here are 5 free e-Books you must read to kickstart your career in tech world: 1.
The Recursive Book of Recursion
"This book takes the mystery out of recursion. By the time you finish it, you'll see recursion as a powerful technique, but also a technique usable by mere mortals." —John D. Cook "... this book is a worthy read for a developer who wants to deepen their knowledge of advanced programming topics. While basic recursion is included in early programming curriculum, it typically stops at examples that can be reproduced with iteration.
9 Free Quality Resources to Learn and Expand Your Python Skills
Photo by Lukas from Pexels If you’re new to the tech field, and more precisely the programming world, then you must have gotten the advice that one of the best languages for you to start with is Python. However, even if you know a programming language, Python is widely used; you must’ve crossed paths with it or had to learn it for a project.
The Big Book of Small Python Projects
"I've always been impressed by the variety of simple, but interesting and fun, projects Al can come up with and this collection takes that to the next level. . . . Even experienced coders are likely to be pulled into browsing through the wide variety that Al has put into this book." —Naomi Ceder, Fellow of the Python Software Foundation "Al Sweigart presents fun programs, inspiring learners to tweak them. That's how I learned to program: tinkering with examples from books and magazines.
5 Free Books for Learning Python for Data Science
by Kenneth Reitz & Tanya Schlusser This is an excellent book for all Python developers, both for beginners and more experienced users. It isn’t specific to Data Science. However, it will give you a fantastic grounding in the language and in particular includes recommended best practices and frameworks. It includes everything from installation, development environments, recommended code structure, object-oriented programming and some really excellent chapters on code style.
Bawimy się, programując w Scratchu Nauka programowania przez tworzenie niezwykłych gier
Scratch, kolorowy język programowania, działający na zasadzie „przeciągania i upuszczania”, jest używany przez miliony zupełnych nowicjuszy, a dzięki książce „Bawimy się, programując w Scratchu”, możesz nauczyć się go poprzez tworzenie niezwykłych gier! Przygotuj się do niszczenia asteroidów, rzucenia obręczami oraz krojenia i siekania owoców! Każda gra zawiera przystępne instrukcje, pytania kontrolne oraz zadania związane z kreatywnym tworzeniem własnej wersji gry.
Scratch 3 Programming Playground
Look Inside! Download Chapter 3: MAZE RUNNER Scratch, the colorful drag-and-drop programming language, is used by millions of first-time learners worldwide. Scratch 3 features an updated interface, new programming blocks, and the ability to run on tablets and smartphones, so you can learn to code on the go. In Scratch 3 Programming Playground, you’ll learn to code by making cool games.
The Zen of Python, Explained
The Zen of Python by Tim Peters are 20 guidelines for the design of the Python language. Your Python code doesn’t necessarily have to follow these guidelines, but they’re good to keep in mind. The Zen of Python is an Easter egg, or hidden joke, that appears if you run import this: >>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested.
2019 Opensource.com summer reading list
It is my pleasure to introduce the 2019 Opensource.com summer reading list. This year's collection includes 13 great books recommended by members of the Opensource.com community. You will find suggestions suited for a wide variety of tastes in this diverse and interesting selection of books. If you enjoy fiction, we have a great thriller and a cozy mystery on our list. If your reading interests favor nonfiction, we have several great options there as well.
Beyond the Basic Stuff with Python
Look Inside! Download Chapter 2: ENVIRONMENT SETUP AND THE COMMAND LINE BRIDGE THE GAP BETWEEN NOVICE AND PROFESSIONAL You’ve completed a basic Python programming tutorial or finished Al Sweigart’s best selling Automate the Boring Stuff with Python. What’s the next step toward becoming a capable, confident software developer? Welcome to Beyond the Basic Stuff with Python.
Automate the Boring Stuff with Python Programming Course
Automate tasks on their computer by writing simple Python programs. Write programs that can do text pattern recognition with "regular expressions". Programmatically generate and update Excel spreadsheets. Parse PDFs and Word documents. Crawl web sites and pull information from online sources. Write programs that send out email notifications. Use Python's debugging tools to quickly figure out bugs in your code. Programmatically control the mouse and keyboard to click and type for you.
18 Python programming books for beginners and veterans
Who knew there were so many helpful books out there for Python programmers? This curated list is just a drop in the bucket. As you may know, Python is soaring in popularity. Let's just say, it might be a good idea to get started learning more about Python soon or buffing up on your Python skills. So, I asked our writer community to share their top recommendations. Surprisingly, I only received one duplicate out of nineteen responses.
15 books for kids who (you want to) love Linux and open source
In my job I've heard professionals in tech, from C-level executives to everyone in between, say they want their own kids to learn more about Linux and open source. Some of them seem to have an easy time with their kids following closely in their footsteps. And some have a tough time getting their kids to see what makes Linux and open source so cool. Maybe their time will come, maybe it won't. There's a lot of interesting, valuable stuff out there in this big world.
NSTA Recommends: Product Review
Resources for science teachers
Publisher's picks: Top 2016 open source books
With its focus on low-cost, open source hacking tools, The Car Hacker's Handbook will give you a deeper understanding of the computer systems and embedded software in modern vehicles. The book begins by examining vulnerabilities and providing detailed explanations of communications over the CAN bus and between devices and systems.
Invent Your Own Computer Games with Python
Invent Your Own Computer Games with Python Invent Your Own Computer Games with Python will show you how to make classic computer games in Python, even if you've never programmed before. Each chapter introduces a new game as well as step-by-step explanations of how the code works. As you build games like Reversi, Hangman, Tic-Tac-Toe, Dragon Realm, Guess the Number, Jokes, Dodger, Bagels, and Sonar, you'll learn how programmers turn their game ideas into reality.
Scratch Programming Playground - O'Reilly Media
Scratch, the colorful drag-and-drop programming language, is used by millions of first-time learners, and in Scratch Programming Playground, you'll learn to program by making cool games. Get ready to destroy asteroids, shoot hoops, and slice and dice fruit! Each game includes easy-to-follow instructions, review questions, and creative coding challenges to make the game your own. Want to add more levels or a cheat code? No problem, just write some code.
No, you are not too old to learn how to program
I hate telling the story of how I learned to program. In the third grade, a friend showed me a book he found in the school library on making small games in the BASIC programming language. I was obsessed with Nintendo and got hooked on the idea of creating my own video games. I began programming and stuck with it, majored in computer science, and afterward became a software developer and tech book author. My story reinforces a common and misleading notion about what it takes to become a programmer.
Our sneak peek at what's in store at All Things Open
Join us in Raleigh, North Carolina, from October 19 - 20 at All Things Open 2015. You can also enter for a chance to win a free pass to All Things Open 2015. Keynote preview: Modest CEO on open source and acquisition by PayPal Preview the Monday afternoon keynote in our interview with Harper Reed, CEO of Modest.
APIs, not apps: What the future will be like when everyone can code
A couple of decades ago, if you spent every day in chat rooms with your friends, you were a nerd. Today if you do the same thing, you're just the average Facebook user. And so it's no surprise there's a gold rush mentality in the learn-to-code movement. With the tech industry booming and its products so pervasive in our lives, the allure of six-figure tech salaries make plenty of people pack up and head West (literally).
How to automate time-consuming tasks with code
Literacy used to be the domain of scribes and priests. Then the world became more complicated and demanded that everyone read and write. Computing is also a form of literacy, but having it only understood by a priesthood of programmers is not going to be enough for our complex, online world. "Learn to code" has become a mantra for education at all ages. But after clearing away the hype, why do people need to learn to code? What does it get us exactly?
Practical advice for teaching kids how to program
Programming is a creative activity that any kid can engage in. Your child might not care about writing data processing algorithms, but they might enjoy creating games, programming music, designing websites, or just playing around with code. I've written several books to teach beginners of all ages how to code, and I know from experience that you don't need to consider yourself a techie or "good at math" to learn.
Automate the Boring Stuff with Python
The tools you need to get started with data, from basic statistics to complex modeling and large-scale analytics. If you've ever spent hours renaming files or updating hundreds of spreadsheet cells, you know how tedious tasks like these can be. But what if you could have your computer do them for you? In Automate the Boring Stuff with Python, you'll learn how to use Python to write programs that do in minutes what would take you hours to do by hand—no prior programming experience required.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Al
Contact Al, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack