# Posts about Computer

I had my first computer with 5 and started C programming when I was 13. Then I made some simple websites using PHP which grew into ever more complex ones. In 2007, I created some Java applications, some of them are still among the portfolio on this page. While I was an intern at the DLR, I started to learn Python and IDL, which introduced me to matrix based languages. For the numerical methods lecture and especially my bachelor’s thesis I used C++11. During my master’s thesis I have learned Haskell for fun. Later on for my PhD thesis I also learned R and the Wolfram Language.

This section of my site is for articles about programming practices and performance tests. Also various stuff about computer hardware and software.

# Hard vs. Soft Line Wrap

When editing text, I have been using Vim so far. My text documents were either Markdown, reStructuredText or LaTeX. All of them are just source code in some sense, the output format HTML or a PDF in a browser. Single line breaks do not matter in either format, it takes a blank line in between to separate paragraphs. Therefore one has the freedom to insert line breaks within a paragraph at will without it meaning anything semantically.

For a long time I have used hard line wrap. This means that I let my editor insert a line break after 79 characters per line, limiting the line length to 80 characters (including the line break \n). The alternative is soft line wrap where the editor does not insert line breaks into the source code but just virtually wraps the lines for display such that it fits. This latter approach is what one is used from word processors like Microsoft Word or LibreOffice Writer. Also it is used in virtually all web forms.

The soft line wrap looks like the following picture in an editor. You can see the line numbers and as such each paragraph only has a single line number. The text is wrapped in a soft fashion that is just done to fit the window for viewing.

Read more…

# Markdown Editors (on Fedora)

I use Markdown a lot to create notes and reports. Since April I also use it for my website. And actually I write my dissertation using Markdown as well. All this time I have been using Vim for editing all my text files. For Markdown I wanted to try a few GUI editors with instant preview.

Although there are tons of editors and Fedora Magazine has tested NoteKit, Joplin, MindForger, Remarkable, Ghostwriter, UberWriter, Marker, and Ghostwriter, not all of them are in the Fedora repository. Only Apostgrophe (apparently formerly UberWriter), Ghostwriter and Marker are in the Fedora 32 repository. As there are already enough choices, I did not go to install more external repositories. By searching the package index for “markdown” I was able to also find Notes-Up.

I have used each of them for a bit and want to share my impressions. So far I still use Vim for most of my editing, but I found it nice to work with Marker and Apostrophe for a change.

Read more…

# Headsets for Every Purpose

Over time I've accumulated a unsettling large number of headsets and headphones. And unfortunately I have yet to find the one that performs well with all tasks. Likely this is not even possible as there are just contradictory requirements. So at the moment I have four different ones which all have their niche.

The best sounding headphones that I have are the Sony WH-1000XM3. They just sound really great and have active noise canceling. I use them in the office and on the go. They connect via Bluetooth to my phone and I can also use them for calling. As they have built-in microphones and were rather expensive, I'd expected them to perform good in phone calls. However, they audio quality sucks so badly that people regularly tell me that they just cannot understand me. So I just cannot use them for calls. Then the Bluetooth chip in my laptop is so outdated (from 2011) that it can only connect via some fallback audio protocol and I can only use them as headphones, not as a microphone. And quality is worse than with my phone. So with the laptop I sometimes use the cable to connect them.

The Sony headphones have pretty much replaced my Sennheiser HD 485. These were fine for the budget that I had at the time. The ear cushions have dissolved over time, so I replaced them, and the new ones are also rather dissolved by now. Guess they were not built to last in this price segment. I did like the sound at the time, but I dislike that one cannot take off the cable on the headphone part. A broken cable therefore means soldering work. Their advantage at home is the acoustically open design, though. This means that I am not completely shielded from ambient sounds but rather hear my own movements. This is more relaxing at home, also I can hear when people try to talk to me.

Read more…

# Video Conference Experiences

During the pandemic I work from home, just like most office workers. To keep in touch we use video conference tools. But as we did not have anything set up before, we needed to find something that works sufficiently welt. Also with the GDPR it is not that easy to just take anything.

It turns out that none of the tools are quite satisfactory, there always is a bunch of friction.

The first that we tried is the DNF Conf system by the German Research Network. It uses WebRTC, is hosted in Germany and fulfills the GDPR requirements. Also it supports presenting PDF documents. Unfortunately it has been hopelessly overrun and it took a month before they ramped up resources and users went to other services such that it is mostly usable now. On my laptop is uses a lot of resources.

The second thing that we have tried is Jitsi Meet on their site and then also hosted an instance on our own. I like this the best so far. It also uses WebRTC but supports keyboard shortcuts for muting the microphone and even has a push-to-talk feature. But somehow the resource use is quite high and the members of our group with flaky internet connections would be cut of all the time.

For Android there is an app, that seems to work just fine also. I have used it occasionally and am quite happy with it.

Read more…

# Cloud Backup for Linux

I routinely do backups on external hard drives using backintime. It is a tool which uses hard links to create snapshots with deduplication. Restoring is super easy, either use the tool or copy files manually. The directory hierarchy had a directory with time as filename and your whole directory tree below that.

As I only do these backups every couple of weeks, there is a gap of time during which I could lose data. Also on the go I want to have backups. My PhD thesis draft is in a private GitHub repository, so I can just push to that and have a backup in the Microsoft cloud somewhere. For everything else I need something else, so I started researching this a couple years ago. Backblaze offers a software client and unlimited cloud space for 5 USD/month, but just for Windows and macOS.

The SpiderOak service was recommended by Edward Snowden, so i tried that. It works with Linux and has encryption already on my laptop. I just needed around 150 GB of space, they used to charge 10 USD/month for that tier. Their client looks nice to use and I quickly had set it up with the free trial. It took a while before it actually started to upload things. And it seemed to use quite a bit of resources, I guess for encryption and file hashing.

My friend Simon, who had the same problem, discovered that one could also use duplicity with the Backblaze B2 storage backend. Their rates are really affordable and so I had a look at that. One can store unlimited data there and is billed proportional to the amount. I ended up paying a few EUR/month for the service, so it was cheaper than SpiderOak.

I want to show how I did it with duplicity and why I am now back with SpiderOak.

Read more…

# Bash and Spaces in File Names

On LinkedIn one can specify skills that one has as a collection of keywords. Contacts can verify these skills by vouching that one has them. A recently added feature is that one can take a 15 question multiple choice test and show a badge if the test result lies in the 0.7 quantile or above. In principle a nice idea.

The tests for C++, Python, R and Git seemed sensible, The one about Bash was rather well for the most part, except for one question:

In order to write a script that iterates through the files in a directory, which of the following could you use?

1. for $ls; do …; done 2. for$(ls); do …; done
3. for i in $(ls); do …; done 4. for i in$ls; do …; done

Well, the third one will get the job done under a lot of dangerous assumption from the programmer, so it likely is the “correct” answer. But is is terribly brittle and I would never accept that in any code that I review. Let's take a look at this and make it fail.

Read more…

# Learning New Programming Languages

Over the time I have learned a lot of programming languages. DOS batch scripts was the first, but that is not really programming, more scripting. Later I started to learn C but got stuck at pointers. At that age I just did not understand this concept from the book I had. My father has showed me HTML and then PHP, I started to create my personal website with that. And then with PHP I was able to program things that other people could see and try out on my website. Then I wanted to write GUI applications and came to Java, programmed a bunch of little games with that. During my high school I also needed to learn Pascal for my computer science class but never gotten far with it.

During my work at DLR I started to learn Python and used it for data analysis. Then at university I attended a course in C given by two very funny mathematicians. This gave me a completely fresh start into C and I shortly after wandered off into the C++ world and still really like it there. I used GNU Octave (the free clone of MATLAB) for my lab courses first and then switched to Python for that task. I picked up Bash scripts somewhere along the way, did some scripting in Vim. Eventually for my master thesis I could do even more C++.

And then during the PhD I seemed to have picked up another trove of languages. My advisor has an R library to analyze the data that we see in that field. PhD students have tried to rewrite it in Python which they liked better, but it just lacked features and maturity. It turned out that learning R was really straightforward at this stage. It just took me a few weeks to get going in the language and after a few months I had the impression to really feel the language. I also picked up Haskell for fun and the Wolfram Language for a specific task.

But why am I writing all this? The interesting thing here are the decreasing costs of learning a new programming language. Just as with spoken languages, the programming languages fall into categories. The very first language you learn will be tough because you will have to learn that particular language but also programming and also patterns. The second language will be easier as you already know how programming works. But you might not have seen enough diversity to abstract the patterns that are there. So the second language will be about that language and abstracting patterns. Just as I learned a lot about German grammar while learning English and having to formalize the concept of grammar.

Read more…

# Log Analysis with GoAccess

Several years ago I used Matomo to analyze the traffic that I have on my website. This is a PHP application that uses either JavaScript or a pixel image to track the user's action on the website. It gave me a list of the most popular pages and also told me how people got to the “page not found” page. I could go ahead and improve already popular articles and fix redirections.

There have been somewhat frequent updates to Matomo which I had to install due to security. I did not want to have unpatched PHP stuff on my web server. My website has been static and zero maintenance at that time, so I got annoyed. At tomes I updated Matomo more often than I actually looked at the data. Then came the GDPR and I ditched Matomo because I was not entirely sure what sort of privacy statement I would need on my personal website.

This left a gap and I have thought about filling it. I wanted something that did not require me to update stuff on the server regularly. So I thought about Google Analytics as I would just have to add their little bit of tracking JavaScript. But then all the data would go to Google and it would be even worse than Matomo regarding the GDPR. My web hoster provides logs processed with Webalizer, which look terribly old fashioned. Luckily I have found GoAccess and can download the logs via FTP.

Read more…

# Sphinx to Nikola

As you can likely tell, my website looks different now. For a very long time I have been using Sphinx with a custom theme for my personal website. It has served me rather well, but over the time I have been pushing it into ways that are not really how it is designed. Foremost it is a documentation generator. As such it has a hierarchical structure and does not support blog posts or RSS feeds. Some of my content is “timeless” like the study material, but other things slowly outdate and would rather fit into a blog structure. There are extensions to Sphinx that try to add these features, but I rather decided to move it to Nikola instead.

In this post I will describe how I have made the transition and what was needed to get the content moved over.

There is a nice overview of static website generators that lists many static site generators. There are many to choose, but I want to stick with one that is fairly popular and won't have it's support dropped soon. Also it should be mature, I want to keep going with it for a while into the future. In the past I already looked at Pelican and Tinkerer but found them rather cumbersome. And I have looked at Nikola in the past already. What put me off was that it only had two levels of hierarchy for the pages. This seemed to be very limiting at the time, but now I see it much more relaxed and just moved.

I am looking forward to now have it easier to write blog posts and have a better suited tool for that task such that I can concentrate solely on writing the content.

Read more…

# Catch-All E-mail Addresses

Most people have an e-mail address like firstname.lastname@provider.example where provider.example is an e-mail provider. They have only this one e-mail address and give it to every service where they sign up.

I use my domain martin-ueding.de, and I can have virtually unlimited e-mail addresses on it. For a while now I had been using the concept of service e-mail addresses. So when I created an account for buying from the renowned widget store store.example, I would give them store.example@martin-ueding.de as my e-mail address.

Read more…

# Logistics of Computer and Board Games

There is a vast array of computer games available. There are single player games without a campaign (Tetris, Mine Sweeper) that you can just play without preparation. Then there are games with a story (The Witcher, Mass Effect, Bioshock). These solitary games are not the scope of the articles. Rather I am concerned with multiplayer games. And there are the kind of cooperative games (Saint's Row, Borderlands, Diablo) and the competitive games (MechWarrior Online, World of Warships).

The multiplayer games can be played on the same computer either via split screen (Need for Speed 3), shared screen (Little Fighter 2) or taking turns with a hot seat (Worms). Other games require a computer for each person and can then be played over the internet or local network (Splinter Cell Blacklist, Borderlands). With these types every player needs to have a license for the game.

The time of split screen games was when laptops were super expensive, only few people had desktop computers and internet access was not available everywhere. Playing with multiple people on the same computer was quite normal. And consoles had the same user experience with up to four players in a lot of games. Even people without computer game experience could just join for a session at no extra onboarding cost.

Read more…

# How should I buy my books?

These days one can get a lot of books electronically. I am still not sure whether I prefer books in paper or electronic form. It seems that in principle I prefer electronic books, but the way that one can actually buy them is against my preferences. This is is the crucial distinction that will lead to a conclusion.

## Electronic vs. paper

Let us first discuss how electronic books relate to paper books. I will go through the various things that came to my mind.

First of all, electronic books do not require physical space. That means that I can have all of them on my laptop or reader. Additionally I could also have them on my phone if I wanted to. This is great, and I can also go through as many books as I want without them cluttering up my flat.

Read more…

# Attaching a Display

Personally and professionally I have seen my fair share of display connectors. At this point it has a Kafkaesque complexity. At the theory department we have computers ranging from around 2006 to current ones. This means that we also have all kinds of display connectors on the workstations and tablets:

• DisplayPort, VGA
• VGA
• DVI-I
• DMS-59
• DisplayPort, HDMI, VGA
• DisplayPort, HDMI
• Mini-DisplayPort
• Mini-DisplayPort, VGA
• DisplayPort, VGA
• HDMI, VGA
• Mini-HDMI
• Micro-USB

Read more…

# Emoji Keyboards

These days I include a lot of emojis in my chat messages. Back in the day one would write stuff like :-D or include some little pixel graphic, but now we just have unicode symbols for this: 😃. Since these symbols are not on a regular keyboard (except perhaps for laptops with touchscreen bars above the keyboard), one needs to enter them somehow different. And this is where it starts to become really inconsistent.

When editing text with different word processors and text editors, you will find that they all have their own spell check dictionary. You start adding words in Vim and when you copy parts of it into an email with Thunderbird, the spell check will not know about your new added words. This makes spell check less useful. On Android your user dictionary is system wide, but that does not help me on the laptop.

Read more…

# Notifications

On my PC and my phone there are ample opportunities for notifications. Some of them are system notification like charge levels, but most of them come via applications. One could get a notification for every email, every instant message. Browsers can now relay notifications from websites to the user. On the phone you have messages, calls, reminders.

There are the maker and manager schedules. In short a manager works on a rather short time scale and does a lot of little decisions. The maker in contrast goes into the zone and works on a problem with deep concentration. Ripping the maker out of that concentration will result in a loss of a lot of time because they have to get back into the zone again. Notifications are interruptions that are easily turned off.

Read more…