Hi, I am Martin Ueding, a physicist (M.Sc.), programmer and PhD student in Lattice QCD.

Although I am German, most of the content on this website is in English as both science and programming is communicated mostly in English.

Since 2011, I study Physics at Bonn university. I have finished my Bachelor degree in 2014 and my Master thesis in 2017. See the studies section for the study related material.

At the age of 13 I started programming with C. Then I looked into HTML and CSS, started to use PHP and then MySQL. Looking for something to write software with a nice user interface with, I came to Java. Then I looked into more languages like Bash, Python, JavaScript, GNU Octave, VimScript, Fish. From then on, I tried to do most things in either Python 3 or C++11, so that I only have two languages, which I know well. For my work I now use R and also picked up the Wolfram Language. See my portfolio.

My most popular project are the thinkpad-scripts which I wrote to get all the screen and digitizer features working effortlessly on my ThinkPad. It is a collection of Python modules that take care of docking and screen rotation.

For several years now, I have been almost paperless. The main challenges are papers I get from other people and hand written notes. The former can be faced with a scanner, the latter was more interesting. I own a Wacom Tablet since long before I started to become paperless, but I never had a good software for note taking. Since I did not find one at first, I wrote jscribbe. After I was almost done with that, I discovered Xournal which I now use most of the time.

You can also find me on other platforms:

Card Trick Explained with Combinatorics

Don't ask me why mind works that way, but for some reason I reacalled a card trick that a neighbor kid showed me when I was little. At the time I found it impressive that such things can even work. And today I could not really recall how the trick worked from the performer, but how it appears to the audience.

The general idea is this: You have regular playing cards and take a selection of 20 unique ones. Then they get paired up and shown to the audience alone. Each audience member picks one such pair and remembers them without telling the performer. Then the performer blindly stacks all those pairs and puts down the cards in a seemingly weird pattern with four rows and five columns. Each audience member indicates the rows (or row) that their pair is located at. The performer then tells them which cards they have picked.

As the performer does not necessarily have seen the pairs beforehand, he does not know which card belongs to which other card. Knowing only the row or rows seems a bit too little information. But then the solution just hit me while I continued to look at the trees outside: There are 10 pairs. And there are 4 possibilities to chose a single row and 6 possibilities to choose two different rows. So one only needs to make sure that there is only one pair which has this particular combination.

So let us go through it from the performer's perspective. The actual printing on the cards does not matter for us, we just need to know that the cards are paired up. I indicate this with the same fill color.

Read more…

Fit Range Determination with Machine Learning

One of the most tedious and error-prone things in my work in Lattice QCD is the manual choice of fit ranges. While reading up on Keras, deep neural networks and machine learning and how experimental the whole field is, I thought about just trying the fit range selection with deep learning.

We have correlation functions $C(t)$ which behave as $\sum_n A_n \exp(-E_n t)$ plus noise. The $E_n$ are the energies of the state $n$, the $A_n$ are the respective amplitudes. We are interested in extracting the smallest of the $E_n$, the ground state energy. We use that for sufficiently large times $t$ the term with the smallest energy dominates the expression. Without loss of generality we say $E_0 < E_1 < \ldots$ and formally write $$ \lim_{t \to \infty} C(t) = A_0 \exp(-E_0 t) \,. $$

By taking the effective mass as defined by $$ m_\text{eff}(t) = - \log\left(\frac{C(t)}{C(t+1)}\right) $$ we get $m_\text{eff}(t) \sim E_0$ in the region of large $t$. There are more subtleties involed (back-propagation, thermal states), which we will ignore here. The effective mass is expected to be constant in some region of the data where $t$ is sufficiently large such that the higher states have decayed; yet the exponentially decaying signal-to-noise-ratio is still sufficiently good. An example for such an effective mass is the following.

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…

Verkehr Muss Ressourcenintensiv Bleiben

Verkehrspolitisch scheint Deutschland das Problem einer sehr großen Automobilindustrie zu haben. Sehr viele Arbeitsplätze sind vom Automobilbau abhängig. Jetzt in der Corona-Kriese ist natürlich auch diese Industrie betroffen, da viele Leute in ungewissen Zeiten kein Auto kaufen. In den Nachrichten liest man aktuell eine Diskussion über Kaufprämien für Neuwagen. Und dabei sollen dann auch noch eigentlich veraltete Antriebsarten gefördert werden.

Aber selbst das reicht anscheinend noch nicht, um die Nachfrage und damit den Fluss des Geldes zu sichern. Jetzt wurde auch noch vorgeschlagen dass man erst einmal einen Verbrenner leasen soll, und dann noch ein Elektroauto kauft:

Aber emissionsarme Benziner und Diesel sollten nicht ausgeschlossen sein. Möglich sei auch eine Brückenlösung: "Wer sich heute verpflichtet, in zwei Jahren ein E-Auto zu kaufen, könnte jetzt ein attraktives Leasing-Angebot für einen modernen Benziner oder Diesel bekommen", so Weil. — ARD Tagesschau, 27.05.2020

Natürlich wird das Leasing-Auto dann weiterverkauft. Aber mir erscheinen zwei Jahre als Nutzungszeit für ein Auto absurd kurz. In meinem Bekanntenkreis sind es eher so mindestens 10 Jahre. Das ganze erinnerte mich an »Schöne neue Welt« von Aldous Huxley. Dort gibt es recht am Anfang diese Stelle hier:

‘Strange,’ mused the Director, as they turned away, ‘strange to think that even in Our Ford’s day most games were played without more apparatus than a ball or two and a few sticks and perhaps a bit of netting. Imagine the folly of allowing people to play elaborate games which do nothing whatever to increase consumption. It’s madness. Nowadays the Controllers won’t approve of any new game unless it can be shown that it requires at least as much apparatus as the most complicated of existing games.’ He interrupted himself.

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…

Simple Captcha with Deep Neural Network

The other day I had to fill in a captcha on some website. Most sites today use Google's reCAPTCHA. It shows little image tiles and asks you to classify them. They use this to train a neutral network to classify situations for autonomous driving. Writing a program to solve this captcha would require obscene amounts of data to train a neutral network. And if that would already exist, autonomous cars would be here already.

The captcha on that website, however, was of the old and simple kind:

It is just six numbers (and always six numbers), the concentric circles and some pepper noise. These kind of captchas are outdated because one can solve them with machine learning. And as I am currently working through “Deep Learning with Python” by François Chollet and was looking for a practise project, this captcha came as inspiration at just the right moment.

Read more…

Radweg an der Siegburger Straße

Aktuell fahre ich mehrfach die Woche von Endenich nach Holzlar. Auf dem Weg fahre ich ein Stück auf der Siegburger Straße vorbei, einer wichtigen Verbindung mit Autobahnzugang. Von der Beueler Rheinseite kommend kann man wunderbar den Bröltalbahnweg nehmen und kommt dann am linken Ende der eingezeichneten Strecke heraus. Ab dem rechten Ende geht es dann nach Holzlar weiter.

Diese Stelle eignet sich großartig für eine verkehrsarchäologische Untersuchung. Fangen wir auf der östlichen Seite der Strecke an. Dort fährt man von Holzlar entlang eines benutzungspflichtigen Radwegs und hat es relativ komfortabel und sicher. Kurz nach der Autobahnabfahrt kreuzt man die Maria-Montessori-Allee. Der gemeinsame Geh-/Radweg wird zu einem Gehweg mit »Radfahrer frei«. Dort beginnt die rote Linie auf der Karte. An dieser Stelle steht natürlich ein entsprechendes Schild:

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…

Zusammen Fahrrad Fahren

Ich fahre sehr gerne mit dem Fahrrad. Und es kann auch sehr schön sein mit einem oder mehreren Freunden zusammen zu fahren. So nebeneinander fahren, sich unterhalten, die Natur genießen. Jedoch habe ich selten Strecken, auf denen das wirklich möglich ist. Letztlich gibt es in Bonn wenig Radwege oder Radrouten die hinreichend breit ausgebaut sind.

Einmal sind da die Schutzstreifen (siehe Artikel dazu). Diese sind nie breit genug, als dass man dort nebeneinander fahren könnte. Man fährt also hintereinander und kann sich nicht unterhalten. Dann sind baulich getrennte Radwege auch fast nie breit genug, als dass man nebeneinander fahren kann. Häufig sind Gehwege direkt daneben, man könnte regelwidrig dort zu zweit nebeneinander fahren. In Fahrradstraßen ginge es, jedoch sind die Bonn nie wirklich lang. Und dann noch rechts und links mit KFZ-Parkplätzen gesäumt, sodass bei Gegenverkehr wieder nicht genug Breite vorhanden ist. Die Radwege an Rhein und Sieg sind meist so schmal, dass man hier bei Gegenverkehr ebenfalls wieder eine lange Schlange bilden muss.

Bei Radtouren habe ich es schwer, eine kohärente Unterhaltung mit Freunden zu führen. Ständig muss man unterbrechen, nach vorne fahren, den Gegenverkehr oder Überholende durchlassen und wieder abbremsen. Es macht einfach keinen Spaß.

Read more…