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.

Software Development in Scientific Research

I've worked in research for the past four years, during my master and PhD thesis. And although I did research in physics, my main day-to-day work has been developing software. The software projects were either the large-scale simulation code, some post-processing code or the analysis.

There is a discrepancy between what a researcher is gauged by, and the work which is needed to write good software. A good researcher produces physical results, publishes a bunch of papers which reek in a lot of citations. The only thing that one describes in the papers are the theoretical methods and the results. The details of the implementation are of no concern to the audience of the paper.

The people who work to obtain the results are very much interested in the implementation, as they have to work with the code on a daily basis. They also have to implement new features in order to produce the next physical results in the future. Usually the physical results somehow built upon previous results, making it a necessity to have maintainable and extensible code. And this is where the trouble begins.

Read more…

Cam Scanner Apps

I usually scan all my documents with a flatbed scanner that I have at home. It also has an automatic document feeder, which is a blessing for long documents. Sometimes I want to scan something on the go. Usually I just take pictures with the camera app, but as there are many apps out there, I wanted to see whether I could find something good.

As a benchmark, this is the result that I get from the flatbed scanner and adjusting the levels with GIMP:

There are no shades, no wrinkles. It looks reasonable. This is a hard example as it is thermographic paper and crumpled in my wallet. But still, why not take a challenging example? By the way, without software post-processing, the result looks rather bad:

So how does my phone compare to that?

Read more…

Tracking Places I Have Been

I like to track the places that I have been to. Some people have a scratch world map, others write a list, or draw onto a map. For me I realized that the granularity of a world map is not enough, I want to have a digital map. So for a while I have been using the Viking application for this.

There I can just create layers and enter the points as I see fit. It works rather nice, but it became rather slow lately. Additionally I cannot take this with me on the phone. On the go I can add places in OsmAnd and later export them and import them into Viking. All this is okay, but I wanted to see what Google offers there.

Read more…

Kdenlive Crash on Fedora

I have made a little video from footage that I captured. Also I added some voice-over audio recording. For creating the video I use Kdenlive on Linux. This is my project:

In order to export this to Twitter, I need to export the project. So I open the export dialog and just select one of the default formats.

Read more…

Why Write A Short Text When One Can Make A Long Video Instead?

I really hate video tutorials. There are very few which are well made and concise. Most of them have a very low information density. Also with the video format one cannot just skim it like one can with a text. I much prefer text with pictures. Also I prefer papers over talks as I can access them with in the way that I like best.

This particular time I had a video where I wanted to obscure some regions. You know this effect from TV shows where they pixelate some face or company logo. The problem is that the object moves on the screen and therefore the pixelated area needs to track the object. This can either be done by hand or automatically.

Using my video editing program of choice, Kdenlive, I have tried this. Quickly I realized that I needed some tutorial. There is a bit in the official documentation about “auto mask”. There is not a lot of explanation, rather just a video. In that video the author shows how automatic tracking works. One basically just selects a region and let the thing do some work. It just did not work out for me so well.

Therefore I wanted something with keyframes, where I can manually adjust the box every few seconds. I let Google search for “kdenlive pixelate” and found only video tutorials. So I took a look into the first one, “Kdenlive Lesson 20 - Blur and Obscure”. The author spends the first minutes to talk about sub-clip selection, which I already knew and shouldn't be the topic. Then he shows how one can pixelate a fixed section of the screen, which does not help me. And only after spending four minutes I heard him say that there is a way to track stuff on screen, but he does not know and is going to look into at some future time. Five minutes wasted.

Read more…

SpiderOak One Performance Issues

As I wrote earlier, I have been using the SpiderOak One Backup service for a while now. It costs more than the usage of Duplicity with Backblaze B2, but it promises to work better. Also it creates backups continiously, so I don't have to wait for the full hour to have a backup. Using inotify it will automatically put files into the queue just as I save them. I really like this. My laptop could burst in flames and I would only lose a few minutes of work.

But the performance of the system is bad, again and again. I recall that I tried the service a few years ago and had just exactly the same issues with it. Often it would not utilize my upload bandwith (10 Mbit/s) fully but rather utilize one full CPU core, which seems excessive. I would restart the application and then it would stop this. Often this is triggered by using the GUI. I have the feeling that the GUI cannot really cope with ten thousand of files being listed, so it just freezes up as it tries to display it all.

Lately even restarting did not help. So I wrote to the support on 2020-05-23 about this issue. I got a reply telling me to move the ~/.config/SpiderOakONE directory somewhere else and sign back into the program. Then it would do the syndication again and it should work fine. At the time it seemed to work fine again after a few simple restarts, so I did not follow through on this at that time.

Read more…

Gaming with Keyboardio Model 01

I already use a very nieche keyboard, the Keyboardio Model 01. It took me like three weeks to regain my typing speed on it. But I have had it at the office the whole time and never used it at home. With the quarantene I have brought it home and eventually tried gaming on it.

For instance with GTA 5 I use the following buttons on a regular ANSI layout keyboard:

But how are these buttons placed on the Model 01? It turns out that they are also mostly on the left side, such that I have my right hand for the mouse. The problem is that a gamer usually shifts the left hand to the left by one such that the W-key is worked with the middle finger instead of the ring finger. This would make reading the shift key with the thumb much harder, and I need to press both W and Shift at the same time to sprint forward.

Read more…

ThinkPad X220 Tablet – Eight Years and Counting

In Spring 2012 I bought my Lenovo ThinkPad X220 Tablet. It was during the second semester of my Bachelor's course. I've used it for studying since then, wrote my Bachelor thesis, my Master thesis and now my dissertation on it. It has served me well for over eight years now, and I have no intentions of replacing it yet. During those years I carried it around in my backpack, and it has seen quite some wear. Still I find it remarkable that there are just minor issues with it.

At the time I chose the Intel Core i5-2520M, 8 GB of main memory. Later on I added a 500 GB SSD, which made the whole thing much faster. and more pleasant to use. Upgrading the ThinkPad is very easy, one can just see the screws on the bottom. They are even labelled with the parts that they give access to, and replacing those parts does not void the warranty.

Read more…

Python has no Variables

Python doesn't have variables. It sounds mind-boggling, as one seems to use them all along. But really, that is not how it works with Python. This will really confuse people with a background in C or C++. If we do int n in C++, and write n = 1, n += 1 or the like, the address &n will never change. The value changes.

But in Python the “variables” are mere pointers to values somewhere. This can be seen because doing n += 1 in Python actually creates a new value. Expanding this as n = n + 1 and reading it as “let n point to the value of n + 1. We can easily see this by creating a variable and looking at the ememory address.

>>> n = 10000
>>> id(n)

Now increasing this number will make n point to a different address in memory!

>>> n += 1
>>> id(n)

Read more…

Scattered Across Messengers

For the past years I have only used WhatsApp and Telegram for messaging. Surely also Discord, Skype, Team Speak and Zoom for certain discussion groups, but not genereal messaging. Most people use WhatsApp, and few use Telegram and insist that it is the better messenger. I still do not like Telegram for its home-grown cryptography, trusted-server design and opt-in end-to-end-encryption. A relative had a security incident on Telegram, apparently somebody was reading all the chats and searched for login credentials that were sent to somebody else. In the end the person ditched Telegram as they did not feel secure on it any more.

But then the family group on Telegram did not work any more. WhatsApp is not an option because another person despises Facebook and does not want to share any data with them. We eventually agreed on the Signal messenger. I have installed this on my phone an laptop, and the family group was opened up there.

Read more…