Posts about Computer (old posts, page 15)

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.

GPS Tracking mit AllTrails, Komoot, OsmAnd und Strava

Während Radtouren nutze ich gerne mein Handy in der Lenkerhalterung um mir Fahrradkarten anzuzeigen. Die Open Streep Map hat entsprechende Metainformationen, sodass man sich auf der Karte die für den Radverkehr empfohlenen Karten anzeigen lassen kann.

Zusätzlich nehme ich gerne Touren auf, so habe ich zum einen eine Übersicht über die Strecke und kann sie einfach nochmal fahren. Ich kann die Strecke mit anderen Personen teilen, zeigen wo ich gefahren bin. Und ich bekomme Statistiken über Strecke, Zeit und Höhe.

Nun gibt es einige Apps, die man dafür nehmen kann. Ich kenne diese hier:

In letzter Zeit habe ich häufig Strava genutzt und wollte einmal vergleichen, welche App sich eigentlich für was am besten eignet.

Read more…


Bei Epic Games gab es GTA 5 neulich kostenlos. Nachdem ich mit GTA 4 eher mäßige Erfahrungen gemacht hatte, wollte ich es mir vorher nicht kaufen. Aber so kann man ja einmal testen.

Zurerst musste ich einen Account erstellen und den Epic Games Launcher herunterladen. Das scheint eine ziemlich fette Anwendung zu sein, die man nicht unbedingt auf einem Arbeitsrechner haben will. Da ich auf dem Spielerechner aber schon Steam, EA Origin, Ubisoft Uplay und GOG Galaxy installiert habe, macht es dann auch keinen Unterschied mehr.

Für die Installation von GTA 5 braucht man knapp 100 GB Speicherplatz. Also gut, dann geht das Spiel halt auf die große HDD.

Read more…

Note-Taking Software

There are a lot of tasks which are so simple that most programmers think that they can just set out and write their own. One of this is note-taking software. There are a couple products out there, but none are quite perfect. And instead of improving one of the existing ones, it is tempting to just start with their own. In the end, of course, there will be just one additional niche solution that only really works for the programmer but not the next user.

Sometimes there are conflicting requirements. Like you want something that is WYSIWYG or not, should it be in the cloud or private. Yet many other things could be made configurable.

I often take notes when sorting my thoughts. That could be as part of my dissertation, drafting blog posts or comparing products when buying something. And now I am looking for a note-taking software that I can use for my dissertation and in the progress I get a blog post out of that. Guess that checks all the boxes then.

My workflow generally consists of writing structured text and adding screenshots, inline math and code snippets along the way. I will compare a few products that I have tried out for note-taking.

Read more…

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…

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…

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…

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…