Einträge über Computer (Ältere Einträge, Seite 19)

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++. 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.

See my portfolio of programming projects.

My most popular hobby project is the Vigilant Crypto Snatch, a little program that buys crypto currency whenever the prices fall.

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

Vigilant Crypto Snatch

I've programmed a crypto currency trading bot. This article introduces the idea, some programming details and the documentation.

Trading assets can be a full-time job. If one doesn't want to spend the time, one can just buy in regular intervals for fixed amounts of money and realize the dollar cost average effect. Developing this idea a little further leads to buying when the prices drop to obtain more assets for the same money spent. In order to do it automatically, Chris and I have implemented a cryptocurrency buying bot: Vigilant Crypto Snatch.

The program started out really simple, as a single file Python script. It would use the Bitstamp API to query the current market price of Bitcoin. Then it would take the Cryptocompare API to query the market price a specified time earlier. If the prices had dropped a given percentage, it would send a buy order via the Bitstamp API. Time delay, drop percentage and amount of money to spend have to be set by hand, and in the first iteration by guess.


Plasma with Wayland not usable yet

Ever since KDE 4 I have been using Plasma on my personal laptop. And I also use it at work. But every since I use it with X.Org, although there is Wayland support. Lately I had some glitches with the USB-C dock and external screens, so I thought about giving Wayland a try. The screens got recognized well, but there were other glitches that made it practically unusable:

  • My usual screenshot tool Shutter did not work any more. The other one that I use, Flameshot, did not work either. Using the Plasma built-in screenshot tool it works, but it doesn't let me crop or annotate it as conveniently. This was rather annoying.

  • I'm not exactly sure what the pattern was, but my clipboard did not work as usual. Often it would just seem to drop the contents. That was utterly annoying and it distracted me from work.

  • And Zoom cannot share the screen with Plasma on Wayland. It only works with GNOME on Wayland. This is a complete deal-breaker for me.

So let's see how many more years I am going to stick to X.Org …

Threads on Twitter

On Twitter one can often see people who have more to say than the character limit allows in a single tweet. They usually then reply to their own tweet and create a thread by doing so. One can feel that the medium isn't made for short articles. This is why I like my blog, I can just write as much text as I want. I can include more than four images. And I can structure the paragraphs like I want. People can share the URL as one tweet, or send me an e-mail discussing the whole post.

In order to take the rough edges off twitter threads, there are multiple apps to unroll these threads. This usually then looks like this:

The application replies with a link to an unrolled thread. One can then read it on a website where each tweet is turned into a paragraph. But one has to answer to the original tweet and people often don't check whether anyone else has used the app already. So one finds many more such posts:


Obsidian Markdown

A while ago I have written about note-taking software. At the time the most promising candidates were Joplin and just flat Markdown files. A colleague has told me about Obsidian. It is an awesome note taking application as it satisfies all the needs that I have: It uses plain Markdown files to store the notes, there is on siloization into an opaque database. But it provides a file explorer to quickly switch between notes. It also has some gadgets like a link graph, but I haven't used these yet.

Other great features is HTML import from the clipboard, which makes copying snippets from webseites much easier. It also supports split windows, which can serve as editor, preview and outline panes in any combination. It also manages attachments by copying them into the notes directory. And one can have multiple note directories, which are called “vaults”.


Code Documentation Epiphany

In the past decades I have written a bunch of software. And most was rather ephemeral stuff, like hobby projects or university assignments. In most cases there was no need for any sort of formal documentation. I would understand the code as I am working on it, and once I have abandoned it, it would never be touched again anyway.

During my PhD this has changed. I have worked on three software projects which were meant to be used in the work group after I am gone. And because I knew it from the start, I tried my best to document it. At the time I had the feeling that the documentation should be very close to the code, in the spirit of Donald Knuth's literal programming. I have used tools like Doxygen, Epydoc, Sphinx or JavaDoc to create HTML pages from the docstrings in the code. I only had to write a comment for each function, and then everything would be documented!

In reality I found that this documentation was not really useful. It wasn't motivating to write. The generated website didn't look beautiful by default, though with Sphinx one can find beautiful themes. At the time I didn't really see the systematic problem, I just thought that if I were to write better docstrings, it would become great.

And then for my PhD I needed to write something in Wolfram Mathematica. And as I learned the language, I looked for equivalents of tools that I usually use. There was no documentation generator, no real docstring functionality. I was annoyed by the language. And so I just started out with a Markdown document. And I have documented the functions there, but also the design decisions, use cases, caveats. Something that you can only do in a long-form document. The end result has been a 40 page manual. It has a common theme, has a structure, and you can actually work with that thing.


Rant about Confluence

Over the years I have been using content creation software which had a clear separation of a source and a rendered output. This has been LaTeX for scientific documents, Markdown and reStructuredText for computer documentation. I also use Markdown for my notes with Ghostwriter or Obsidian. I have also used GraphViz to create diagrams and graphs. To create 3D models I have used OpenSCAD, which is a programming language for 3D models. When I needed a Wiki, I have used DokuWiki All these software packages let me use the text editor of my choice, version the source code in Git and share it via GitHub. So for me, having a Git repository of Markdown files is the perfect way to create documentation.

In the average company there are not only technical people like me, but there are also many people who prefer graphical WYSIWYG user interfaces. And I can completely understand that, there are just different workflows and needs. On the other extreme might be a Windows network drive with a bunch of Word documents on it. This would be my personal nightmare, but so would my Markdown setup be to them.

Confluence, a wiki software by Atlassian, is advertised to bridge this gap. It offers the organization of documents in a hierarchy of pages, possibly separated into different spaces. It has access control. And it has a WYSIWYG which caters to the Word-workflow and a wiki syntax editor which caters to people like me who like source code. So in principle it would be the best compromise between the network drive of Word files and the Git repository of Markdown files. And for the most part, it really is that. But there are a couple of things which really make me annoyed with it.


New Monitor Mounts

I have recently written about height adjustable monitors and how they usually don't reach the height that I would need to comfortably sit. And the mount that I bought didn't really do me much good. Eventually I started looking for mounting options again. Most of them only go up to 40 cm in height, but there are a select few options which go even higher. And I didn't actually want to has gas spring arms, just fixed arms are fine. So I have found two products to make it work in the way that I want:

This consists of a dual monitor stand on the right side. That goes up to 100 cm, which is very great. I won't need that much, but it certainly works for me. And then I also have a combined monitor and laptop stand where both can be adjusted independently. In this way I can have the laptop on head height and also do video conferencing without having to look down.

As a side effect, the desk is much neater now. On the picture I haven't put away the cables, by now it looks even better.

Password Guideline Nonsense

My company has solid security policies which seem to be oriented at best practices. And I am very glad that they don't enforce nonsense policies that would actually weaken the passwords that users choose. That of course isn't the case with every company. There is one particularly arcane case. They have these rules for passwords:

  • At least two capital letters
  • At least one special character
  • At least one digit
  • At least 12 characters
  • At most three characters may overlap with the last 10 passwords
  • No characters from the last password

And the passwords have to be changed every four weeks. Of course, writing them down is forbidden, as that would weaken the security.

How are employees supposed to sensibly come up with these passwords and remember them? They will of course come up with a clever enumeration scheme that will just barely abide these rules. And I am sure none of them will have more than 12 characters. If they were allowed to have the passwords for more than four weeks, people might actually take more time to craft a sensible password. But this seems to encourage writing it on sticky notes …

Wear on CF card receptacles

My camera is a rather old DSLR which still uses CF cards. In order to get the images, I would take it out of the camera body, put it into a card reader and then transfer the images. Afterwards the card was inserted back into the camera body. This has worked fine for years, but one day the card reader would not work any more. I didn't understand, and just bought a new card reader. One day in 2016, the new card reader stopped working. I then looked into the card reader and saw that a pin was bent.

So I took a simple screwdriver and tried to fix the pin and bend it back.