In this short article I will show you how to use dateutil’s parse, relativedelta and rrule to make it easier to work with datetimes 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!
How to Test Your Django App with Selenium and pytest
By Bob Belderbos on 22 November 2018
In this article I will show you how to test a Django app with pytest and Selenium. We will test our CodeChalleng.es platform comparing the logged out homepage vs the logged in dashboard. We will navigate the DOM matching elements and more. Overall you should learn enough Selenium and pytest to start testing a web page including a login. Sounds exciting? Let’s dive straight in!
Automating PyBites Review Post Using Github API and collections.defaultdict
By Bob Belderbos on 13 November 2018
In this post I share a quick script I produced last week to automate a portion of our review post. There are some nice idioms that you might find useful.
Career Development for Programmers
By Bob Belderbos on 23 September 2018
What makes you excel in your career? Become an expert in x, y, z. Sure, you need to learn technical skills, quite a lot of them. However there is a lot more to it. If you want to succeed in your job, business and life, you want to build a portfolio, share your learning, become a reader and a good writer, and last but not least stick to daily exercising. I published this article on my blog 2 years ago and find a lot is still relevant today and will serve our community. I also added an updated towards the end.
Watch Me Code – Solving Bite 21. Query a Nested Data Structure
By Bob Belderbos on 14 July 2018
I recorded a video solving Bite 21. Query a nested data structure. The exercise presents us with a dictionary of car manufacturers and their corresponding car models. We will extract various bits and pieces from it as well as sort the nested model lists. This is a common type of data structure so specially for a beginner it is important to have this become second nature. Prepare to learn more about looping, some string operations, and list / dict comprehensions.
Enough pytest to be Dangerous, 10 Things I Learned Writing Tests for 100 Python (Bites of Py) Exercises
By Bob Belderbos on 7 June 2018
We hit 100 Bite exercises on our Code Platform and that means we have written tests for 100 exercises. In this article I share 10 things I learned about writing test code and pytest.
All You Need to Know to Start Using Fixtures in Your pytest Code
By Bob Belderbos on 15 March 2018
Setting up test cases for code that manage data can be challenging but it’s an important skill to reliably test your code. You might have heard of the setup and teardown methods in unittest. In pytest you use fixtures and as you will discover in this article they are actually not that hard to set up. Fixtures have been labelled pytest’s killer feature so let’s explore them in this article using a practical example.
5 Things we Learned Co-hosting a Live Code Challenge Workshop
By Bob Belderbos on 11 November 2017
Yesterday we hosted PyChallengeDay together with Python Alicante. I am sure the folks that joined us stretched their coding skills. And we learned a couple of things too which we will share in this article. Hopefullly it inspires you to host a workshop yourself to grow the awesome Python community.
Bootstrap Your Next Python Project With Cookiecutter
By Bob Belderbos on 24 October 2017
I finally did it! I bootstrapped my first project with Cookiecutter. There is a lot to discover but wow this tool can save you a ton of time, making your project more professional.
How to Use Pdb to Debug Your Code
By Bob Belderbos on 24 October 2017
The larger part of our coding time is spent reading and debugging code already written. For this Python’s pdb is an unmissable module in your Python toolbox. In this article I show you the most common options and some practical examples.