Jannik Arndt

Scala-Dev, Swift-Hacker, Product-Junkie from Hamburg

Finding yourself on the Safe Browsing List — a Post Mortem

This week we woke up to customer reports that they couldn’t reach their “Public Portal” (a way to share their roadmap) anymore. Instead, a red page with a huge warning told them “Deceptive site ahead”. What had happened? ...

August 5, 2022 · Jannik Arndt

Why growth is so bad

Over the past year, many (including me) have left the company I worked for for more or less growth-related reasons. But what is it about growth that actually drives people away? Step 1: need for workforce / talent The first growth isn’t bad. You can only do so much in a day, and at some point, your company will need more people to solve all the tasks. Or specialized people, because you don’t know all about security, marketing, strategy, finances or a particular problem domain....

February 3, 2022 · Jannik Arndt

Comparison of Chart Libraries for SwiftUI

I want to add charts to my SwiftUI iOS App, Zettl. For that, I am going to compare the following libraries: ivanschuetz/SwiftCharts denniscm190/stock-charts spacenation/swiftui-charts AppPear/ChartView danielgindi/Charts ...

August 29, 2021 · Jannik Arndt

Generating Open Graph Images for my Blog

...

May 2, 2021 · Jannik Arndt

Things Developers are and aren't Good at

…in my experience. ...

May 1, 2021 · Jannik Arndt

def and var in traits on Scala 2.12, 2.13 and 3.0.0

Scala traits should define defs, because “A val can override a def, but a def cannot override a val” (via Alvin Alexander via StackOverflow). But it’s interesting to look at how the compiler treats that. Alvin Alexander did that, but only for Scala 2.12.8. Let’s have a look at 2.12, 2.13 and the just released 3.0 (formerly known as dotty). ...

April 24, 2021 · Jannik Arndt

April Fools': “We rewrote it in Rust” or How To Fake A GitHub Repo

We recently had another team rewrite their service in Rust, with a massive boost in performance. So naturally, for April Fools’ I made a big announcement that our team followed suit: But, at good prank isn’t just “I thought this was true, but it wasn’t”. It’s “I though it was a joke, but for a brief moment doubted that”. The “Oh, no, he didn’t"-moment. Alas, one more line was necessary:...

April 5, 2021 · Jannik Arndt

Using scalap, javap and the scala compiler to understand the journey from code to bytecode

Do you know what happens after you compile? Let’s take a look at what the Scala compiler tells us, and what scalap and javap can reveal about .class files. ...

March 25, 2021 · Jannik Arndt

Exception-Proof For-Comprehensions

I recently created a wonderful bug. ...

December 4, 2018 · Jannik Arndt

oAuth2 with Akka HTTP

This is a basic example how to implement oAuth2 using Akka HTTP and Scala. It provides three endpoints. From the clients point of view: / — publicly accessible, returns “Welcome!”, /auth — provide your username and password, receive an access_token in return, /api — secured by oAuth, send the access_token in a header to gain access. From the server’s point of view: / — publicly accessible, do nothing, /auth — receive basic auth credentials, verify they’re in the list of known credentials, create an access_token, return it, /api — receive authorization header, check if access_token is in list of valid tokens. Since oAuth tokens are short lived, the server also has to invalidate expired tokens. ...

October 28, 2018 · Jannik Arndt

Akka HTTP on Heroku

Getting a Akka HTTP-based backend up and running on Heroku for free can be done in less then 30 minutes — if you know the tricks. ...

October 27, 2018 · Jannik Arndt

How to Write and Test a Reactive Reader for AWS SQS Using akka, alpakka and Localstack

This example show how to write a reactive reader for the AWS Simple Queue Service, using Scala and alpakka (respective akka streams). ...

October 7, 2018 · Jannik Arndt

How Event Sourcing in Akka Persistent Actors Works

While the Akka documentation is incredibly well written, it has surprisingly few images. Since I visualize concepts to remember them, here is my take on how Event Sourcing in Akka Persistence works: ...

August 31, 2018 · Jannik Arndt

Rotating PostgreSQL Passwords with no downtime

Changing the password for a PostgreSQL database user involves two steps: The change in the database and the change in the application code. This blog post describes how to do this without any downtime or failed authentication tries. ...

August 22, 2018 · Jannik Arndt

Examining a PostgreSQL with psql or pgcli

The PostgreSQL installation comes with a great tool, psql, to administer and inspect the database. pgcli extends this with syntax highlighting and autocompletion. ...

August 16, 2018 · Jannik Arndt

Using your Apple Watch Workout to Geotag DSLR Photos

I want my photos to have location info in them, and Nikon wants way too much money for that. So I’ll do this: Let my Apple Watch track where I go, using the Outdoor Walk, export the route as GPX and use exiftool to tag all my images. Here’s how I do that. ...

August 5, 2018 · Jannik Arndt

3 Ways How Passwords Get Leaked

You don’t need to “get hacked” to have your security compromised. Often enough you’ll do it yourself. The best way to prevent this is knowing when to be cautious. ...

July 22, 2018 · Jannik Arndt

Kirschblütenfeuerwerk

...

May 25, 2018 · Jannik Arndt

Russische Kirche, Fernsehturm, Landungsbrücken

...

May 25, 2018 · Jannik Arndt

Boberg

...

April 8, 2018 · Jannik Arndt

Alsterpanorama

April 7, 2018 · Jannik Arndt

Hochwasserbassin

April 7, 2018 · Jannik Arndt

How to add an SSH Key as a Kubernetes Secret

Adding an ssh-file as a secret sounds easy, but there are pitfalls. ...

March 22, 2018 · Jannik Arndt

Lazy Aliases in my Shell

I reduced the startup time of my shell by one second. Here’s how: What I do I work a lot with the shell (or “Terminal” app on MacOS), mostly kubectl, git, terraform and docker. And of course I use the absolutely best shell of all, oh-my-zsh. The Problem I noticed that recently the startup time for a new shell (or new tab) has grown longer than a second. That’s annoying, because usually when I open a new tab, I want to quickly check on something, like the logs of a pod or if I have committed something in a different project....

March 13, 2018 · Jannik Arndt

How to use a Raspberry Pi for your Time Machine backups

Apples Time Machine is a great backup solution, you only have to do one thing: Connect your disk from time to time. Since that is way harder than it sounds, there’s a second option: Buy a 329€ Time Capsule and do backups over wifi! That’s too expensive? Here’s how to build your own Time Capsule with a Raspberry Pi 3 and an external hard drive. ...

January 13, 2018 · Jannik Arndt

How to install Tasmota on a Sonoff device without opening it

Sonoff takes the standard ESP8266 chip and adds two things: a casing with wifi and great connectors and a custom OS and an app to control the devices. Unfortunately, the second addition also means that all communication goes through Sonoff’s servers. Here’s how to get rid of that. Without soldering or connecting anything. ...

January 13, 2018 · Jannik Arndt

How to use a Raspberry Pi 3 with Apple Home

“Hey Siri, turn on the bedroom lights!” I want that. Here’s how I did it: I bought a bunch of Sonoff devices (5€ each, 10€ for a light switch). I bought a raspberry pi (33€). I installed an MQTT broker and homebridge on the pi. ...

January 13, 2018 · Jannik Arndt

How to setup a Raspberry Pi 3 headless, without monitor, mouse or keyboard

I bought a raspberry pi as a smart home automation server. Here’s how to set it up without connecting a monitor, mouse or keyboard. All you need is an ethernet cable. ...

January 13, 2018 · Jannik Arndt

Terraform on Google Cloud Engine Quickstart

This is a quickstart for building something on Google Compute Engine without clicking any buttons (after you created the project). ...

November 23, 2017 · Jannik Arndt

Lessons learned in 2017

#1 Conway’s Law “organizations which design systems … are constrained to produce designs which are copies of the communication structures of these organizations.” So true. ...

November 11, 2017 · Jannik Arndt

What settings yield the sharpest landscape photo?

I was quite surprised at how difficult it is to get absolutely razor sharp images out of a very good (high-end-consumer/semi-pro) DSLR camera, namely the Nikon D7100. So I made the test: What settings in terms of aperture, shutter speed and ISO yield the sharpest landscape image? ...

November 7, 2017 · Jannik Arndt

Hamburg as seen from the Michel

...

November 4, 2017 · Jannik Arndt

Releasing a Scala + Maven project to Maven Central (Sonatype OSS)

If you write Scala in a Java-centric environment, chances are you might wind up with a Maven project, defined in a pom.xml. While this can work, it brings a few extra caveats if you want to submit your project to Maven Central (aka Sonatype OSSRH). Step 1: Claim your Group ID When you first publish something to the Sonatype OSSRH, you have to create a JIRA account and then create a ticket for a new project....

September 10, 2017 · Jannik Arndt

Writing case classes to MongoDB in Scala

Storing case classes in a MongoDB database is incredibly easy, once you know how. The same goes for java.time classes such as ZonedDateTime, LocalDate or Duration. This example uses the official Mongo Scala Driver in version 2.x and the bsoncodec project by Ralph Schaer. ...

August 19, 2017 · Jannik Arndt

VERY Quick Start: Terraform

This post contains the absolut essence from the Terraform Getting Started Guide: https://www.terraform.io/intro/getting-started/install.html ...

August 6, 2017 · Jannik Arndt

Where bad code comes from

Ever wondered where bad code comes from? “This story is done” “Shouldn’t someone review it first?” “Oh, yeah … erm … I’ll do a quick refactoring first and then…” …when that other person is on holiday!

July 22, 2017 · Jannik Arndt

Storing sparse, key-value-like data in a relational database

Some ideas seem great at first but turn out to be incredibly bad in hindsight. I reviewed such an idea today. ...

July 21, 2017 · Jannik Arndt

Tough Mudder Norddeutschland 2017

...

July 15, 2017 · Jannik Arndt

A Minor Story Live at Methfesselfest

July 2, 2017 · Jannik Arndt

Git in one Image

I tried to create a single image that contains all the most important git commands: ...

June 18, 2017 · Jannik Arndt

Two-speed IT

The Problem You’re a corporation. Your IT department is old, slow and can’t innovate. Your competitor however can. So you try what every corporation tries: Two-speed IT. ...

May 23, 2017 · Jannik Arndt

The real world doesn't care about encoding

Last week one of our programs failed looking up an airplane by its registration. That’s not a surprise, since ac regs are a horrible identifier. They change all the time. Also there is almost no naming rule at all. Wikipedia states When painted on the fuselage, the prefix and suffix are usually separated by a dash (for example, YR-BMA). When entered in a flight plan, the dash is omitted (for example, YRBMA). In some countries that use a number suffix rather than letters, like the United States (N), South Korea (HL), and Japan (JA), the prefix and suffix are connected without a dash. ...

May 1, 2017 · Jannik Arndt

Belugas at Finkenwerder

My favourite animal: The Beluga! ...

March 5, 2017 · Jannik Arndt

Deploying Pentaho jobs into Production

TL;DR: You don’t. We eventually gave up on it. My personal lessons-learned: Pentaho Kettle (or “Community Edition”, CE, i.e. the open-source core) is a great product for one-time data transfer or on-demand data transfer, but not for resilient, scheduled jobs. The “Enterprise Edition” (EE) adds scheduling that doesn’t work reliably, and a very powerless server. Kerberos is a bitch. ...

March 5, 2017 · Jannik Arndt

Extracting Dimensions from an Oracle Database Table

Task You have a denormalized table and want to extract a column into a dimension table. Caveat You have to keep the ids. Extra-Caveat You use an Oracle database. ...

January 7, 2017 · Jannik Arndt

talend does not work

I cannot believe that googleing “talend does not work” does not find anything helpful. With this entry I try to fill that void in the internet. ...

January 7, 2017 · Jannik Arndt

Lessons learned in 2016

#1 Do not fix your code. Rather understand why nothing kept you from creating this bug. Make your code so easy that this bug would have been obvious the first time. ...

January 3, 2017 · Jannik Arndt

Perfect Home Screen Layout

Being the IT-guy aka personal first-level-support™ for way more people than I am comfortable with, I have held quite a few mobile phones in my hand and stared into the abyss that is their home screen. The home screen is the modern view into someone’s soul. In a post-privacy-world it is probably one of the most private things we have, since it is utterly worthless to someone who does not interact with it on an hourly basis and has grown to live with whatever way the apps are scattered around the screen. ...

November 23, 2016 · Jannik Arndt

Bug Fixing in Production

(via I Love Programming) Thank goodness, we don’t do production.

November 22, 2016 · Jannik Arndt

The 2016-Personal-Website Infrastructure

Since I bought my personal domain name around 2003, I went through several web-solutions, using static html pages, php pages, a custom designed php cms, finally Wordpress and now, as of yesterday, I am back to static html. The 2016-flavour however, which is another attempt of separation of presentation and content (a concept I highly endorse as a LaTeX user). ...

November 20, 2016 · Jannik Arndt