Posts
Here be blog posts
Operating a private 5G station in Japan
A year later, a bug fix
As promised in my last post, I’ve fixed the hugo new content
future date bug.
When running hugo new content
, the static site generator Hugo crashes with a surprising error message under these conditions:
- You’ve configured Hugo to extract publish dates from file paths in the
hugo.toml
configuration, and - configured Hugo to use an archetype to populate your new file, and
- create new content with the path containing a future date.
Here’s the error that Hugo prints out when it crashes under these conditions (year 2099 added for exaggeration):
Automotive real-time operating systems
Most cars contain embedded systems called Electronic Control Units (ECU). These ECUs control the electrical systems inside a car like engines or brakes. Some cars can have more than 100 of these ECUs inside.
These ECUs often contain complex software to do many different tasks in your car. And they have to do this while keeping you safe.
To help run this software in a safe and efficient way, ECUs often use operating systems.
Adhesive NFC tags
Have you ever tried adhesive Near-Field Communication (NFC) tags?

A photo showing the AD Bullseye NFC tag on an adhesive film strip
We tried the AD Bullseye NFC NTAG213 from Avery Dennison Smartrac. You can find the product data sheet here.
My friend purchased them in Akihabara this week. The lowest purchase quantity with the vendor in Akihabara was about 30 tags and they cost around JPY 3,000.
Diffie-Hellman shared value generation in J
I wanted to try out how to derive p
and g
used in
Finite Field Diffie-Hellman.
How to fix mDNS on macOS Sequoia
Upgrading to macOS Sequoia broke mDNS for me.
My M2 MacBook stopped responding when pinging its host name lithium.local
.
The Anki sync server
running on it became unreachable. It didn’t matter whether I attempted to
resolve lithium.local
from another machine or on that machine itself.
Searching the system log for clues, or changing mDNS related configurations did not help. Turning it off and on again didn’t help either.
Searching system logs for hints turned out to be a rabbit hole. On Debian or
NixOS, I can always just search the logs in /var/log
or journalctl
for
hints. Recent macOS versions are good at
masking useful debug information
in logs. A few guides,
like this one here,
tell you to add a configuration profile to unmask log information: 5 minutes
later and you are in an Apple Configurator rabbit hole.
Information Security Management Examination
Arcane but Useful Computer Virus Guideline
Try the Pomodoro Technique with Pomoglorbo
More systemd networking fun
What was once an elegant machine built up by the wisdom of thousands of volunteers is now a rusty bucket with holes: my Debian installation.
As I have recently fixed my interface configuration I thought I solved all my home networking problems.
On my local network, I rely on mDNS a lot. My macOS and Debian machines use it
find each other. To ssh
, mosh
, and sync git annexes between computers, I
use .local
addresses extensively.
The one where I leave it to systemd-networkd
I like keeping my Debian 12 installation bare bones. Sometimes bare bones means disabling your only link to the outside world by accident.
Finding my first bug in Hugo
Here are my notes on diagnosing a bug in Hugo. Hugo is the static site generator I use for this website.
fish and bash Variable Expansion
Adventures in Japanese Digital Transformation
I tried to get a new phone contract the other day because Line Mobile is being sunset. Since I live in Japan as an immigrant with a non-Japanese name. Closing new contracts can be a difficult experience sometimes. This article is about how I wasn’t able to get a phone contract with UQ Mobile.
Using tmux with the X clipboard
Sometimes I would like to paste shell command invocations from my browser into my terminal and use bracketed pasting, which is pasting without running the command directly.
Since I am running tmux (tmux 3.1c) inside of xterm, in an i3 and X.Org desktop environment, I also want to use the X clipboard. The X clipboard is used when copying text from the browser as well.
Pasting things into tmux
The X clipboard can be accessed through many different commands, such as xsel
and xclip
. I decided to use xsel
, since it appears to be shipped with
Debian 11 by default. Other than the clipboard, X also maintains two more
selections called primary and secondary.
ADS-B Aircraft Tracking at Home
Some smart people have found that you can turn a TV receiver made by Realtek (RTL) into a Software Defined Radio (SDR).
Here’s a quick write up on how I used my
RTL-SDR V3 receiver to see airplanes flying right
over me using the dump1090
app. FlightAware maintains the dump1090
app in its
current version.
The RTL-SDR is a cheap way to get started with software defined radios.

Photo of RTL-SDR receiver which I have purchased Open in new tab (full image size 662 KiB)
Notes on: Marx, A Very Short Introduction
Today, I have finished reading Marx: A Very Short Introduction by Peter Singer and have thoroughly enjoyed it. I purchased the 2018 edition, which even mentions hot topics such as the gig economy and its relation to Marx’s critique of capitalism.
Yet, the book falls short of defining capitalism itself as a contrast to communism. Peter Singer describes Marx’s philosophical background in Hegel and Ludwig Feuerbach. Then, Peter Singer examines the emergence of historical materialism in Marx’s work. Singer continues explaining Marx’s description and critique of capitalism and outlines what might have been communism under Marx. (while explaining that Marx was sparse on how communism should be implemented) Singer immediately says here that Marx’s predictions about the imminent collapse of capitalism have been wrong.
BIOS Modifications, Proprietary Firmware, and Wi-Fi on my ThinkPad X220
This Time It's Different
There’s a lot of recent hype around Generative Pre-Trained Transformer (GPT) based large language models like ChatGPT, GPT-4, and large language models in general. Communities like Hacker News are breaking out into a this time it’s different doom and gloom.
While no one can predict the future, we can at least think about some possibilities for what can happen and maybe think about what is less likely to happen.
To summarize, I do not see us approaching the Singularity soon. Still, the recent progress, especially around GPT-4, suggests that analogous to the word processor, spellchecking, code reuse, and other time-saving and accuracy-improving measures may make a significant chunk of our tedious day-to-day work superfluous and let us focus on the more essential things (vs. the urgent, but not important). Who is us in this context? We are knowledge workers. We use our knowledge of this world and intellect to shape information and communicate it to others. We devise new contraptions and schemes and strive to improve or exploit something.
Useful zsh Shortcuts
macOS Catalina introduced zsh as the default interactive shell. zsh is compatible with Bourne shell (sh) to a large degree and introduces many valuable extensions that make everyday productivity more pleasant. In this post, I list some shortcuts for the zsh line editor (also known as the command prompt) in its default configuration.
Software Development Ergonomics and RSI
Some rather intense keyboard clacking over the past years has resulted in me having to give my hands some time off work.
Installing the Netlify CLI on macOS Ventura with npm
If you’re like me, you love npm ci
. A lot. Until that one fateful day.
Japanese conjugation, from two perspectives
Learning a language is different when learned as a native language or as a foreign language. We take a look at how Japanese as a Foreign Language (JFL) learners and Japanese as a Native Language (JNL) speakers learn about Japanese grammar.
Errors in J
For the past month I’ve been using the J programming language to solve Project Euler puzzles. The language makes many of the tasks that otherwise take too long, especially with multidimensional arrays, pleasant to work on.
Updates to my blog
I’ve taken some time to enhance my blog with two useful features:
- SVG images generates are now embedded into HTML
- Automatic PDF conversion for posts
This post shows how I’ve implemented these two features.
Hakyll on Netlify
Happy New Year, from Tokyo
On April 15 2018, I moved to Tokyo, Japan. I suppose that changed a few things in my life.
What Hackathons Teach About Making Products
I like hackathons. Hackathons are competitions that typically run over two or three days and in which the participants—programmers and designers—solve a challenge to win a prize. Typically, there are a few challenges that are all based around some theme—blockchains, sustainability, and democracy.
Updating Smart Contracts
Update from 2025: the cryptocurrency boom of 2017 and 2017 and ICOs were an interesting time, huh? It’s not my cup of tea anymore. At the same time, I’d like for this post to stand here as a historical artifact, and encourage you to spend your time on more worthwhile things instead.
Thank you for reading my disclaimer. Please enjoy the following post:
As time goes on, smart contract requirements change. Often, a feature is added or a bug is found. But, once a smart contract has been deployed on the blockchain, it can’t be upgraded. The entire value proposition of a blockchain is immutability. Yet, in the real world, contracts change all the time. For example, a labor contract changes when new labor laws are introduced. Similarly, there are many circumstances under which smart contracts change as well, such as
Smart Contract Ownership
Update from 2025: the cryptocurrency boom of 2017 and 2017 and ICOs were an interesting time, huh? It’s not my cup of tea anymore. At the same time, I’d like for this post to stand here as a historical artifact, and encourage you to spend your time on more worthwhile things instead.
Thank you for reading my disclaimer. Please enjoy the following post:
When building your smart contract platform—whether on Ethereum or any other blockchain—at some you’ll be faced with the question of ownership. In this article, I explain three different types of smart contract ownership and discuss their advantages and disadvantages.
ERC20 Token Allowances
Update from 2025: the cryptocurrency boom of 2017 and 2017 and ICOs were an interesting time, huh? It’s not my cup of tea anymore. At the same time, I’d like for this post to stand here as a historical artifact, and encourage you to spend your time on more worthwhile things instead.
Thank you for reading my disclaimer. Please enjoy the following post:
Have you ever wondered how your users can spend
ERC20 platform
tokens to buy assets and other tokens from you? Or—in more technical terms—how
to make sure a smart contract executes a particular function as soon as it
receives tokens? This post is all about using the ERC20 functions approve()
and transferFrom()
to let your users do much more than keeping tokens in a
wallet.
3 Useful Python Code Patterns
Over the years I have found out how important it’s to constantly challenge yourself. Coding is craftsmanship. A good craftsman always tries to improve the toolbox they use every day. Code patterns belong in any good toolbox.
Anatomy of a Token Platform
Update from 2025: the cryptocurrency boom of 2017 and 2017 and ICOs were an interesting time, huh? It’s not my cup of tea anymore. At the same time, I’d like for this post to stand here as a historical artifact, and encourage you to spend your time on more worthwhile things instead.
Thank you for reading my disclaimer. Please enjoy the following post:
I had the tremendous privilege of speaking about creating sustainable token platforms at TokenSky 2018 in Seoul, Korea. I had a great time presenting some ideas that I’ve come across during my talk. I also encountered a lot of stimulating questions from individuals and companies all interested in enhancing their platform using some kind of blockchain token.
Designing a Better Web Analytics Platform
Few things a business owner has to go through are as scrutinous and unpleasant as a data privacy audit.
In Germany, this might include a state commissioner for data protection putting your company’s data processing and storage practices under the microscope. Luckily, as it turns out, most of the time you’ll already be doing the right thing. Salting user passwords, allowing customers to delete their account, and allowing users to request all personal data that’s being stored about them should be business as usual for most of us.
The Four Phases of a Data Science Project
Imagine this: you’re pitching an idea for an interesting data science problem that you can solve for your client. The client is sold on the idea and wants to immediately know how fast you can get it done, and more importantly, what the project milestones are.
Memory Usage of Pandas Categoricals
A great method to improve memory usage of Pandas DataFrames is by converting
columns with
categorical variables to
use the data type categorical
.
Effective Data Science Notebooks
I believe that being a data scientist is about communication first, and data science second.
transform()ing Like a Pro in Pandas
The Pandas API surprises me with a new feature or method almost every day, and I’ve again discovered an interesting feature.
Aggregating in Pandas
1. Introduction
The other day I caught myself writing one too many df.groupby()
in Pandas,
and thought to myself: isn’t there a way I can simplify and reduce the amount
of df.groupby()
calls?
Scaling from Pandas to Dask
1. Introduction
Scaling Pandas DataFrame aggregations can be tricky. I learned that while solving a specific problem involving aggregates on group by expressions.
When to use C and when to use Python
I’ve now solved the first 15 Project Euler challenges in C. But then, I’ve hit a road block. Let me explain.
Sharpening my InfoSec tools
After a long time of being complacent with my skills, I thought I should up my InfoSec game. I’ve been mainly busy with figuring out how to enhance app security in my work so far. That means I learned how to
The difference between 大切、大事、重要
Let’s look at how 大切、大事、重要 are different.
A brief UberRUSH overview and tutorial
Uber Rush provides cost-effective on-demand courier services. Companies can use it to deliver goods to their local customers faster. Uber Rush is Uber’s attempt at making a courier service that developers can integrate with low effort on their side. They provide an API which can you can integrate into existing shop solutions and lets your customers order cheap and shipping.
How to Replace Judges with Robots
The other day, I found out something real fun: not all bike lanes in Germany are mandatory to use. Since bike lanes are dreadful and not at all safe, I wanted to write a handy tool to show me when to use a bicycle lane and when not.
The Python 3 Statistics Module and Salaries
Python 3.4 introduced the statistics
module. It contains helpful methods for
determining basic statistical properties, such as mean, median, and standard
deviation of samples and populations.
Byte Histogram in Python 3
I had this curious thought the other day: what’s the byte value distribution in
binary files, such as an executable? Take for example /bin/echo
on OS X
10.11.1.
You should get Packing with Python 3.5
The new Python 3.5 unpacking syntax makes a programmer’s life much easier.
To avoid Robocallers, use Pandas
I found a neat data source online on unwanted robocalls that the Federal Communications Commission (FCC) , a United States government agency, has created and published openly. The data source provides times and dates of unwanted robocalls that consumers have reported to the FCC. We can use this data source to find out all kinds of things, but today we are content with just finding out the time of the day households are most likely to receive robocalls.
Parsing S-expressions with Python 3
This is a simple s-expression parser written in Python 3. It understands symbols and numbers and uses tuples to represent the data internally.
Tuples vs Lists in Python 3
Creating tuples from generator expression is fast.
Filtering Trees
Today we’re going to look at how to filter items in tree data structures using Python 3. We’re going to compare a stateful approach and a functional and recursive approach. Finally, we discuss the advantages of a functional implementation.
Exploring Python dis
As you might know, CPython, the most commonly used implementation of Python, uses a stack based virtual machine to run Python scripts.
This
means that Python script ASTs are never directly executed. Instead, CPython
compiles .py
script files into byte code files first (.pyc
files). This
lets Python perform some optimizations during the byte code compilation step.
You can then ship byte code files to end customers instead of raw scripts. This
is useful to make reverse engineering hard.
Ableton Live includes a CPython interpreter
for its Music Instrument Digital Interface (MIDI) hardware integration. It doesn’t let users look at the actual
hardware integration scripts though. Instead, Ableton includes all hardware integration scripts
in their compiled .pyc
form.
Programmatically Accessing Cloud Photo APIs
This is a short evaluation on whether one can perform a series of basic tasks using the APIs that cloud photo services provide.
Using Async Functions in Python 3.5
With the new async syntax in Python 3.5, defining asynchronous functions has become a lot simpler. In this article, you can see an example for this new feature.
5 Ways to Filter Items in Python 3
Given a list items
, that contains int
s and None
, produce a list that only
contains the int
values with their order of appearance preserved.
Who To Sue If Skype Spam Kills You
The other day I received this ominous message on Skype from an infected machine: