Technical Solutions
- Posts
- 47
- Page
- 2 / 5
- Span
- 2023 – 2024
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 Gotcha: List Copy Problems
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.
Python Gotcha: Timezone Naive Functions like utcnow() and utcfromtimestamp()
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
Ruby Gotcha: Operator Precedence
In Ruby you can use either and or &&. You can use or or ||. What is the difference and what's the catch?
Python Gotcha: Comparisons
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.
Python Gotcha: Join vs Concat
Append 100,000 strings together using join or concat - Which is faster?
Python Gotcha: Mutable Default Optional Arguments
A quick walk through of why mutable defaults on optional arguments is bad in Python.
Syncing Obsidian Notes across devices using Git and GitLab
Setting up Obsidian to sync notes across devices utilizing git and a GitLab backend
How to disable Grafana in Gitlab 16.3 Omnibus
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 assessments fall to ChatGPT
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.