Python Gotcha: Modifying a list while iterating
Python makes it easy to modify a list while you are iterating through it's elements. This will bite you. Read on to find out how and what can be done about it.
Python makes it easy to modify a list while you are iterating through it's elements. This will bite you. Read on to find out how and what can be done about it.
Copying a Python list (or any mutable object) isn't as simple as setting one equal to another. Let's discuss a better way to do this.
utcnow() and utcfromtimestamp() don't know about timezones and that causes problems. Let's talk about those, how to fix the problem and their recent deprecation in Python 3.12
In Ruby you can use either and or &&. You can use or or ||. What is the difference and what's the catch?
Comparing two numerical variables in Python can have surprising results if you aren't aware of some common gotchas. This post covers a couple of the common ones.
Append 100,000 strings together using join or concat - Which is faster?
A quick walk through of why mutable defaults on optional arguments is bad in Python.
Setting up Obsidian to sync notes across devices utilizing git and a GitLab backend
GitLab 16.3 deprecated and disabled the bundled Grafana, but didn't provide complete instructions for how to disable it. Fortunately, it's easy to do. I've documented the few steps needed.
CoderByte falls to ChatGPT just like the more well known interview assessment platforms. Here's my run down, and how I used ChatGPT to solve an easy, medium and hard problem in less than 5 minutes total.