Haupz Blog

... still a totally disordered mix

Anki

2022-07-27 — Michael Haupt

At the beginning of this year, I took a two-week intensive course to learn some basic Chinese. The intense vocabulary and letter memorisation that came with this refreshed my interest in flash cards. Preferably in an electronic form that synchronises across devices.

Thankfully, there's Anki. Note that this is an unpaid and unsolicited ad. I'm just very excited about this.

Anki runs in the browser, on desktop, and mobile. It synchronises flash card decks across all of these seamlessly. It has a price tag on mobile, but it's worth it.

What makes Anki really strong is that the design of flash cards is up to the user. There are HTML and CSS templates. It also automatically generates multiple cards from any entered content; that is, if you have a note describing a front and back side of a card, it'll generate two cards so that you can exercise the memorisation both ways. Of course, the note formats are also editable.

In my case, with Chinese, my notes have three aspects: the German word, the Pinyin transcription of the Chinese word, and the Chinese letter. I've built three card templates - each of the three aspects can be the front side so that I can memorise everything in every way possible. When I add a new piece of vocabulary, three cards will be generated, and next time I go through the deck, I'll be given those three questions.

The spaced repetition logic in Anki, too, is configurable, of course. The amount of daily new cards is limited to a low number at first, but it can be changed for times of super intense learning (like these) to have a higher limit - and that's even possible to configure per deck.

Anki is a bit idiosyncratic at first, and takes some getting used to, but it's a true power tool. Definitely worth the price. Did I mention it has a plugin interface?

Tags: the-nerdy-bit

Programming and the Fine Arts

2022-07-09 — Michael Haupt

There's a certain kind of "strange" programming language that could be called "poetic". This is because programs written in these languages read like texts from altogether unexpected genres.

Expressed in the Shakespeare programming language, for instance, programs read like dramatic plays by a certain famous English poet. And Rockstar makes programs look and feel a lot like heavy metal ballads.

Of course that's all a bit nuts. What's wrong with that? After all, English author Tom Holt, in his novel Flying Dutch, notes that Wagner's opera Der fliegende Holländer is actually part of an accounting software system. (If I recall correctly.)

Tags: music, books, the-nerdy-bit

Watchy

2022-06-25 — Michael Haupt

As you may know, I love tinkering with electronics, and I like looking into crowdfunding projects that bring new tech on the table.

Some time ago, I assembled a Watchy. This is a wrist-watch with an e-paper display, sporting an Arduino-compatible open-source hardware and software platform. Here goes.

I ordered the Watchy kit, and the aluminium case (I like the metal more than the plastic case). The box with the main kit is neatly arranged and has visual instructions for the plastic case assembly. The ones for the aluminium case were easy enough to find. Since the display is an e-paper one, it came "stuck" in the last state from testing it was in (I like this about e-paper: it consumes energy only when it's updated, and then just stays that way).

The unboxing proceeded. Laying out all the parts in front of me, I got ready for the adventure. The first task was to connect the display to the logic board. The flat cable is a bit tender, so that required attention, but it worked just fine in the end.

Next, the battery had to be connected, and then there was a minute of anxiety waiting for the display to update from 00:00 to 00:01 - and it worked! I also tested the four buttons to see if they worked properly: I entered the system menu, navigated around in it a bit, and left it again. So much for the first-stage integration testing.

The next step was to mount the electronics in the aluminium case. I taped the battery to the bottom, which was really helpful because it would slide out and get in the way of the cable and logic board.

I then discovered that the logic board didn't fit neatly into the case, because there were some edges that protruded from it (remnants of production). I filed those off carefully, and gave the plastic buttons a similar treatment so that all parts had the smooth edges they needed for the case to be closeable.

Closing the case was rather finicky because the buttons kept moving about, but I got it done eventually.

The next discovery was that the four screws must not be tightened too much because otherwise the buttons will get stuck when pushed. That was an unpleasant discovery. I ended up tightening them only ever so lightly beyond the point where I can turn them with a fingertip. The top of the case sits firmly on the bottom, and nothing wobbles, but it's not a very safe feeling either. The parts don't fit too neatly overall. That's fine and tolerable for a crowdfunded hacking project.

Of course, the final step of assembly was to attach the straps, which have a nice mechanism for that.

Done. Next, I might write some software for this thing, and will probably adapt my nerdy Pebble watchface.

Tags: the-nerdy-bit

Reply-All

2022-04-01 — Michael Haupt

(Warning: maybe because it's 1 April, the post below contains a bit of irony. When you find it, feel free to keep it.)

You've seen them - congratulatory e-mails flooding your inbox, even if you're not on the receiving end of the celebration but merely a member of the cheering crowd. Thanks to "reply-all", they happen. I personally don't mind them much, but some people do take mild offence in being faced with the challenge of having to mark swathes of "congrats!" messages as read.

There's something to be said for both sides here. On the one hand, such a broadcast message, e.g., a promotion announcement, can be seen as primarily meant to notify the crowd of the news. Reply with heartfelt congrats, rejoice in the fact, cool, move on. On the other, the broadcast does have a social aspect to it in that it encourages the crowd to cheer, and he cheering gets amplified by itself.

Of course, there's an easy remedy. Instead of putting all recipients on CC, putting them on BCC and keeping just the intended recipient of the congratulations in the "To:" field will reduce the recipients of the "reply-all" flood to just the subject of the celebration and their manager (or whoever sends the message). The parties put on BCC can be mentioned in the message, for transparency.

I sense an actual research question in this: Will CC-reply-all flooding incentivise more people to congratulate the person, or will the ones who want to do this do it anyway? Is there an amplification effect in "reply-all"? If so, what does it amplify more, cheering, or grumbling? Does BCC-messaging have a contrary effect?

Who's in for doing an empirical study?

Tags: work, hacking, the-nerdy-bit

Nanoloop

2022-03-31 — Michael Haupt

The Nanoloop is a truly interesting thing. It's an 8-bit synthesiser-sequencer with an interesting and innovative user interface. Nanoloop started out as a Gameboy cartridge, and has since been released as apps for Android and iOS, and as a piece of hardware called Nanoloop FM. Documentation is scarce, and the whole thing invites to experimentation. Cool.

Tags: the-nerdy-bit, music

Magical Turing

2022-03-25 — Michael Haupt

A while back, I had written about Alan Turing's work, and how Turing completeness is the ultimate level for any programming language or abstraction - enabling any algorithm to be expressed in it. Hold tight.

It turns out that the very popular card game Magic: The Gathering by Richard Garfield is actually, provably Turing complete. There is a scientific paper that proves it.

I've got to take some rest now.

Tags: the-nerdy-bit

Contemporary CPU Architecture

2022-03-25 — Michael Haupt

Building a CPU (or other hardware device) emulator is a fun endeavour - I've built myself half a Z80 emulator in Smalltalk once, test-driven development and all.

However, writing comparatively low-level code in the 21st century is really old-school. You have to use contemporary technology for everything now. That includes building emulators.

Consequently, David Tyler has built an 8080 emulator complete with computer and CP/M operating system to run on the CPU. It being "today", he has of course applied what is en vogue. That means microservices (one for each opcode supported by the CPU, just in case you were wondering), Docker, and the like. It's super hilarious. In fact, it's a more than valid successor to this wonderful enterprise Java implementation of FizzBuzz.

Tags: hacking, the-nerdy-bit

A Makeshift Observatory for a Partial Solar Eclipse

2022-03-15 — Michael Haupt

One of the distinctly more nerdy things I've ever done was to optimise the machinery for observing a partial solar eclipse.

This was back in the Nineties. I was at a weekend workshop with some fellow students of electrical engineering and computer science, where we were preparing to be first-semester student tutors. As heavenly mechanics would have it, a partial eclipse was scheduled for that weekend, and we lacked the necessary equipment to observe it.

Being engineers, we came up with a makeshift solution. The key component was an overhead projector (you know these, don't you) the upper end of which we directed at the sun. With some fiddling, that gave us an image of the sun on the area where the foils are usually placed. We used a sheet of paper as the screen for our observations, and of course the intensity of the sun's image set that on fire instantly. OK, that didn't work.

I suggested to use a cup of plain black tea (no milk, no sugar). It had all the features that we needed: white surface, not easily inflammable, and the liquid had just the right amount of opacity to make the image clearly visible. A cup of tea was quickly obtained from the (somewhat puzzled) kitchen personnel of the place where we were staying (there was a narrow time window, so speed was required).

And it worked! We could see that sun cookie, with a piece bitten out by the passing moon, very clearly.

Sadly, I don't have any photographs of the experiment any more.

Tags: the-nerdy-bit

The Times

2021-12-05 — Michael Haupt

Date and time formats, oh, date and time formats. Having grown up in Germany, I was obviously used to DD.MM.YYYY, and sported the usual snobism when encountering that odd MM/DD/YYYY thing that just gets everything wrong. Yes, it enables fun things like "Pi Day" and "May the Fourth" (imagine me rolling my eyes), but it's too darn disorderly. I mean, doesn't even try to be consistent, going from somewhat specific to specific to unspecific in the date - and don't even get me started on the AM/PM mess.

Eventually, I came across the thing called ISO 8601, and, being the nerd that I am, grokked it instantly. I've been using it ever since, only taking the liberty to drop the first two Y from the YYYY (the century can usually be inferred) in handwritten notes. This beautiful little article uses all the right arguments I've always wanted to make, including endianness, so I'm done here.

Tags: the-nerdy-bit

Building Reform

2021-11-10 — Michael Haupt

It's about time I post some imagery from my Reform laptop building experience. (This happened months ago.) I'll document this mostly by sharing the images in chronological order below, and dropping in an occasional comment.

So it begins ... the Reform box and my beloved Ifixit kit. The second image shows all of the components, each meticulously wrapped in paper.

Here are the components. After the bird's-eye view, there are the trackball, OLED display unit, power supply, acrylic case bottom, the mostly pre-assembled case itself (closed and opened), keyboard and keyboard frame, mainboard, and miscellanea (including such important things as SSD and WiFi card).

It begins. The batteries need to be removed from the case, because they come somewhat pre-powered, and it's not a good idea to work inside the case with the batteries inserted.

Of course, I needed to ground myself prior to dealing with any of the more sensitive components. This was not a mindfulness exercise or something, but involved connecting myself to a power plug. Don't worry. I just connected to the ground pin. All is well.

First, I mounted the mainboard and trackball.

The keyboard came next, and after connecting some wires, it could right away be mounted into the case, followed by the OLED board. The keyboard frame completed the top, and I could return to the innards, to connect the keyboard to the mainboard.

SSD and WiFi card fit neatly into the provided slots. The final touch before mounting the acrylic case bottom was to reinsert the battery cells and connect the power to the mainboard.

A little bit of inspection revealed that I had broken one of the side panels by tightening one screw too much. Not a biggie. A quick check of the batteries showed seven fine cells and one that still needs to be calibrated.

Time to get real: booting up, connecting to the home WiFi, starting Firefox, and loading the Babbel homepage were entirely straightforward. Success!

The assembly was a breeze, mostly because of the perfect instructions. What I find remarkable about this machine is that it's entirely maintainable with just a screwdriver. The acrylic case bottom makes it quite a sight.

One other bit I really like about the machine is the "circle" key (top right of the keyboard), which is a direct gateway to the lowest level of the machinery. Pressing the circle key, followed by 1, turns the machine on, 0 will turn it off. Circle B will show the battery status in the small OLED display right above the keyboard - down to the level of the voltages of the eight individual cells. And so forth.

I've been working my way into the machine, exploring the Sway desktop (quite amazing, honestly), making sure some of the favourite software runs on the machine, et cetera. Stay tuned.

Tags: the-nerdy-bit

Code Pwnership

2021-11-08 — Michael Haupt

code pwnership: being in charge of a code base multiple clients depend on, having exclusive commit and release rights, and totally refusing to fulfil requests or consider pull requests.

Tags: the-nerdy-bit, work, hacking

Christopher Alexander

2021-11-08 — Michael Haupt

Christopher Alexander is an architect some of whose work is widely known in and has had considerable influence on the computer science / programming communities. Why is that?

Alexander coined the notion of design patterns and pattern languages, most prominently collected in his books The Timeless Way of Building and A Pattern Language. The idea of patterns - recurring abstract solutions for specific problems that can be applied to likewise abstracted problems - has percolated to the object-oriented programming research community, and a group of researchers called the "Gang of Four" subsequently published their seminal book titled Design Patterns: Elements of Reusable Object-Oriented Software. This book has spawned a wealth (some would say: plethora) of research in software design, first in object-oriented programming, and then reaching out to other paradigms.

If you've ever come across a Java class named SomethingSomethingFactory, you've seen a piece of the outcome of this.

Anyway, here's a documentary on Alexander and his work and thinking.

Tags: the-nerdy-bit

HOPL IV

2021-09-05 — Michael Haupt

The HOPL (History of Programming Languages) conference is a rare event - in 2021, it's only seeing its fourth instalment. The talks and papers at HOPL are typically larger descriptions of how certain programming languages came to be, or have developed over time. Many of the authors and presenters at HOPL are key players in the field, with long and impactful careers.

HOPL 2021 does not disappoint, and the pre-recorded talks are a treasure trove. There are talks from people who know about Logo, Clojure, JavaScript, MATLAB, C++, VHDL, ... to name just a few. Due to my own past, I'm sort of personally attached to this presentation on Smalltalk by Dan Ingalls. The Smalltalk programming language and its implementation were my main research area for several years, and I used Smalltalk VMs in my academic teaching. Dan Ingalls is one of the creators of Smalltalk who has been working with and on several generations of the language and its implementation since the Seventies.

To see a truly different language for a change, don't miss the presentation on APL.

And finally, there's a talk by James Noble and Robert Biddle. Just this much: these two never disappoint. Give it a try.

Tags: the-nerdy-bit

The Language Lover's Puzzle Book

2021-07-12 — Michael Haupt

A former colleague recommended me this book by Alex Bellos: The Language Lover's Puzzle Book. So far, I've only skimmed it, so I cannot give a fully formed opinion. What I've seen is really good though.

It's indeed a puzzle book. Every chapter begins with a vocabulary quiz. Each of the chapters, in turn, explains some things around broadly language-related matters. For instance, family relationships, ciphers, ancient languages, alphabets, computer languages, and so forth. The fun part is that many of the explanations, again, come in the form of quizzes. That should make reading - or rather, working - through the book really challenging and interesting. Of course, the appendix has all the solutions.

Tags: books, the-nerdy-bit

Turing Machines

2021-07-04 — Michael Haupt

The Turing Machine is a theoretical abstraction for the discussion of computability problems, and one of the absolutely key fundamental ideas in computer science. They were introduced by Alan Turing in a paper titled On Computable Numbers, with an Application to the Entscheidungsproblem, which was published in 1936. Any algorithm that can be represented as a Turing machine can be processed by a computer, and vice versa. Turing machines are the simplest abstraction for computability there is. Notably, there are Turing machines that describe Turing machines, proving they're, well, computable.

Any programming language that is Turing complete can be used to express any possible algorithm. Elegance is not implied, just sheer possibility. Thus, considerable sophistication, such as in languages like Haskell, isn't needed. A simple language like Brainfuck is Turing complete as well. Arguably, the "hello, world" source code in Brainfuck is not readily intelligible, but that's not the point.

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.

Turing machines are such a fascinating idea that people have even built Lego versions of them.

Anyway. I wanted to point to a really interesting book. Turing's seminal paper, while groundbreaking, is a bit hard to access because of its mathematical style. Charles Petzold has thankfully set out to take the paper and write a book around it that explains everything in great detail for a much broader audience. The Annotated Turing is a really fun read.

Tags: the-nerdy-bit, books

Ostersemmel Time

2021-04-09 — Michael Haupt

Happy Easter!

In my home town, Attendorn, there's a wealth of Easter traditions.

I particularly love the tradition of baking "Ostersemmel", i.e., rye/wheat/sourdough bread with generous amounts of caraway seed (good for digestion at the end of Lenten fasting, and oh so very tasty), shaped in a way vaguely resembling a fish (an ancient Christian symbol). Traditionally, those breads are formally blessed on Holy Saturday, and can be eaten only thereafter, or else. They taste best with butter and hard-boiled sliced egg or bacon.

If you're interested and can read German, check this out, otherwise ask me.

Ever since I live far away from Attendorn, I bake a pair of these myself for Easter. This year, again, mine were every bit as tasty as they had to be, and of course the family and me indulged big time.

Tags: the-nerdy-bit

Know Your E-Mail Address

2021-04-02 — Michael Haupt

I have an e-mail address at a large e-mail provider. A lady somewhere in Mecklenburg-Vorpommern with whom I share some naming details accidentally misused my e-mail address to buy some clothes online. Now I have her address and phone number, because the company chose to put all of those into the order confirmation e-mail.

In fact, things like this happen a lot, and since we're talking about personal data after all, I normally take some steps to sort this out. In some cases, I'd use postal addresses to send those people a friendly letter. This lady, I gave a call - her reaction was quite bewildered but she immediately saw the point. I've deleted that e-mail now.

While is may be funny, it's actually quite serious: people can easily expose personal data just by mistyping their e-mail address.

Some guy in the Ruhrgebiet has a freakin' phone contract with Vodafone that runs through my e-mail address. While Vodafone hasn't shared any address details in e-mail and also not exposed other things, I've still called them about the matter, only to be met with utter incompetence. The call center agent didn't understand the problem. His supervisor, to whom I ended up talking, promised to see about things but nothing has changed.

I was also once sent the personal retirement data, including birth date, address, and SSN, of someone in the US. This kind of thing is scary.

The most recent incident of the sort is, you guessed it, Covid-19 related. Some student at a university on the North American continent had accidentally used my e-mail address to register for a vaccination slot. Obviously, it was me who got sent the confirmation, date and time, and more details about the procedure. Happily, the notification e-mail also contained the student's phone number, so I sent a text message with the details, and things were good. Still, the whole thing made me cringe.

It's OK when someone misspells their e-mail address and accidentally uses mine. However I do believe companies should take measures to make it very hard for such accidents to have data privacy consequences, or for the accidents to be remedied. If I have to send in a lawyer to sort such things out (this can be interpreted as impersonation, even though it's somewhat inversed), that's a pretty high threshold.

Tags: the-nerdy-bit

I am ...

2021-03-28 — Michael Haupt

Once the connection clicked, this was too obvious to not be done. (Check this earlier post for a hint.)

Tags: the-nerdy-bit

Metropolis

2020-11-22 — Michael Haupt

Movie time. Fritz Lang's Metropolis (1927, watchable here) is a masterpiece. Your mileage may vary regarding the story, but take in the imagery. This movie inspired C-3PO, one Bat Man movie, and it has a Really Evil Frankenstein style Supervillain. And the sound track. The sound track! This is a silent film, but it features a large-scale orchestra playing a more than two hours long symphonic poem score that can easily be enjoyed without the images. Gottfried Huppertz, the composer (whose name I'm pretty sure you haven't heard unless you know the movie) was a genius. I fondly recall one occasion in Nikolaisaal Potsdam where the movie was shown, and an actual orchestra was performing the score live.

Tags: the-nerdy-bit, music

Catchy Music Openings

2020-11-15 — Michael Haupt

Do you know that feeling when a piece of music captivates you with the first few notes? I experience this in two different ways. One is that a piece of music just goes BAM! and ties me to the spot so that I can't stop listening. The other is that it gives me that "oh, this is interesting" feeling and makes me curious. Here are some examples. What are yours?

BAM!

"Oh, this is interesting."

Tags: the-nerdy-bit, music

Thesaurus Rex

2020-11-08 — Michael Haupt

For us language lovers, here's a nice hefty brick of a book that will make you chuckle and think. Thesaurus Rex is a dictionary of sorts. It's a bit in the tradition of Douglas Adams' masterpiece The Meaning of Liff (available in German as Der tiefere Sinn des Labenz), wherein Adams used the names of cities to ascribe to them meanings and concepts that we all know exist but didn't have words for so far. While Liff/Labenz originate in English, Thesaurus Rex originates in German, and, while doing a similar thing for naming as yet unnamed concepts, uses puns to that end. In that, it's more Joycean in its approach, which doesn't make it any less good.

One of my favourites is "Dellfin". To appreciate it, you need to know that "Delle" is a German word for "dent". Now, a Dellfin can be one of two things: (a) a dented dolphin, (b) the end of a computer manufacturer.

Thesaurus Rex is full of such goodness.

Tags: the-nerdy-bit, books

Laptop Purchase

2020-08-29 — Michael Haupt

A while ago, I backed the CrowdSupply campaign for Reform, an open-source laptop. There's a small Berlin based company behind this, the founder of which, Lukas F. Hartmann, is a genius. He likes to build things from scratch in an open source fashion. One example is an operating system. Another is the Reform laptop. Lukas and friends have designed the entire machine from the ground up, PCB layout, keyboard, case, and all that. The open source philosophy goes as far as making 3D printing instructions for the case parts available. The laptop is a bit clunky, but completely maintainable (no hardwired battery!). It's also a bit pricey and comes with little memory, but the idea as such has my greatest sympathy.

Future editions of the laptop might go even further open source. The current processor is still based on (proprietary) ARM architecture, but Lukas is already thinking about a RISC-V based machine.

In backing the campaign, I chose the package that involves me assembling the laptop from its parts. This is going to be so much fun. I've also agreed with Lukas to save him the shipping cost, and will pick up the box in person in Berlin, hopefully in December.

Tags: hacking, the-nerdy-bit

Conlon Nancarrow

2020-08-29 — Michael Haupt

YAML indentation patterns inspired this.

They did not inspire Conlon Nancarrow, who passed away well before YAML was even conceived of. Nancarrow wrote, or rather, punched, music for player piano. That's the kind of piano that will play music on its own from punched tape. Composing for this instrument, instead of for human piano players, can do interesting things because you don't really have to pay attention to the music being playable with human hands. You can experiment with very precise timing, geometrical patterns, and so forth. Nancarrow wrote about fifty "Studies for Player Piano".

Here's two examples.

Study no. 5 made me think of YAML, or YAML made me think of it. I wonder what happens if you feed this to Kubernetes. It sounds like crazy ants.

Study no. 3a is a bit more conventional. It's Boogie Woogie on steroids.

Tags: music, the-nerdy-bit

Pi Crunching

2020-07-05 — Michael Haupt

One of my numerous Raspberry Pis is now part of IBM's World Community Grid, crunching data to support finding a Covid-19 treatment.

Tags: the-nerdy-bit

Coding Lullaby

2020-06-21 — Michael Haupt

I thought I'd share a little ditty I once wrote. It's disgraceful but funny, I think. You might know the tune.

Coding Lullaby

Hush, little test suite, don't you break,
coder's gonna fix that bug ere you awake.
If that fix ain't gonna make you pass,
coder's gonna slap you right up the ... version history.

Tags: the-nerdy-bit