A while back I wrote about managing local git branches with git rebase and I mentioned that I always submit my code changes with one commit only. No matter how many commits I make during my development process in my local branch when I prepare my code for code review and push it to remote, … Continue reading Git Squash Tutorial: How to Combine Git Commits for a Clear and Organized Commit History
TIL: time travel with Python’s standard library
There are a few different approaches for writing tests for date and/or time-sensitive functionality. One could choose to add a sleep() in the test, which would guarantee that the time passed, but that also has the downside of increasing the run time of the test. Another option is to reach out to external libraries or … Continue reading TIL: time travel with Python’s standard library
Django Rest Framework: adding DateTimeField format serializer validation
Adding date and time format validation to a DRF serializer
Book review: The Programmer’s Brain
As a software developer, I usually self-refer as a "Professional learner" and this book's subtitle ("What every programmer needs to know about cognition") caught my eye right away. The author, Felienne Hermans, does a fantastic job explaining how our brain processes new information and shares, what I found the most valuable and immediately applicable, scientifically … Continue reading Book review: The Programmer’s Brain
Como reverter um commit no git
Existem algumas maneiras diferentes de desfazer as coisas no git, mas para o propósito deste post vamos considerar o seguinte cenário: um repositório com cópias locais e remotas vários colaboradores um commit recente que já foi adicionado ao repositório remoto ("merged", pra usar o termo "git" em inglês) mas que precisa ser revertido git revert … Continue reading Como reverter um commit no git
TIL: installed packages in Python – list, and show
If your Python project has a very short list of required packages (in requirements, pipfile, etc), it's easy to see all packages you have. But on large projects, the dependencies can run pretty long, not to mention the dependencies for the required packages. And what about learning more about those dependencies? pip list Will list … Continue reading TIL: installed packages in Python – list, and show
How to revert a commit in git
There are a few different ways to undo things in git but for the purpose of this post we will stick with the following scenario: a repository with local and remote copies multi-person collaborators a recent change merged to remote (and potentially deployed) that needs to be reverted git revert to the rescue! ✨ TL; … Continue reading How to revert a commit in git
Managing local git branches with git rebase
When you work on a codebase with other people, you need to manage your local branches: you need to ensure that when you push some code and create a merge/pull request on the remote branch, your changes will be easily integrated with the main codebase. And by "easily" I mean preferably without merge conflicts or … Continue reading Managing local git branches with git rebase
The difference between HTTP status codes 401 and 403: Unauthorized and Forbidden
You are working with an API and after sending a request you receive one of these two HTTP response codes: 401 or 403. What do HTTP status codes 401 and 403 mean? Official specification If you search for the official specification, this is what you get: 401: Unauthorized The 401 (Unauthorized) status code indicates that the request … Continue reading The difference between HTTP status codes 401 and 403: Unauthorized and Forbidden
A caller id for your python function
Most of you might be too young to know this but there was time that the phone in your house - not in your pocket! - would ring and gasp! you had no idea who was calling! You had to ANSWER the phone to find out. 🤦♀️ Now we have caller ID and know exactly … Continue reading A caller id for your python function