Weekly Post 78

Posted on June 24, 2025

sort vs sorted

Despite spending a lot of time in Python, the difference between sort and sorted always confuses me.

It’s easy to forget which one sorts in place and which one returns a new object.

object.sort() → Sorts in place. Only available on lists.

sorted(object) → Returns a new sorted list. Works on any iterable.

Things I should have known - Pending delete mode

One thing I disliked when using Vim or Emacs—especially after I use modern editors(textedit, vscode, pycharm..etc.)—was how selecting text and typing didn’t overwrite the selection.

In Vim, I got used to typing vw and then c to delete the selected region and enter insert mode.

Shockingly, after all my time using Emacs, I only just learned about pending-delete-mode (also known as delete-selection-mode). This minor mode allows you to type over a selected region—just like in most modern edtiors. Without it enabled, typing with an active region simply inserts text at the cursor, instead of replacing the selection.

Manually connecting to Airpods …because Auto-Switching Is the Worst.

AirPods are great—until they automatically switch to a different device right when you don’t want them to.

The auto-switching feature always feels like it’s trying to outsmart me, and I found it incredibly frustrating during calls or focused work sessions.

Now, I’ve turned on the “When last connected to this device” option in Bluetooth settings. This means the AirPods stay with the last device they were connected to until I manually change it—just like the good old days.

When I want to use them with a different device, I go into Bluetooth settings and tap the AirPods manually. It’s not magical, but at least it’s predictable.

Links

Through the lens