Yearly Archives: 2019

Exploring the MoneyMoney database

MoneyMoney is a convenient online banking application for macOS, most useful if you have accounts with multiple different German banks. I wanted to export some of the data I had stored there in a format that the app didn’t support by itself, so I was wondering if I could pull it straight from the database. You can go to the Help menu and click Show Database in Finder and will be led to ~/Library/Containers/com.moneymoney-app.retail/Data/Library/Application Support/MoneyMoney/Database/MoneyMoney.sqlite. If you go to MoneyMoney’s About screen, you’ll see that it attributes SQLCipher.

So, download and compile SQLCipher like this:

git clone https://github.com/sqlcipher/sqlcipher.git
cd sqlcipher
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-L/opt/local/lib -lcrypto" CC=clang CXX=clang++
make -j 4

Now you can open the database using

./sqlcipher "file://$HOME/Library/Containers/com.moneymoney-app.retail/Data/Library/Application Support/MoneyMoney/Database/MoneyMoney.sqlite?mode=ro"

and decrypt and dump it by typing the following commands at the SQLite prompt:

PRAGMA key = '<your database password>';
PRAGMA cipher_compatibility = 3;
.dump

The database password is just what you set in MoneyMoney and I figured out the compatibility level by trial and error. It seems like MoneyMoney didn’t yet get around to upgrading to SQLCipher 4, which was released in late 2018. It’s entirely possible that some older versions of MoneyMoney require a lower compatibility level and that some future version may be using level 4.

Disclaimer: You should not attempt to modify the database as that may cause MoneyMoney’s data to become inconsistent or modified in ways the developer did not anticipate. That’s why I open the file in read-only mode above. If you do modify it, you’re on your own.

Debugging code-signed applications on macOS

To debug a code-signed application on macOS, you need to turn off System Integrity Protection. Some applications however explicitly forbid debugging them. This manifests itself in lldb error messages like

Process 12345 exited with status = 45 (0x0000002d) 

If you google that message, you’ll find that this happens if the application disallows attaching a debugger by calling

ptrace(PT_DENY_ATTACH, 0, 0, 0)

There are many workarounds described around the internet. The one I like using is the following lldb command:

breakpoint set --name ptrace --command "thread return" --command "continue"

It just causes the ptrace call to be skipped. Of course, some applications take more involved measures to prevent attaching a debugger, but often this is sufficient.

Scientific Article: Hydrodynamic mobility reversal of squirmers near flat and curved surfaces

I’ve published a scientific article in Soft Matter.

Hydrodynamic mobility reversal of squirmers near flat and curved surfaces
Michael Kuron, Philipp Stärk, Christian Holm, and Joost de Graaf
Soft Matter 15, 5908 (2019)
DOI:
10.1039/C9SM00692C

The journal does not provide open access to the article, but you can download it for free from arXiv: arXiv:1903.04799.

Scientific Article: A lattice Boltzmann model for squirmers

I’ve published a scientific article in The Journal of Chemical Physics.

A lattice Boltzmann model for squirmers
Michael Kuron, Philipp Stärk, Christian Burkard, Joost de Graaf, and Christian Holm
J. Chem Phys. 150, 144110 (2019)
DOI: 10.1063/1.5085765

The journal does not provide open access to the article, but you can download it for free from arXiv: arXiv:1903.04799.

Scientific Article: ESPResSo 4.0 — an extensible software package for simulating soft matter systems

I co-authored a scientific article in The European Physical Journal Special Topics:

ESPResSo 4.0 – an extensible software package for simulating soft matter systems
Florian Weik, Rudolf Weeber, Kai Szuttor, Konrad Breitsprecher, Joost de Graaf, Michael Kuron, Jonas Landsgesell, Henri Menke, David Sean, and Christian Holm
Eur. Phys. J. Spec. Top. 227, 1789 (2019)
DOI:
10.1140/epjst/e2019-800186-9

The journal does not provide open access to the article, but you can download it for free from arXiv: arXiv:1811.07729.

Cherry MX Board 1.0 Review

After my old keyboard started randomly dropping characters as I typed them, I decided it was time to get a new one. Having used flat keyboards with scissor switches for over a decade, I was a bit fed up with crumbs getting caught in the mechanics and keys failing, so I decided it was time to upgrade to a mechanical keyboard. The Cherry MX switch series seems to be the most popular on this market, so my main difficulty was deciding on a color. Also, I found it slightly irritating that these keyboards are mainly marketed at gamers, even though they are great for typing too!

Cherry has three groups of MX switches: linear (Red, Black), tactile non-clicky (Brown, Clear), and tactile clicky (Blue). Since I always push my keys all the way through to the bottom, I don’t really need clickyness to get a sound. Also, I prefer my keyboard to be as silent as possible. I ended up ordering a Cherry MX Board 1.0 both with Brown switches and with Silent Red switches. The former are tactile, the latter are linear. So here is a list of those things I disliked on both keyboards.

MX Silent Red

  • If you catch a key by the edge while trying to hit another, it may still activate. That’s slightly annoying at first, but teaches you to type more precisely. The MX Black would require slightly more force and thus be less prone to this, but it’s not available in a silent variant.
  • When typing fast, the bottom metal plate has a faint high-pitched ring.
  • Lack of tactile response feels a bit weird during the first few thousand keystrokes, but you get used to it very quickly.

MX Brown

  • It is 6 dB louder than the Silent Red.

I ended up keeping the Silent Red because the difference in volume was just what crossed the line between bearable and annoying. I know you can put rubber O-rings between the key caps and the switches to silence them, but I just wanted something that I’m happy with out of the box. If Cherry decides to make a Silent Brown some day, I’m pretty sure I’ll buy it immediately though.