RSSAmplifier

Blog

Haim Gelfenbeyn's Blog

Recent content on Haim Gelfenbeyn's Blog

haim.devRSS feed ↗15 posts

Latest posts

Duplicating HTTP status in the response body is an anti-pattern

In this blog post, I discuss the use of HTTP response status codes and the potential issues with duplicating them in the response body, as well as how RFC7807 provides a solution for conveying application-specific errors. Sometimes, I see APIs where the error response looks like this (HTTP header and body): HTTP / 1.1 400 Bad Request Content-Type : application/json { 'status' : 400 , 'message' :…

Programming in Go is surprisingly productive

In my work life I’m involved with projects in Ruby, Python, Swift, Rust, Javascript, Typescript. I don’t have strong programming language preferences and believe in the “right tool for the job” approach: the language should be a good fit for a problem domain, team expertise, time/budget constrains, etc. Rust is my go-to language when high-performance, strong type safety,…

Run-once Kubernetes DaemonSet pods

Sometimes there’s a need to run some code just once , but on each node in your Kubernetes cluster: collecting some immutable node information is a prime use case. For example, for my Floating IP controller I need to collect the Anchor IP address on every node. See my previous post for context. Kubernetes does not support this out-of-the box: DaemonSet supports only RestartPolicy of Always ,…

Integrating DigitalOcean floating IPs with Kubernetes

The problem DigitalOcean Kubernetes platform is great. Its Load Balancer is well-integrated and works great, too, unless you need to expose UDP services in your cluster: UDP load balancing is not supported! So it’s not possible to load-balance DNS, HTTP/3 or any other UDP service. How are we going to solve this? DigitalOcean supports floating IPs : publicly-accessible static IP addresses…

Redundant first-hop router with Raspberry Pi

In my house, I’m using a general-purpose Linux machine as router. This is a much more flexible setup than using a dedicated device, it provides numerous benefits comparing to using a dedicated router, but it did pose a unique challenge: my router is actually a VM, not a physical machine: the host’s LAN carries multiple VLANs and the router/firewall VM just passes traffic between them.…

Linking Swift code into a Rust app

Why would you want to do that? I initially wrote my “KVM replacement” display-switch application twice, in Rust and Swift. The primary reason was that there is no MacOS-compatible DDC/CI control library for Rust. However, as the app became somewhat popular, and I wanted to add new features and improvements, I realized that this is not sustainable: I would have to implement every new…

Signing and notarizing a Python MacOS UI application

Why write a MacOS application in Python? Python has an amazingly rich ecosystem of libraries, tools and frameworks. It is a clean, modern language, it allows for rapid prototyping and quick development cycles. UI was not the central, focal point of my app, so it made a lot of sense for me to do it in Python: I thought I’d write the core functionality first, and add the UI afterwards.

Dual-monitor 4K@60hz KVM switch for $30

The need for KVM I like my two big hi-res monitors. I love my keyboard and my mouse. And I connect them to my stationary “main” PC and to several other Windows and Mac laptops, alternatively. I’d like to easily switch where these peripheral devices are connected to, and that’s the traditional role of a KVM switch . Unfortunately for me, KVM switches that support 4K/60hz…

Fresh air with ESP8266 and Home Assistant (part 2)

This is the second post about hooking up Heat Recovery Ventilator to Home Assistant. Previously, I wrote about the hardware aspect and here I’ll discuss the software that is needed to make it all work. ESP8266 Firmware There are several IoT frameworks available for ESP8266. I’ve decided to build my solution on top of Homie for ESP8266 . Homie is a thin and simple MQTT convention for…

Fresh air with ESP8266 and Home Assistant (part 1)

This is the first post in a series about how I implemented MQTT controller for a Heat Recovery Ventilator (HRV) in my house, and hooked it up to my home automation system. What is HRV? Our house is quite new, and therefore pretty well sealed. In order to maintain a healthy interior climate and not lose too much energy in a cold Canadian climate, we have a Heat Recovery Ventilator system , which is…

Automating "lunch" Slack status

Why? My work is 100% remote, I work from home most of the time. Although I usually have a stable schedule and try to have meals at the same time every day, sometimes meetings get into way, and I eat earlier or later than usual. To let my co-workers know that I’m currently away, I prefer to set a Slack status (and do not send messages saying “going to lunch” and…

Wall-mounted Dashboards (part 3)

This is the third article in a series about my DIY approach to wall-mounted home automation dashboards . Choosing the dashboard platform The “heart” of my home automation system is Home Assistant , an open source home automation platform written in Python. Its built-in web frontend is suitable for a dashboard, but only if the only thing you want to control is Home Assistant . I knew…

Wall-mounted Dashboards (part 2)

This is the second article in a series of articles about my DIY approach to wall-mounted home automation dashboards. See the first part for initial planning, hardware, mounting and power supplies. A big disappointment My initial idea was to build an intercom system with these tablets. This turned out to be a bad idea, for two reasons: Tablet’s microphone and speaker quality : They were…

Wall-mounted Dashboards (part 1)

This is the first article in a series of articles about my DIY approach to wall-mounted home automation dashboards. This is a bit old news for us, as I completed this project 2 years ago. I didn’t want to write about it immediately after completion, I wasn’t sure how reliable the whole system is. However, today, two years later, it’s still 100% operational, so it’s time!…

Who is Haim Gelfenbeyn?

I’m a software engineer focused on distributed systems and cloud platforms. I’m passionate about system architecture, mentoring teams, and solving complex technical challenges. Currently at Apple, still learning something new every day. I’ve been happily married since 2003, and I’m a proud father of three great boys. About this site This is the place where I ramble about…