Skip to content

Category: Computer Science

Kissing “sex enum(‘m’, ‘f’) not null” goodbye.

The german constitutional court just created a major database upgrade problem, for good: They mandated a positively stated third gender.

That basically makes this code illegal:

  sex enum('m', 'f') NOT NULL,

as this would force a decision between the only alternatives male and female. Also, code like


Power budgets for computing resources – portable and stationary

A cellphone or tablet is a fanless device. So is the 12″ Macbook. That means you can do whatever is possible at any point in time within a TDP of approximately 5W.

Here is the power consumption of my cellphone over a 12h period. The scale on the left is mW, down is discharge, up is recharge (plugged in). It’s basically limited to 5W, and that only for short periods of time.

Cellphone power over time. Green bar = plugged in. Yellow bar = Screen on.

These devices also have batteries, and when they are running on batteries, they need to be sleeping most of the time and have their display off. Whenever they are not dark and/or sleeping, they drain the battery, fast.

Leave a Comment

Every Conversation ever held

So, let’s do this again, but this time cleanly. In a Facebook Post, Michael Seemann has been explaining why the Facebook App does not listen to every word you ever say, all of the time.

He is right. A telephone is a device with limited power supply, limited cooling and limited, metered connectivity. It has an operating system that monitors and manages these critical resources, hard. You can’t listen to things all of the time and expect not to be noticed. Like, “the battery is empty and my LTE budget is gone” noticed.

Other devices, an Alexa, a Sonos One or a Google Home, are on cabled power and unmetered Wifi. The could theoretically get away with listening all of the time.

So how much data is that? Let’s do the math.


Unicode is over and it dies over Emoji

In 1982, Scott Fahlmann invented the use of :-) and :-( for marking up emotions or semantic context in written online communication. That was a great idea.

The :-) is just a symbol for an emotion. It is specifically not a human face, it does not have a hair color, eye color, skin color or other human attributes. It is universal.

Then some cellphone maker turned that into ☺︎, anthropomorphising it. Come as it must, we soon get color, and it turns into 🙂. That Simpsons yellow was read by some as white and non-inclusive, and here is where things start to break down.



So there is Backblaze B2. It’s a service where you can buy bulk disk space online for backup and restore.

I have a Linux server at home, which many harddisks and which downloads and saves all data from the various dedicated servers and cloud instances, receives several time machine backups from the inhouse Apples, and has local git repositories and stuff.

I mirror these things from the production filesystems to a set of mostly offline disks once, and I wanted an off-site backup as well for crash recovery. Bandwidth is not a problem, we are living on FTTH with 500/500.

So there is rclone for this. It’s like rsync for B2 or other services.

Like so:


How to Debug “My Mac won’t go to sleep”

In Terminal,

pmset -g assertions

The pmset program debugs power management. Assertions describe the system state as perceived by power management and if and when the system can go to sleep.

Example output:

$ pmset -g assertions
2017-11-02 16:31:14 +0100
Assertion status system-wide:
BackgroundTask 0
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 1
PreventSystemSleep 0
ExternalMedia 0
PreventUserIdleSystemSleep 1
NetworkClientActive 0
Listed by owning process:
pid 1310(Google Chrome): [0x00012f7c00018f49] 00:00:40 NoIdleSleepAssertion named: "Playing audio"
pid 1310(Google Chrome): [0x00012f7c00058f48] 00:00:40 NoDisplaySleepAssertion named: "Playing video"
pid 241(coreaudiod): [0x00012f7c0001810f] 00:00:40 PreventUserIdleSystemSleep named: ",0,1,1:0.context.preventuseridlesleep"
Created for PID: 1310.
pid 113(hidd): [0x0000957f0009876f] 49:51:56 UserIsActive named: ""
Timeout will fire in 10796 secs Action=TimeoutActionRelease
Kernel Assertions: 0x10c=USB,BT-HID,MAGICWAKE

UserIsActive, because I type right now.

PreventUserIdleDisplaySleep because coreaudiod (pid 241) has been asked by Chrome (pid 1310) to do this. So the screen won’t blank because Chrome is doing a video playback.

PreventSystemSleep is 0, so the system will sleep when I close the lid.

If you have for example Internet Sharing or Screen Sharing enabled, you can see PreventSystemSleep here:

pid 77674(screensharingd): [0x000155590007906d] 06:30:03 PreventSystemSleep named: "Remote user is connected"

This will also set PreventSystemSleep to 1 in the overview list “Assertion status system-wide”.

Leave a Comment

What GPUs can do…

Pcgamer reports “Nvidia CEO says Moore’s Law is dead and GPUs will replace CPUs“. Now, Jensen Huang might be a bit biased here, but he reminded us that “GPUs are advancing at a much faster pace than CPUs” and “that GPUs will replace CPUs soon, adding that at this point, designers can hardly work out advanced parallel instruction architectures for CPUs.”

So what can a modern GPU do? Well, apparently Font Rendering is still a hard problem for GPUs, and a bottleneck in modern browsers. That’s not to say it’s not being done – the linked article contains lot of pointers.

And an older article about the Ubershaders basically explains how the Dolphin GameCube/Wii-Emulator uses modern GPU hardware to live-emulate 2002/2006 GPU hardware, in realtime (for a short time, while the CPU in the background creates more optimised precompiled GPU setups and code).

Leave a Comment