In this article I will give you 10 tips for cleaner code. Hope this helps improve your Python code. 1. Smaller units. Break long functions (methods) into multiple smaller ones that do one thing (SRP or “Single-responsibility principle”). This will make your code more modular and easier to test. For example, a function that parses… Continue reading Tips for clean code in Python
Bob Belderbos
Bob studied business economics, but got fired up about programming early in his career. He taught himself web design / coding and started living his biggest passion: automate the boring stuff, making other people's lives easier. Since then he has coded projects accruing millions in cost savings and built a coding platform that has taught Python to thousands of people worldwide. He deeply cares about helping other people succeed. His biggest win will be your next win!
Single or double quotes in Python?
By Bob Belderbos on 20 September 2022
Whatever you think about Twitter these days, it’s pretty handy for us developers to ask questions and get inputs 💡 Last week I asked about single vs double quotes in Python: I thought double quotes were a given, black – “The Uncompromising Code Formatter”, defaults to them and I personally find them pleasant to the eye.… Continue reading Single or double quotes in Python?
A super simple Zettelkasten note taking system
By Bob Belderbos on 7 September 2022
Yesterday I found this amazing gist that got me running with Zettelkasten in no time 💪 Check out this short YouTube video where the author demos this workflow: As the Zen of Python wisely taught us: Simple is better than complex – and this is so true for what can easily be an overwhelming task… Continue reading A super simple Zettelkasten note taking system
Making plots in your terminal with plotext
By Bob Belderbos on 22 August 2022
In this blog post a quick script to plot the frequency of our blog articles in the terminal. It’s good to see that we’re getting back on track 🙂 The code gist is here. First we import the libraries we are going to use. As always we separate Standard Library modules from 3rd party ones… Continue reading Making plots in your terminal with plotext
5 tips for overcoming imposter syndrome …
By Bob Belderbos on 8 July 2022
“I don’t belong here!”, “Who the hell am I to …” You’re not alone! Imposter syndrome is widespread in our industry. Here are 5 tips to better deal with it: 1. Talk with somebody Be it your manager, colleague, mentor or friend. This greatly reduces the stress this causes and you’ll realize (like really realize, not read… Continue reading 5 tips for overcoming imposter syndrome …
Learning Rich by making a color searcher command line app
By Bob Belderbos on 6 July 2022
The other day I wanted to get serious with the awesome Rich library. As we always say: you have to build to really learn + need ideas? Scratch your own itch. If you’re struggling for ideas, see what takes you long and/or is cumbersome and see if it’s a good candidate to automate it with… Continue reading Learning Rich by making a color searcher command line app
How to make a nice graph using Django and Chart.js
By Bob Belderbos on 14 June 2022
In this article I will show you how to make a beautiful yet simple graph using Django + Chart.js. The code for this project is here. Getting the data We are going to plot the number of Bite exercises that get completed per month on our platform. For this I exported the live data from… Continue reading How to make a nice graph using Django and Chart.js
How to achieve more deep work
By Bob Belderbos on 11 May 2022
Listen now: How much deep work do you get done on a typical work day? In our case, we thought plenty. It turns out that lately it’s been less and less. As the authors of Practical Productivity with PyBites this came as quite a shock! But as you’ll learn in this episode, productivity is insidious. You can be… Continue reading How to achieve more deep work
A debugging tale
By Bob Belderbos on 6 March 2022
I ran into an interesting issue debugging the other day … I used isort with pre-commit to automatically sort imports before committing my code. This is a huge time saver and I am very thankful for both tools, as well as black and flake8. They save a ton of time and they instantly boost the… Continue reading A debugging tale
10 Tips to Write Better Functions in Python
By Bob Belderbos on 19 January 2022
In today’s article 10 tips to improve the quality of your Python functions.