Nik Kantar

Tag: programming

2023 (5)

TIL About shlex.split
Today I learned about shlex.split and it’s really cool.
Markdown URL Tag Bookmarklets
I started doing most of my writing in a GUI editor and wanted something “closer” than my command-line utility mdut.
Boolean Properties in Python: A Pitfall
I love using class properties as boolean flags, but occasionally forget the @property decorator.
Getting Nothing Out of a Python Dictionary
A bit of nuance about dealing with null and missing values in Python dictionaries.
Dedupe a List in Python, Slowly
A pretty slow way of removing duplicate elements in a Python list.

2022 (4)

Solve the Problem You Have
It’s all too easy to find oneself solving the wrong problems. Here’s how I try and combat that.
Tests Are Docs
Automated tests are documentation, and–if done well—even useful and up to date!
Understanding Developer Interruptions
Why interrupting a programmer is even more costly than you think, illustrated by u/nkukard.
Programming Sucks and Is Amazing
It’s true.

2021 (4)

Quick and Dirty Python: HOWTO
Let’s build up small Python script.
Quick and Dirty Python
Something I absolutely love about Python is just how well it scales from tiny scripts to complex systems. Here’s an example of the former.
Django Site Dispatch, Improved
Turns out I like this problem so much I had to solve it again.
Django Site Dispatch
Django’s “sites” framework is quite cool, but what if you need to make some exceptions?

2020 (1)

Python’s dict.setdefault Rocks
Python’s dictionaries are awesome, and I just learned about yet another reason that’s the case.

2017 (2)

Modifying a List in Place in Python
A neat (if questionably legible) trick for modifying a list in place in Python, and a more Pythonic solution for the same problem.
Programmer, Developer, Engineer, Lexicographer
What am I even supposed to call myself these days?

2015 (3)

Drupal Is a Nightmare and Done Is Better than Perfect
Sometimes you have to take your pride in doing things well and distract it while you do something badly. This was one of those times.
Programmer Interrupted
Why interrupting a programmer is even more costly than you think, illustrated by Jason Heeris.
Web Development on a Chromebook — Not for Me
I tried migrating to a Chromebook and didn't like it.

2014 (1)

Sorting with Randomization
Sorting with pure chance, with some elementary stats.

featured post