Strong opinions loosely held

Syntax-aware redefinition of kill-word in IPython

Although IPython to me is the best of all the Python REPLs, there is something that bothered me about it for a while: Alt-Backspace is one of the shortcuts I use most. In many shell contexts, as well as generally in text editing, it removes the last word behind the cursor, i.e. the last word I wrote. It is a very useful shortcut to fix missspelled words or when after writing it I notice a word does not really work in a context after all and I want to replace it. This removal the last word is often called the »kill-word command«.

Read more …

Schöne Gendergaps mit LaTeX erzeugen

Kürzlich habe ich festgestellt, wie furchtbar ein Gendergap in LaTeX aussieht, wenn es auf üblichem Wege (mittels Unterstrich \textunderscore) erzeugt wird. Besonders stört mich daran, dass der Unterstrich in der Schriftart Computer Modern (dem LaTeX-Default) ungewöhnlich lang ist und etwas zu tief steht. Hinzu kommt, dass in der deutschen Silbentrennung vor einem Unterstrich natürlich kein Wortumbruch vorgesehen ist, auch wenn dies bei langen ge-genderten durchaus sinnvoll sein kann. Besonders die »_innen«-Endung ist lang genug, um den sauberen Blocksatz für LaTeX unmöglich zu machen. Das äußert sich dann durch über den Block hinaushängenden Wörter.

Weiterlesen …

Prevent macOS from automatically mounting external drives

Just recently I have added an external USB harddisk to my desktop setup. I keep my Lightroom photo library on it, since keeping the photos on my NAS and mounting that to work on the pictures is just too slow.

Obviously I am not spending every day working on those pictures, just every now and then, yet still I’d like to keep the HDD connected to the OWC USB-C Dock that connects all the accessories to my MacBook Adorable (a differentiating phrase initially coined by David Smith) when I’m seated. What can I say — I am lazy … and have a second APFS volume on the same HDD that contains a bootable backup of macOS. Super Duper creates that backup every other day. And I’d like it to do so even if I forget to attach the HDD.

Weiterlesen …

MQTT-enabling the sensors of an old ELV WS 300 PC II Weather Station using the Raspberry Pi

For years I have been using an old ELV WS 300 PC-II weather station (also known as eQ-3 WS PC-II) to measure temperature and humidity levels in parts of our flat. Mostly to quantify the effectiveness of our airing habits. Something that always annoyed me about the base station is its interface: it has a USB port at the back, and comes with a crummy Windows tool for collecting the data. Not very smart and not very connected. I’m a big fan of Home Assistant, a Python-based smart home / connected home framework, and I already run all of my smart home efforts through that. My credo is: If there’s no Home Assistant component for it, it does not exist. In this post I am going to connect the WS 300 (or parts thereof) to Home Assistant using the MQTT protocol.

Weiterlesen …

Change is a matter of priorities

»I cannot change myself. I am an old man! I know that I have my ways and shortcomings. But I have accepted the fact, and it is not possible to become someone I am not. That would be self-sabotage. You just come to terms with who you are, and embrace it.«

The above quote is something someone close to me said recently when he was confronted with some harsh but well founded criticism (it really was, and didn’t come from me. It was something spoken in the group of close people in which we held the talk). Quite frankly I was appalled by this statement and immediately rejected that line of thought. For me it is fundamentally untrue; something that I always knew to be false subconsciously but never could grasp as clearly as I can now. And as with so many things it boils down to priorities.

Weiterlesen …