Chronodget

| Tags: dev, app, widget, ios

Chronodget Binary Clock

iOS 14 brought us widgets. I started playing around with widgets just after iOS 14 was released last year, but I soon decided that I really don’t need any of those widgets the apps I used offered. It might be useful to have a calendar widget, a todo widget and a weather widget if you have a tight schedule and much on your todo list, but gladly that is almost never the case for me.

But one day I was in a grumpy mood and thought that a widget showing me a progress bar to the end of that pandemic year 2020 would be useful.

As I wanted to learn SwiftUI, a new way to build UIs for iOS apps, and generally to again do more iOS development than I had the chance to do in my job at that time, I decided to write an app for that.

Clocks aren’t that much different from yearly progress bars. They also change over some period of time. The idea for the app expanded to be a widget builder for widgets that somehow periodically or in a fixed time frame change. Progress bars would get filled and clock hands would move.

With that the name for the app — “Chronodget” — didn’t take long to manifest itself. It derives from “chronos” as the greek word for time and “dget” which is the suffix of “widget”.

At first development was rather slow. I only tinkered with the app on weekends. But after quitting my job in April, I began a sabbatical phase and started really working on the app.

And now it’s here. It’s free and available for iPhones and iPads running iOS/iPadOS 15 and you can get it from the App Store.

As with all things I create, there’s a new creations page with some more screenshots.

The Midnight Library

| Tags: book, fiction

In “The Midnight Library” by Matt Haig a 35 year old woman decides to end her life. In her opinion that life has been a series of bad decisions. And nobody needs her anyways. So there is no reason to keep going on.

But instead of just dying after taking some tablets, she awakes in the Midnight Library where she can try out all those lives she might have had, had she made some other decisions.

It’s a deeply philosophical book ending with a predictable conclusion. But the way to that conclusion is a nice story worth reading.

Alif the Unseen

| Tags: book, fiction, fantasy, sci-fi

“Alif the Unseen” by G. Willow Wilson is a nice mix of fantasy, science fiction and something I’ll call islamic mythology.

Alif is a hacker living in an unnamed emirate. He and his fellow hackers are fighting for their freedom against a hacker working for state security known as “the Hand”. The Hand tries to enforce total control over the citizens of the emirate.

Alif writes code. That code seems to be some form of machine learning software. Later a book named “The Tousand And One Days”, which is somehow a counterpart to “The Tousand And One Nights”, appears and seems to contain some hidden instructions that enable Alif to code an artificial intelligence.

It’s quite a ride with djinns, references to Star Wars and other nerdy stuff. Some compared it to the Harry Potter books, but it’s actually a different kind of story. There is something that resembles the “Diagon Alley” in the Potter books, but that’s about it. And that’s Ok. It does not need to be some new Harry Potter thing. It’s good as it is — on its own.

The Raven Tower

| Tags: book, fiction, fantasy

“The Raven Tower” by Ann Leckie is a strange book. The strangeness starts with the usage of the second person singular. I actually don’t remember to ever having read a book where the narrator tells the protagonist his story.

The narrator is a god who lives in a stone. The chapters alternate between those where the god tells its own story and those where it tells the story of the protagonist.

As a god living in a stone or being a stone, it is a very patient god who takes its time to think things through. The world in this book has no real magic. But there are many gods and gods can make things true. If a god says that something is some way or another, then it becomes that way. But each such statement costs the god some energy. And some statements may continually drain energy from a god or may require more energy than the god has. If that is the case the god dies. So gods are normally very cautious what statements they make. Gods get their power from prayers and offerings.

It’s a quite interesting system. People pray for things and make offerings to their gods. The gods gain energy. But now they need to consider whether to fulfil the wishes the people pray for or not. Making the wishes come true costs energy, but not doing anything will eventually diminish the number of worshipers.

After the first bewilderment about that usage of the second person singular, I got really fascinated by the stories. This is not another Tolkien-like story where a group of companions fight against some dark power.

I recommend it to anyone looking for fantasy that breaks out of the box.

The Queen's Gambit

| Tags: book, fiction

I saw that there is a new series on Netflix called “The Queen’s Gambit” but ignored it. It’s something about chess players. I’m not overly interested in chess although I know the basic rules. Then the book appeared in Amazon’s English Kindle deal of the month for just 0.28 € and I bought and started reading it on a whim.

The author — Walter Tevis — tells the story of the orphan girl Beth Harmon, who discovers her talent and passion for chess while living at an orphanage.

It’s a coming-of-age story with an emphasis on dealing with the pressure to strive for ever greater successes and the fear of failure. There are phases of drug and alcohol abuse, of desperation and of again finding the power to keep going.

Even though the book is full of chess technicalities — a great part of the book is about people playing chess and trying to predict the next moves of the opponent — it turned out to be very engaging and fun.

The Book Thief

| Tags: book, fiction

“The Book Thief” by Markus Zusak is a bit strange. It is narrated by Death and Death jumps around a bit and sometimes spoils parts of the later story. The story takes place during the second world war — at a time when Death had much work to do — in a small German town not far away from Munich. The story evolves around Liesel, a girl who lives with her foster parents. Liesel steals books. When she steals her first book, she cannot read, but she is very determined and learns it gradually.

Many novels about that time are about the victims of the war, how they hide, try to escape and are murdered in concentration camps. This is a story about the people who just try to survive. It’s about children who learn to “Heil Hitler” correctly and who go to the Hitler Jugend because that’s what they are supposed to do.

It’s not a justification or an excuse for anything. It just shows another aspect of that war and that somehow the common people are often losers of wars — even if they belong to the side of the aggressor.

It liked it for for its interesting style of storytelling, the memorable characters and the insight on the life of common people during that time.

A Little Life

| Tags: book, fiction

“A Little Life” by Hanya Yanagihara is an unusual book — at least for me. The books I usually read have some conflict that needs resolving or at least there is some kind of climax they strive to.

This book tells the story of four friends and their acquaintances. It starts when they all are in their early twenties and ends 40 years later. The book is narrated from changing perspectives. Most often one of the four friends is the narrator and sometimes others do it. Sometimes the time jumps forward a few years and sometimes only a few days.

That sounds totally confusing, but it is quite suspenseful. The characters have all diverse and interesting personalities. Although there is no big excitement there, it’s always interesting to read how the lives of those friends flows and changes.

One of the four friends had a difficult childhood that is gradually revealed and one could say that the final revelation of the last bit of it is the climax. But it doesn’t feel like it, because by then you already know that something has gone really bad here.

The book demonstrates in its own very specific way how childhood experiences may have lasting and insurmountable effects on the later life.

It’s a sad book about friendship and suffering. I recommend it as the most meaningful book I’ve read this year.

Salvation

| Tags: book, fiction, sci-fi

Peter F. Hamilton is a British science-fiction writer and he mainly writes space operas. There are always the same types of people in his books. It’s probably similar to when you read the 20th crime book by a crime book author. The people feel familiar, their interactions also, but there’s always something new and when you like the author’s style of writing and storytelling, it’s satisfying to come back and read something new by them.

After having been somewhat disappointed by the Chronicle of the Fallers more than three years ago, I returned and read “Salvation” which is the first book of a trilogy.

“Salvation” is definitively better than the Chronicles but not as good as the Void trilogy or my favorite Night’s Dawn.

It’s a bit of “Ender’s Game”. There are kids training in a zero G environment for a battle against alien enemies. Another part reminded me of classical crime stories the likes of Miss Marple. People sit together in a room, drink and eat and by and by each one tells a story from their earlier life while one of them tries to find out which one is the alien. This is a science fiction story where looking for an alien is more natural than looking for a murderer after all. And it’s all packed in a typical Hamiltonian space opera setting. There are the portals we already know from the Commonwealth saga, but while back then trains passed through them, here people just walk through them and it makes no difference if you want to go from London to New York or some city on another planet. It’s all just a step away.

“Salvation” is a fun and satisfying read for Hamilton fans. If you haven’t already read anything by him, his earlier works are a better and more exciting entry point.

Dark Mode

| Tags: dev, web

Most software developers seem to prefer dark themes. Their IDEs, text editors and terminals use dark background colors. My preferences are exactly the opposite. I use dark text on bright backgrounds. When dark mode was introduced in macOS and iOS and later got supported in web browsers I ignored it and kept on using the default modes which are dark text on bright backgrounds.

While redoing and modernizing the CSS on another web related project I also added dark mode support there and realized that it’s quite easy to do. Just add a media query and add style rules with adapted colors

@media (prefers-color-scheme: dark) {
  body {
    background-color: #2B2510;
    color: #D5D5D5;
  }
  ...
}

My website uses only a handful of colors and I got the idea that I really didn’t want to change the palette to something totally new. The light mode and dark mode palettes should be related. So I darkened the background color and brightened the foreground colors and got from

Light Mode

to

Dark Mode

I’m happy with how it turned out. Now dark mode users can visit my website and won’t be shocked by the sudden appearance of a bright web page.

In hindsight I could and should have added dark mode support much earlier, but better late than never as they say.

Epigraver

| Tags: dev, macOS, screensaver

I created a macOS screensaver that displays and animates the output from command line programs on the screen. You can find it on its GitHub project. The rest of this post provides some background infos about why and how I developed it.

Many years ago — then on a Windows desktop computer — I always used some kind of screensaver. With CRT monitors that didn’t have any kind of power save mode, using screensavers was more or less mandatory.

Then I started using laptops and notebooks and external LCDs. I either just closed the notebook or initiated a locked screen mode. In both cases the monitor switched off and then switched on again when I returned. Then someday I read somewhere that those monitors age every time they are switched off and on again. So, maybe switching them off every time I took a break from working wasn’t a good idea.

I browsed through the screensavers shipped with macOS and chose one that painted nice patterns on the screen. That looked nice but after some time I realised that the fans on my notebook where spinning more while running the screensaver than while I was actually doing work on it. That didn’t feel right. I changed to a screensaver that displays word definitions from the dictionary. That was informative and the fans stayed mostly silent.

After some time that started to become boring and I though “Wouldn’t it be fun to have a screensaver displaying quotes and other funny texts like the old fortune program?”. A search for such a screensaver didn’t result in anything useful. There are some mentions of some Linux screensavers that do this and maybe there is a port for macOS somewhere but I actually didn’t follow that path.

I found that although fortune isn’t shipped with macOS, it can easily be installed via HomeBrew.

In August 2018 I started developing a screensaver I just called “Fortune” as it was meant to call fortune and display its output. I haven’t developed any macOS applications before and screensavers are a speciality that is somewhat sparsely documented. And there are also some additional pitfalls when developing a screensaver in Swift. But looking at open source screensavers helped. And after some days I actually had a working screensaver with one animation.

As time went by I added more animations and more color sets.

I was happy with how it looked then, but I thought that other people might like it and maybe I should make it open source. This is when questions started to come up. What if someone has somehow changed their HomeBrew configuration and fortune wasn’t installed in the default location? The screensaver would need to allow the configuration of the location of that program. But when I add that, why not allow to configure any command line program or script that generates textual output? There is an offensive variant of fortune, but I probably don’t want that to run while I’m at the office. I need some location awareness here. Fortunately I can distinguish where I am just by looking at the name of the WiFi I’m currently on. At this point selection based on weekdays and on the current time was an obvious addition.

Now the name didn’t fit anymore. Although I still use it to run fortune, there is more to this screensaver than that. Naming has always been a challenge for me. Sometimes just taking a sentence that describes the function and then arranging parts of the words to a name worked quite well — as in the case of Osmorc —, but sometimes it didn’t. And it didn’t work here.

I came up with the name “Epigron”. It’s something with “epigraph” or “epigram” but changed to make it a unique name. It didn’t take me long to make fun of that name myself. Just pronounce it a bit differently and instead of “epi gron” you get “epic ron”. What epic Ron is that? Ron Weasley or what? After some more thinking I settled on “Epigraver”. There is still something from “epigraph” and there is “graver” and as a graver engraves some text on some surface, the screensaver puts text on the screen — though not as permanently as a graver. And the other way to read it — epic raver — is also nice. In some way the screensaver raves all those textual outputs.