Mobile Data (SIM, eSIM) and Firewalls in China

When talking to friends that planned traveling to China, I found that they often struggle with figuring out mobile data plans. This is intuitive because you should take care not to get cut off by the great firewall, making most western social media and services inaccessible (Facebook, WhatsApp, Google, etc) and information on how to circumvent it is scarce. This article is a bunch of notes on SIMs in China.

While China is a fascinating and pretty country, it is infamous for its great firewall. Of couse you can navigate China without western services (obviously, most Chinese do it everyday :)) and Google Maps is actually almost useless in mainland China1 . You will definitely need to install a number of local apps (WeChat for example) to be able to book trains2, museums, hotels and pay in basically any shop. However you probably still want to keep in touch with your friends back home and Line, WhatsApp and Facebook all won’t work in China. Neither do Google or most Microsoft services.

DIY Home Assistant Seating Detection without Soldering

In this tutorial, I quickly outline three different set-ups I tried to add seat-sensing capabilities to my Home Assistant Setup. The set ups don’t require soldering, do not require inverting states in HA, and cover both Zigbee and Wifi Connections. I tried three different boards and pressure sensors and recommend one of the boards and all of the pressure sensors – surprisingly, all of the pressure sensors excelled in different setups! However, I found that the Car Seat Sensor types work best for bed occupancy detection and thin film sensors are useful for seats and couches.

I’ve recently started re‑building my smart home setup with Home Assistant. At the moment, most of my devices are lights (with a few extras like heaters and a robot vacuum – maybe a topic for another post). Naturally, the first and most obvious automations involve switching lights on and off, usually triggered by motion. But that quickly leads to what I like to call the “toilet seat problem”: you settle onto the couch, lie in bed, or sit down for a meal – perfectly still for a while – and suddenly the lights go out. Not great UX.

A Setup Guide for the Best eSIM in Cambodia: CellCard.

While mobile data is crucial for every trip in South East Asia, finding the best eSIM can be hard. Especially for Cambodia, which is not included in many regional data plans and outrageously expensive in common providers such as Revolut, Klook or BNE-Sim (1 GB ~ $6). CellCard is a local provider that is easy to set up and cheap (15 GB ~ $6). However, a few hurdles remain, which I detail in this post.

Cambodia is a curious country for eSIMs. It is not included in many regional packages1 and even in usually-pricey-but-okay providers such as BNE or Saily you’ll pay at least $10 for a few GB2. However, there is a small, appearently very local provider of SIM cards that recently started providing eSIMs: CellCard.

Leveraging Constrained Sampling for Fill-In-the-Middle Code Completion

Two octopodes flying through space... we want to control where they go to!

Existing constrained sampling methods only focus on generating code that will be a syntactically well-formed program on its own after completion. What if we have some remaining code suffix and want the entirety to become a valid program? In this post I explore how to leverage existing tooling to create well-formed Copilot-like Fill-In-the-Middle (FIM) code completions.

Proper Well-Formedness Guarantees for Finite LLM Sampling

Even under constrained sampling, LLMs can produce syntactically invalid output. In this post I explore why this happens when restricting the maximum number of generated tokens and how to resolve the issue using results from language theory.

Teach programming with JavaScript

a person sitting in front of a computer learning to write javascript by building a nice and blinking website
DALLE-2 generated interpretation of how it fealt for me to learn JavaScript.

I recently posted on how I find current computer science education lacks motivation. Today I had the pleasure to listen to a keynote by Prof. Dr. Dennis Komm on how he approaches computer science education. He should know since he is a Professor of Algorithms and Didactics at ETH Zurich and hence at the spearhead of education for computer science in Switzerland. And in his talk he made a lot of valid points – but I still feel the issues raised in my last post remain unanswered by his talk. I will use it as an anchor to refine my demands.

Die Letzte Generation hat ein Imageproblem

Die Letzte Generation (LG) hat ein Problem. Und dieses Problem ist nicht nur die Klimakrise, gegen die sie so leidenschaftlich kämpft, sondern auch die Art und Weise, wie sie diesen Kampf führt. Die Aktionen der LG, die sich durch zivilen Ungehorsam auszeichnen, stören zunehmend die Bevölkerung und zwingen damit die Regierung, nicht auf sie einzugehen, sondern sie zu zerschlagen. Um das zu ändern, muss die LG die Regierung stören und bei der Bevölkerung beliebter werden.

Als Außenstehender, der die LG und ihre Ziele schätzt, fällt es mir schwer, diese Kritik zu äußern. Aber gerade weil ich die Notwendigkeit ihres Kampfes gegen die Umweltzerstörung sehe, ist es mir wichtig, auf die Probleme hinzuweisen, die ihre aktuelle Strategie mit sich bringt.

Stop teaching “Programming”

User: please write convincing blog post about why we should not teach programming anymore (especially not as “Introduction to Programming”) The reason is that programming is just a tool and never useful on its own. Teaching it without context is easily frustrating. Instead, recommend teaching applied courses like “Introduction to Webdesign” where users can learn programming in a context and appreciate its usefulness

Docker and DB WiFi Hotspots

TL;DR: Are you riding trains in Germany (brought to you by DB) and having trouble to connect to their WiFi Hotspot? Try uninstalling docker.

I am recently riding the train a lot. In particular, I was riding the ICE type of train by Deutsche Bahn (DB). In theory, these trains feature WI-Fi hotspots, but I am used to the fact that Wi-Fi on trains is not avilable. Either there is no signal at all or the hotspot does not offer a sign-in screen. Alternatively, the sign-in screen shows, and the screen is blank or logging in fails. You get the idea.

Recently I stumbled upon a very peculiar issue. My phone was able to connect perfectly fine but my laptop was not. I could connect to the WiFi but the login screen would not prompt. I tried restarting and the screen showed (after some restarts) and gave a weird error message – the host can not be reached. I googled how to force the login screen to show. Usually you type the default gateway address in your browser and it works fine. In this case said host-could-not-be-reached message popped up. How can that host not be reached? It is literally the first IP address in this network my laptop would know of and try to reach.. wait a minute.

Chiatura – Sachkhere via Bus and Train

Chiatura is a place that is famous for the fact that there are many cable cars throughout the city. Now that the cable cars from the soviet era are not operational anymore you might be wondering if you should still go. Let me ask you another question: Are you curious about a city where public transport includes cable cars? Are you interested in a former miner city full of soviet-style high-rise buildings in a super hilly area?

Soviet era high-rise buildings and abandoned cable car station