The Python Coding Book https://thepythoncodingbook.com/ The friendly, relaxed programming book Sat, 28 Sep 2024 23:06:22 +0000 en-GB hourly 1 https://i0.wp.com/thepythoncodingbook.com/wp-content/uploads/2023/11/cropped-The-Place-icon.png?fit=32%2C32&ssl=1 The Python Coding Book https://thepythoncodingbook.com/ 32 32 192531121 The Python Coding Stack’s New Look https://thepythoncodingbook.com/2024/09/29/the-python-coding-stacks-new-look/ https://thepythoncodingbook.com/2024/09/29/the-python-coding-stacks-new-look/#respond Sat, 28 Sep 2024 23:04:23 +0000 https://thepythoncodingbook.com/?p=3797 The Python Coding Stack has a new look. Here it is: The Stack has been growing steadily as a standalone publication, separate from The Python Coding Book and The Python Coding Place, and now it has its own identity. It offers a very different and unique perspective on Python programming, often with a narrative style.… Continue reading The Python Coding Stack’s New Look

The post The Python Coding Stack’s New Look appeared first on The Python Coding Book.

]]>
The Python Coding Stack has a new look. Here it is:

The Stack has been growing steadily as a standalone publication, separate from The Python Coding Book and The Python Coding Place, and now it has its own identity.

It offers a very different and unique perspective on Python programming, often with a narrative style.

If you’ve not read articles on The Stack yet, have a look at some of the most recent ones, or the top 5.

The post The Python Coding Stack’s New Look appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2024/09/29/the-python-coding-stacks-new-look/feed/ 0 3797
The Python Coding Book is Out in Paperback and EBook https://thepythoncodingbook.com/2024/03/19/the-python-coding-book-first-edition/ https://thepythoncodingbook.com/2024/03/19/the-python-coding-book-first-edition/#comments Tue, 19 Mar 2024 08:24:38 +0000 https://thepythoncodingbook.com/?p=3510 The Python Coding Book is out—I published the First Edition in paperback and EBook, which is a revised version of the “Zeroth” Edition which you’ve been able to read here on this site for a while—just ask Google for a “python book” and it will recommend this one as one of it’s top entries! Read… Continue reading The Python Coding Book is Out in Paperback and EBook

The post The Python Coding Book is Out in Paperback and EBook appeared first on The Python Coding Book.

]]>
The Python Coding Book is out—I published the First Edition in paperback and EBook, which is a revised version of the “Zeroth” Edition which you’ve been able to read here on this site for a while—just ask Google for a “python book” and it will recommend this one as one of it’s top entries!

Read on to see the table of contents, the back-cover blurb introducing the textbook, and testimonials from you, the readers!

The Python Coding Book • A relaxed and friendly programming textbook for beginners

Table of Contents

First Edition, 368 pages

  • 0 Preface • How to Learn to Code
  • Before You Start • Downloading Python and an IDE
  • 1 Getting Started: Your First Project
  • 2 Loops, Lists, and More Fundamentals
  • 3 Power-up Your Coding: Create Your Own Functions
  • 4 Data, Data Types, and Data Structures
  • Monty and The White Room: Understanding Programming
  • 5 Dealing With Errors and Bugs
  • 6 Functions Revisited
  • 7 Object-Oriented Programming

Blurb

Imagine a programming book that feels like a conversation with a friend who’s here to show you the ropes—that’s The Python Coding Book by Stephen Gruppetta. This isn’t a dry textbook. It’s a warm, engaging guide into the world of Python programming, designed with beginners in mind.

With an approach that emphasises clarity and the joy of learning, Stephen guides you through the core concepts of programming, breaking down the barriers that make coding seem inaccessible to many. This book is built on the premise that to truly grasp programming, you need to understand the ‘why’ just as much as the ‘how’. Through engaging explanations, thoughtful analogies, and practical projects, you’re not just learning to code—you’re learning to think and solve problems like a programmer.

Forget about overwhelming details and rapid leaps in complexity. The Python Coding Book introduces concepts at a pace that ensures comprehension, building a solid foundation that instils both knowledge and confidence.

Are you ready for a rewarding journey? The Python Coding Book is more than a book—it’s your first step towards mastering programming with Python. This book is an invitation to not only learn Python but to fall in love with coding.

Testimonials

“It’s the first time I’m understanding what everything does.”

“Your writing is succinct, easy to understand, and process oriented, which I really appreciate. I’m starting to realise that my first experiences with programming weren’t at all representative of my abilities to problem solve or structure my thinking. It has been a great confidence booster for me, and I’m sure other folks are also realising that they were never really the problem. It was the lack of resources or inaccessible information that was the issue. Thanks again for this wonderful resource.”

“The clarity of your writing has helped me understand Python at a deeper level.”

“Thank you for this great resource. I believe this book is the most comprehensive way to understand the material, going beyond the mere memorisation of code snippets or syntax. I recommend it to everyone I talk to who is looking for a Python resource for getting started and who wants to really understand what they are doing at a deeper level.”

The post The Python Coding Book is Out in Paperback and EBook appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2024/03/19/the-python-coding-book-first-edition/feed/ 3 3510
Why Should Only The Grown-Ups Have Fun With Python? https://thepythoncodingbook.com/2024/01/31/codetoday-unlimited-coding-in-python-for-teenagers-children/ https://thepythoncodingbook.com/2024/01/31/codetoday-unlimited-coding-in-python-for-teenagers-children/#comments Wed, 31 Jan 2024 23:29:23 +0000 https://thepythoncodingbook.com/?p=3438 If you’re reading this, you’re possibly familiar with my Python work for adults. What you may not know is that most of my time over the past 8 years has been devoted to teaching Python to children and teenagers. I didn’t like how coding was taught to kids (and still is in most places). It… Continue reading Why Should Only The Grown-Ups Have Fun With Python?

The post Why Should Only The Grown-Ups Have Fun With Python? appeared first on The Python Coding Book.

]]>
If you’re reading this, you’re possibly familiar with my Python work for adults. What you may not know is that most of my time over the past 8 years has been devoted to teaching Python to children and teenagers.

I didn’t like how coding was taught to kids (and still is in most places). It was either too limited and gimmicky, using children-specific platforms that only have a loose resemblance to real programming. Or they taught coding in a “classic” style, with dry and boring exercises.

I felt there was the need to treat coding for children seriously, like a proper modern academic subject. So I set out to create a curriculum and teaching style specifically suited for coding for young people, covering the subject thoroughly but also making it engaging, creative, and yes, fun!

And this is what I’ve been doing for many years, having taught thousands of students!

And now, this curriculum and my very own teaching style is available to teenagers and preteens all around the world through my new platform, Codetoday Unlimited. There are video courses starting from the basics but stretching all the way to intermediate and advanced levels, because curious and ambitious young learners are often frustrated they can’t find resources for their age group that goes beyond the basics.

And there’s a forum where I can interact with the students, where they can ask questions and get feedback.

And the first two levels, 10 hours of video courses, are free for anyone, anywhere.

If you know teenagers or preteens who want to take coding in Python seriously, perhaps they’re bored of the children’s platforms, then get them to try Codetoday Unlimited.

The post Why Should Only The Grown-Ups Have Fun With Python? appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2024/01/31/codetoday-unlimited-coding-in-python-for-teenagers-children/feed/ 1 3438
The Python Coding Place https://thepythoncodingbook.com/2024/01/18/the-python-coding-place-2/ https://thepythoncodingbook.com/2024/01/18/the-python-coding-place-2/#respond Thu, 18 Jan 2024 12:09:08 +0000 https://thepythoncodingbook.com/?p=3411 I have now completed the final phase of The Python Coding Place launch. The members’ area is now live with: And members also get access to the full archive at The Python Coding Stack where I published articles about various Python topics weekly. Read more about The Python Coding Place at thepythoncodingplace.com, and maybe you… Continue reading The Python Coding Place

The post The Python Coding Place appeared first on The Python Coding Book.

]]>

I have now completed the final phase of The Python Coding Place launch. The members’ area is now live with:

  • Video courses across all levels (some live and more to come over coming weeks and months)
  • A members’ forum
  • Live workshops and cohort courses are coming soon

And members also get access to the full archive at The Python Coding Stack where I published articles about various Python topics weekly.

Read more about The Python Coding Place at thepythoncodingplace.com, and maybe you can join as a member. There’s an introductory offer at the moment to mark these early days. It’s a one-time fee that gives access forever.

If you’re new to programming, you can start the free course A Python Tale: https://thepythoncodingplace.thinkific.com/courses/a-python-tale

Hopefully, see you there!

The post The Python Coding Place appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2024/01/18/the-python-coding-place-2/feed/ 0 3411
The Python Coding Place is Live! | October in Review https://thepythoncodingbook.com/2023/11/01/the-python-coding-place-is-live-october-review/ https://thepythoncodingbook.com/2023/11/01/the-python-coding-place-is-live-october-review/#respond Wed, 01 Nov 2023 20:27:46 +0000 https://thepythoncodingbook.com/?p=3226 The big news for October is that The Python Coding Place is now live and my first video course is available for beginners starting to learn to code–well, the first few chapters anyway. This is big news! The Python Coding Place has been a gradual project that started with this site–The Python Coding Book. The… Continue reading The Python Coding Place is Live! | October in Review

The post The Python Coding Place is Live! | October in Review appeared first on The Python Coding Book.

]]>
The big news for October is that The Python Coding Place is now live and my first video course is available for beginners starting to learn to code–well, the first few chapters anyway.

This is big news! The Python Coding Place has been a gradual project that started with this site–The Python Coding Book. The Book has now been around for several years and has gained a strong and faithful following.

After a while, I had starting writing articles and tutorials on the blog on this site–which is what you’re reading now. And earlier this year, the Python articles and tutorials moved to The Python Coding Stack, where I now publish a lot more regularly than I did before.

The Python Coding Place is the hub which connects them all, plus the new services that I have started rolling out this week, with many more to come from January. Here’s what The Place looks like in terms of colour and style:

The Python Coding Place website is now live at thepythoncodingplace.com and the first video course for beginners has also started rolling out: A Python Tale • A Relaxed Stroll Through Programming Basics. Here’s the cover image for A Python Tale:

You can also find The Python Coding Place on YouTube, but if I have to be honest, you’re better off going directly to The Place’s own learning platform if you want to enroll on this free course since you’ll get notes, exercises, and a lot more, and a better experience than on YouTube. Here’s the link directly to A Python Tale on The Place’s learning platform.

And there will be many more courses coming over the coming weeks and months, at all levels. And in January, the Members’ Area of The Python Coding Place will launch with premium courses, live workshops, a forum, and lots more. But I’ll say more about this in a future post, including the pre-launch special offer to become a member–there are no subscriptions for membership of The Python Coding Place, only a one-time fee to become a lifetime member and get everything, forever.

Anyway, in addition to all this excitement, I also published my usual articles on The Python Coding Stack and Breaking the Rules.

I published a three-part series called Monty and The White Room analogy which explores the structure and functioning of a Python program through Monty’s adventures in Python City. This is my favourite coding analogy of all time.

I also published a post for paid subscribers of The Python Coding Stack talking about Python’s None object. Who would have thought there’s so much to say about nothing! The article is This Page Is Intentionally Left Blank • The Story of None. I quite like the artwork for this article, too:

I’ll stop there for this October review. And in case you haven’t realised, I’m quite excited about the new video course, A Python Tale, so if you’re a beginner or you know a beginner, this is the course to try out!

The post The Python Coding Place is Live! | October in Review appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2023/11/01/the-python-coding-place-is-live-october-review/feed/ 0 3226
Butter Berries, Chess, and Timezones | September in Review https://thepythoncodingbook.com/2023/10/04/butter-berries-chess-and-timezones-september-in-review/ https://thepythoncodingbook.com/2023/10/04/butter-berries-chess-and-timezones-september-in-review/#respond Wed, 04 Oct 2023 21:38:04 +0000 https://thepythoncodingbook.com/?p=3185 The Python Coding Stack travelled across timezones, through supermarket aisles, and across a chess board in September. The month started with Butter Berries, An Elusive Delicacy. The inspiration for this article started with a text message from my wife while I was shopping at the supermarket: “Get butter berries and flour. Will be there soon.”… Continue reading Butter Berries, Chess, and Timezones | September in Review

The post Butter Berries, Chess, and Timezones | September in Review appeared first on The Python Coding Book.

]]>
The Python Coding Stack travelled across timezones, through supermarket aisles, and across a chess board in September.

The month started with Butter Berries, An Elusive Delicacy. The inspiration for this article started with a text message from my wife while I was shopping at the supermarket:

“Get butter berries and flour. Will be there soon.”

As I searched in vain for “butter berries”, I found my mind meander to the topic of data structures. The whole supermarket become a data structure.

And in case you’re wondering, there was a missing comma in my wife’s text:

Get butter, berries and flour. Will be there soon.

The next article was rather unusual for me and for The Python Coding Stack. Coding, Fast and Slow, Just Like Chess is an essay discussing my newly-found fondness for chess, and how I recently started playing games with slower time controls.

Just like the supermarket trip, this got me thinking about coding. I seem to think about coding often! Fast chess was leading me to tunnel vision, focusing on the pieces I’m moving. But slow chess forced me to see the whole board. There are many similarities with coding—relying on short-term working memory while focusing on the code I’m writing, but also taking a step back to look at the whole program or code base.

The next article is A Slicing Story. Slicing in Python is one of those topics. People learn about it early on. Most people know how to use slicing.

But there are some hidden quirks and features that are not as well known. I explore these in this article.

And the final article in September dealt with timezones. 5:30am • Timezone Headaches (Part 1) discusses my ongoing difficulties with working out dates and times across timezones, especially when daylight saving enters the scene.

This is the first article in a two-part mini series. More on timezones soon.


And as always, I also have a few more articles about my ideas and experiments in making technical writing more interesting and exciting. You can read these in Breaking the Rules.

The post Butter Berries, Chess, and Timezones | September in Review appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2023/10/04/butter-berries-chess-and-timezones-september-in-review/feed/ 0 3185
Graduation at Hogwarts and Other Python Stories | August in Review https://thepythoncodingbook.com/2023/08/31/graduation-at-hogwarts-and-other-python-stories-august-in-review/ https://thepythoncodingbook.com/2023/08/31/graduation-at-hogwarts-and-other-python-stories-august-in-review/#respond Thu, 31 Aug 2023 20:12:00 +0000 https://thepythoncodingbook.com/?p=3142 August is a quiet month, right? Well, not at The Python Coding Stack and Breaking the Rules, my two Substacks. On The Python Coding Stack, I experimented with some different styles of articles. The month started with The Mayor of Py Town’s Local Experiment: A Global Disaster. This is Py Town looks like (thanks to… Continue reading Graduation at Hogwarts and Other Python Stories | August in Review

The post Graduation at Hogwarts and Other Python Stories | August in Review appeared first on The Python Coding Book.

]]>
August is a quiet month, right? Well, not at The Python Coding Stack and Breaking the Rules, my two Substacks.

On The Python Coding Stack, I experimented with some different styles of articles. The month started with The Mayor of Py Town’s Local Experiment: A Global Disaster.

This is Py Town looks like (thanks to Midjourney!) This town was a bit special and its Mayor liked to make a mess of things. The story leads to why variables in function definitions are local variables.

By the way, here’s the Mayor of Py Town.


Another rather different article was Clearing The Deque—Tidying My Daughter’s Soft Toys • A Python Picture Story. This post is a picture story which explains the differences between lists and deques in Python. If a picture is worth a thousand words, then this is the longest article I’ve ever written!

Another post on The Python Coding Stack combined the turtle module with the partial() function and lambda functions to create a typewriter emulator: Tap, Tap, Tap on The Tiny turtle Typewriter.


Another article looked at some Python quirks that can help us understand what happens underneath the hood in Python. This article, Python Quirks? Party Tricks? Peculiarities Revealed, is a paid article but there’s a substantial free preview.

The final two articles this month concluded two long-running series on The Stack


And for those interested in my experiments in narrative technical writing, you can read all five articles published in August on Breaking the Rules!

The post Graduation at Hogwarts and Other Python Stories | August in Review appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2023/08/31/graduation-at-hogwarts-and-other-python-stories-august-in-review/feed/ 0 3142
Lots of Special Methods. And a Special Article | July in Review https://thepythoncodingbook.com/2023/07/30/lots-of-special-methods-and-a-special-article-july-in-review/ https://thepythoncodingbook.com/2023/07/30/lots-of-special-methods-and-a-special-article-july-in-review/#respond Sun, 30 Jul 2023 10:02:00 +0000 https://thepythoncodingbook.com/?p=3113 I was expecting this month’s review to cover fewer articles than previous months. It is July, after all. But then, I launched my second Substack last month, Breaking the Rules, which means I now have two sets of articles coming out every month. It may not have been the smartest move to launch the new… Continue reading Lots of Special Methods. And a Special Article | July in Review

The post Lots of Special Methods. And a Special Article | July in Review appeared first on The Python Coding Book.

]]>
I was expecting this month’s review to cover fewer articles than previous months. It is July, after all. But then, I launched my second Substack last month, Breaking the Rules, which means I now have two sets of articles coming out every month.

It may not have been the smartest move to launch the new Substack in July when people go on holiday and all that. But that also means that by the time we get to normality in September, I would have already written and published a few posts and settled in!

And on The Python Coding Stack, the focus seems to have been on special methods. In addition to completing the two-part article on __getitem__(), I published the next two articles in the Data Structure Categories Series. These covered collections and iterators. And therefore, they discussed quite a few special methods since that’s what defines these categories.

And the latest article was the sixth in the Harry Potter-themed object-oriented programming series which was about, you guessed it, special methods.

The Python Coding Stack also reached two mini-milestones in July—let’s celebrate small milestones, too. The Python Coding Stack had its three-month birthday this month and I published the 20th article. The Python Coding Stack has grown rapidly in its first three months. Apparently, it’s one of the fastest growing new publications in Substack’s technology leaderboard.

And to mark the 20th article of this new platform I revisited another special article from the past. The most popular article I’ve ever written by far—and one that ends up on Google’s first page often—is the August 2021 article on images and 2D Fourier transforms: How to Create Any Image Using Only Sine Functions | 2D Fourier Transform in Python.

Data Detectives

As a side note, I’m running a series of workshops for children this summer with the title Creative Thinkers Club. It’s the first time I’m running this series and the first workshop was “Data Detectives: How numbers can bend the truth”. It was particularly fun to research, prepare, and deliver this workshop and I may make a few Python-related articles from it, too…

This Month’s Articles

July’s articles on The Python Coding Stack:

And July’s articles on Breaking the Rules:


Subscribe to

The Python Coding Stack

Regular articles for the intermediate Python programmer or a beginner who wants to “read ahead”


The post Lots of Special Methods. And a Special Article | July in Review appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2023/07/30/lots-of-special-methods-and-a-special-article-july-in-review/feed/ 0 3113
More Python Magic and More Stories | June in Review https://thepythoncodingbook.com/2023/06/30/more-python-magic-and-more-stories-june-in-review/ https://thepythoncodingbook.com/2023/06/30/more-python-magic-and-more-stories-june-in-review/#respond Fri, 30 Jun 2023 10:22:00 +0000 https://thepythoncodingbook.com/?p=3073 What a month. June has been very busy. And that’s an understatement. Where shall I start? Interviews and Podcasts I was honoured to be invited to two interviews in June. Mike Driscoll, one of the leading figures in the world of Python communication, kindly invited me as one of the first guests on his new… Continue reading More Python Magic and More Stories | June in Review

The post More Python Magic and More Stories | June in Review appeared first on The Python Coding Book.

]]>
What a month. June has been very busy. And that’s an understatement. Where shall I start?

Interviews and Podcasts

I was honoured to be invited to two interviews in June.

Mike Driscoll, one of the leading figures in the world of Python communication, kindly invited me as one of the first guests on his new podcast, The Python Show. We talked about a number of topics, including teaching Python to children and adults and my journey through coding.

You can listen to the podcast here or on your favourite podcast player. Or, if you really want, you can watch it, too:

Next, there’s an interview on The Tech Writers Stack by Alejandro Piad Morffis where I talk a bit more about writing technical articles:

Technical Writing Doesn’t Have to be Boring

I’ve been on a long journey with my technical writing. And I still am. Over time, I’ve shifted more and more to a different style of writing compared to the “classic textbook” style that’s still very common in many areas of technical writing. I’ve done a lot of thinking, reading, and experimentation on this topic over the years.

This month, I decided to start writing about this topic, too.

I kicked this new writing career off with a guest article on The Tech Writers Stack:

And I’ve also launched a new Substack where I’ll be writing about my thoughts and views on the topic of narrative technical writing and using storytelling techniques in technical articles:

This Month’s Articles

And of course, I published a few more articles this month. Here are the latest articles from June on The Python Coding Stack:

And on Breaking the Rules, I published the Pilot Episode of what will be a weekly short post:

July will be a bit quieter, I promise.



Subscribe to

The Python Coding Stack

Regular articles for the intermediate Python programmer or a beginner who wants to “read ahead”


The post More Python Magic and More Stories | June in Review appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2023/06/30/more-python-magic-and-more-stories-june-in-review/feed/ 0 3073
Breaking the Rules — My Thoughts on Narrative Technical Writing https://thepythoncodingbook.com/2023/06/21/breaking-the-rules-my-thoughts-on-narrative-technical-writing/ https://thepythoncodingbook.com/2023/06/21/breaking-the-rules-my-thoughts-on-narrative-technical-writing/#respond Wed, 21 Jun 2023 16:19:24 +0000 https://thepythoncodingbook.com/?p=3061 If you read my Python articles regularly—and thank you if you do—you’ll know that I try to present content from a somewhat different perspective. I don’t like writing classic “textbook-type” tutorials and articles. I’ve been reading and thinking a lot about my writing over the years. I’ve decided to start journaling those ideas and thoughts,… Continue reading Breaking the Rules — My Thoughts on Narrative Technical Writing

The post Breaking the Rules — My Thoughts on Narrative Technical Writing appeared first on The Python Coding Book.

]]>
If you read my Python articles regularly—and thank you if you do—you’ll know that I try to present content from a somewhat different perspective. I don’t like writing classic “textbook-type” tutorials and articles.

I’ve been reading and thinking a lot about my writing over the years. I’ve decided to start journaling those ideas and thoughts, the experiments I try, and things I read elsewhere. I’m interested in adding narratives to my articles and use other techniques from storytelling.

Now, if you only care about my Python content—and thank you once again if you do—you don’t need to do anything, as long as you’re already subscribed to The Python Coding Stack.

But, if you are interested in narrative technical writing and storytelling within technical articles, then you can subscribe to my new Substack: Breaking the Rules.

You can also read the first introductory “about” post here: Are You Ready to Break the Rules?



Subscribe to

The Python Coding Stack

Regular articles for the intermediate Python programmer or a beginner who wants to “read ahead”


The post Breaking the Rules — My Thoughts on Narrative Technical Writing appeared first on The Python Coding Book.

]]>
https://thepythoncodingbook.com/2023/06/21/breaking-the-rules-my-thoughts-on-narrative-technical-writing/feed/ 0 3061