Lessons learned in 2016

by Jannik Arndt

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

#2

Automate early.

You know, CI/CD. Or just clean-up-scripts. Or a complete infrastructure-as-code. Remember: A script to setup something is the best documentation!

#3

A function must not do more than one thing.

If a function name contains “and” there’s still work to do. Build small pieces.

#4

Side effects are the root of all evil.

If you need side effects (like database or file outputs), let it be the only thing a function does.

#5

It’s all about data.

Business logic is just a concept to change data.

#6

A system is defined by its input and output.

Every description of anything should focus on these two things first.

Blog


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.




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.




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