How to add Travis CI to your github project

Travis CI is a nice way to add Continous Integration / Test / Deplyoment to your github project.

As long as your project is open source aka not private you can use Travis CI for free (with a limited quota of 10000 minutes)

Account

Create an account at travis-ci.com 

Connect it with your github account

Configuration

For enable travis CI in your project you must add a .travis.yml file to the root folder. Mind the dot for hidden file!

The content for a python project can look as follows:

language: python
python:
  - "2.7"
  - "3.8"
  - "3.9"
  - "3.10-dev"

script: 
  - python -m unittest discover

Under the python tag you can list all versions under which your code shall be executed. If you don’t provide further information the testing platform is Ubuntu 16.04 Xenial. If you want to run things on Ubuntu 20.04 you can add:

dist: focal

Optional Batch

You can add a batch to your readme

[![Build Status](https://app.travis-ci.com/jboegeholz/easypattern.svg?branch=master)](https://app.travis-ci.com/jboegeholz/easypattern)

Further Reading

https://docs.travis-ci.com/user/languages/python/

10 tips for creating co-ownership in a code base

When you learn a new language or a framework you almost always certainly start fresh with a new clean project aka green field project.

In the industry you rarely get the chance to do so. You will have to start with code which has already been there for a specific time. These projects are called brown field. And brown not in a good sense. Brown can mean mud to sh… Continue reading “10 tips for creating co-ownership in a code base”

What is the Karman line?

tl;dr; The Karman line defines the edge of space.

It is set to 100km above the Earth’s mean sea level and separates aeronautics from astronautics. So to be an astronaut you have to travel higher than 100km from Earth’s surface.

Why is that?

To fly with a conventional airplane you need the air to generate lift under its wings. The thinner the airs gets the faster the plane has to go to generate the same amount of lift to keep the plane up. The lift generated by wings is directly proportional to the air density.

The faster the plane gets the more drag of the atmosphere on its hull is generated. Therefore the temperature of the hull increases and you will run into thermal issues with the material.

The second consideration is the oxygen you need for combustion in the plane’s engines. When you are too high you cannot use conventional turbines anymore. You have to switch to rocket engines and fuel up the plane with not only propellant but also oxygen in its tanks.

 

 

What is LEO?

LEO stands for Low Earth Orbit.

It ranges from 200km to 2000 km.

The ISS orbits the earth between 370km and 460 km. Due to atmospheric drag the orbit decreases over time

The Hubble Telescope orbits a bit higher at 545km to 549km

Other orbits

Overview

Satellite Orbit
ISS 400km
Hubble 545km
Starlink 550km
Iridium 780km
Globalstar 1.400km
ICO 13.390km
Inmarsat 35.768km
Sirius 23.975km – 46.983km

How to fix android.view.InflateException: Error inflating class fragment

I got the error

E/AndroidRuntime: FATAL EXCEPTION: main
Process: de.creatronix.levelup, PID: 17026
java.lang.RuntimeException: Unable to start activity ComponentInfo{de.creatronix.levelup/de.creatronix.levelup.MainActivity}: android.view.InflateException: Binary XML file line #18: Error inflating class fragment

after enabling minification in my build.

The issue is that with the usage of safeargs with custom objects we use the the @parcelize annotation which seems to be optimized away with R8 Continue reading “How to fix android.view.InflateException: Error inflating class fragment”

What is kapt?

kapt is short for Kotlin annotation processor tool.

Why do I need it?

tl;dr; every time you use an annotation in a Kotlin file you need to use kapt.

Prerequisites

dependencies {
    kapt("groupId:artifactId:version")
}
plugins {
    kotlin("kapt") version "1.5.31"
}

Further reading

https://kotlinlang.org/docs/kapt.html