Rainfall / Regen (Introduction / Einführung)

English below

In den vergangenen Sommern wirkte es so, als ob der Regen des öfteren einen Bogen um den Garten machte. Mal regenete es ein paar Kilometer westlich, mal zog die Regenwolke südlich vorbei, oder auf dem Weg zur Arbeit waren die Straßen überall nass, nur nicht im Heimatort. Ich habe mich da gelegendlich geärgert, da Giesen Arbeit ist, und besonders nervig war es, wenn die Regentonnen leer wurden.

Und dann wollte ich im Sommer in Schottland wandern gehen und sehen, wie feucht der Sommer bisher war. Der britische Wetterdienst Metoffice hält einige Daten vor, allerdings nicht so detailiert wie ich mir wünschte (Gerasterte monatliche Zusammenfassungen für die vergangenen Jahre: https://data.ceda.ac.uk/badc/ukmo-hadobs/data/insitu/MOHC/HadOBS/HadUK-Grid/v1.3.1.ceda/5km/rainfall/mon-30y/ , Daten von Wetterstationen: https://catalogue.ceda.ac.uk/uuid/dbd451271eb04662beade68da43546e1/ oder Extreme: https://weather.metoffice.gov.uk/observations/weather-extremes). Ich wollte jedoch sehen, ob es stimmt, dass die Regenwolken einen Bogen um den Garten machen, und dafür waren die frei zugänglichen Daten einfach nicht detailiert genug. Die Lösung für mich waren die Regenradardaten: https://weather.metoffice.gov.uk/maps-and-charts/rainfall-radar-forecast-map#?map=Rainfall. Dort gibt es die Beobachtungsdaten der letzten zwei Tage. Die Browser Developmenttools zeigten auch direkt, dass die Regendaten nur ein Bild (aller 5 minuten) sind:

https://maps.consumer-digital.api.metoffice.gov.uk/wms_ob/single/high-res/rainfall_radar/YYYY-MM-DDTHH:MM:00Z.png

Also kleines Programm geschrieben, was die Daten runterläd und speichert, und dann über die nächsten Monate mehr und mehr Auswertung hinzugefügt. Das Projekt ist auf Github verfügbar: https://github.com/ronnyerrmann/rainfall.

Die Auswertung ist im nächsten Artikel.

In den vergangenen Sommern wirkte es so, als ob der Regen des öfteren einen Bogen um den Garten machte. Mal regenete es ein paar Kilometer westlich, mal zog die Regenwolke südlich vorbei, oder auf dem Weg zur Arbeit waren die Straßen überall nass, nur nicht im Heimatort. Ich habe mich da gelegendlich geärgert, da Giesen Arbeit ist, und besonders nervig war es, wenn die Regentonnen leer wurden.

Und dann wollte ich im Sommer in Schottland wandern gehen und sehen, wie feucht der Sommer bisher war. Der britische Wetterdienst Metoffice hält einige Daten vor, allerdings nicht so detailiert wie ich mir wünschte (Gerasterte monatliche Zusammenfassungen für die vergangenen Jahre: https://data.ceda.ac.uk/badc/ukmo-hadobs/data/insitu/MOHC/HadOBS/HadUK-Grid/v1.3.1.ceda/5km/rainfall/mon-30y/; Daten von Wetterstationen: https://catalogue.ceda.ac.uk/uuid/dbd451271eb04662beade68da43546e1/ oder Extreme: https://weather.metoffice.gov.uk/observations/weather-extremes). Ich wollte jedoch sehen, ob es stimmt, dass die Regenwolken einen Bogen um den Garten machen, und dafür waren die frei zugänglichen Daten einfach nicht detailiert genug. Die Lösung für mich waren die Regenradardaten: https://weather.metoffice.gov.uk/maps-and-charts/rainfall-radar-forecast-map#?map=Rainfall. Dort gibt es die Beobachtungsdaten der letzten zwei Tage in 5-Minuten Auflösung mit einer Datenblockgröße von weniger als einem Kilometer. Die Browser Developmenttools zeigten auch direkt, dass die Regendaten nur ein Bild (aller 5 minuten) sind:

https://maps.consumer-digital.api.metoffice.gov.uk/wms_ob/single/high-res/rainfall_radar/YYYY-MM-DDTHH:MM:00Z.png

Also kleines Programm geschrieben, was die Daten runterläd und speichert, und dann über die nächsten Monate mehr und mehr Auswertung hinzugefügt. So werden die Daten für jeden Tag, Woche, Monat und Jahr aufaddiert. Für verschiede Gegenden werden die Daten extrahiert und als pdf, sowie Zeitraffer dargestellt. Das Projekt ist auf Github verfügbar: https://github.com/ronnyerrmann/rainfall.

Die Auswertung ist im nächsten Artikel.


In recent summers it often seemed as if the rain was making a detour around the garden. Sometimes it rained a few kilometers to the west, sometimes the rain cloud passed by to the south, or on the way to work the roads were wet everywhere—just not in my home town. When it was like this, it felt annoying, because watering is work, and it was especially frustrating when the rain barrels ran dry.

Then, in summer, I wanted to go hiking in Scotland and see how wet the summer had been so far. The British weather service, the Met Office, provides some data, but not in as much detail as I would have liked (gridded monthly summaries for past years: https://data.ceda.ac.uk/badc/ukmo-hadobs/data/insitu/MOHC/HadOBS/HadUK-Grid/v1.3.1.ceda/5km/rainfall/mon-30y/; weather-station data: https://catalogue.ceda.ac.uk/uuid/dbd451271eb04662beade68da43546e1/; or extremes: https://weather.metoffice.gov.uk/observations/weather-extremes). However, I wanted to find out whether it was really true that rain clouds were skirting around the garden, and for that the freely available data were simply not detailed enough.

The solution for me was the rainfall radar data: https://weather.metoffice.gov.uk/maps-and-charts/rainfall-radar-forecast-map#?map=Rainfall. There you can find observation data for the last two days, in 5 minute time resolution with one pixel showing less than a kilometre. The browser developer tools also showed immediately that the rain data are just images (one every 5 minutes):

https://maps.consumer-digital.api.metoffice.gov.uk/wms_ob/single/high-res/rainfall_radar/YYYY-MM-DDTHH:MM:00Z.png

So I wrote a small program that downloads and stores the data, and over the following months I added more and more analysis. The data are accumulated for each day, week, month, and year. For different regions, the data are extracted and presented both as PDFs and as time-lapse video. The project is available on GitHub: https://github.com/ronnyerrmann/rainfall.

The analysis is presented in the next article.






Wie über überfahrene Radfahrer berichtet wird

[How news report about cyclists killed by motorised traffic – summary at the end of German text]

Ein Freund machte mich auf einen Unfall aufmerksam, auch weil wir gelegentlich darüber reden, wie ich versuche meinen Arbeitsweg für mich sicherer zu machen. Also habe ich mal eine Suchmachine zu “neuhausen schellbronn unfall” befragt und da sehr unterschiedliche Ergebnisse erhalten:

Die “Badischen Neueste Nachrichten” schrieben [https://bnn.de/pforzheim/enzkreis/neuhausen/radfahrer-kommt-bei-unfall-zwischen-neuhausen-und-schellbronn-ums-leben]:

“… kollidierte der Autofahrer mit dem vorausfahrenden Mountainbikefahrer. …”

So ähnlich, mit etwas anderen Hintergrundinformationen scheibt auch PF-BITS [https://www.pf-bits.de/2024/01/toedlicher-verkehrsunfall-mit-fahrradfahrer/].

Währenddessen steht in der SZ (Süddeutsche Zeitung) einfach nur eine übernommene dpa Meldung mit [https://www.sueddeutsche.de/panorama/unfaelle-neuhausen-43-jaehriger-radfahrer-stirbt-bei-unfall-auf-l547-dpa.urn-newsml-dpa-com-20090101-240130-99-813673]:

“… Der 43-Jährige [Radfahrer] sei bei Schellbronn mit einem Auto zusammengestoßen, sagte ein Sprecher der Polizei am Dienstagabend. …”

(Alle Links können so wie sie sind in die Wayback Machine des Internet Archivs kopiert werden.)

Auch der Baden-Württembergische Landtag hat die dpa-Polizei-Meldung übernommen: https://www.landtag-bw.de/home/aktuelles/dpa-nachrichten/2024/Januar/KW5/Dienstag/470e9caa-cccf-447c-ad0b-aa7df51b.html. Ich habe dort um Stellungnahme zu dem Widerspruch gebeten.

Mich hat die Polizeiaussage getriggert, dass der Radfahrer mit dem Auto zusammengestoßen sei. Im Stadtverkehr mag das passieren, aber auf Landstraßen abseits von Kreuzungen ist das eher ungewöhnlich. Hier wird dem schwächeren Verkehrsteilnehmer und Opfer noch die Schuld am eigenen Tod gegeben.

Wenn man sich Polizeiberichte anschaut, wird man das immer wieder finden. Die Polizei sind selber Autofahrer und daher sind sie in ihrer Ausdrucksweise befangen. Dazu gibt es in unserer Gesellschaft nichts wichtigeres als ungestörten Autoverkehr, so was spiegelt sich nicht nur in Qualität und Schmalheit von Fuß- und Radwegen wieder, sondern auch im Sprachgebrauch.

Noch einen Zusatz für Verschörungstheoretiker: In der Polizeiaussage ist vom 27-jährigem Autofahrer die Rede. Das so jemand sein Auto nicht unter Kontrolle hat und einen Radfahrer übersieht, darf nicht sein, also hat man einen 77-jährigen draus gemacht?

Falls ich eine Antwort vom Landtag bekomme, werde ich hier noch ein Update hinzufügen.

Einmal in einer gefährlichen Situation sich selbst überschätzt und nicht abgebremst und mindestens ein, vermutlich aber auch das eigene und das von Angehörigen der beiden zerstört.

English: A cyclist died on the road. The news-agency stated the police with “the cyclist collided with the car”. This statement also ended up on the page of the parliament of Baden-Württemberg (one of the 16 German countries). Other news article mention that the car driver didn’t see the cyclist and crashed into him from behind. The discrepancy between who’s fault it was triggered me to write about it. My hypothesis is, that the police are drivers themselves and therefore they are biased in their language. There is nothing more important in our society than undisturbed car traffic. This is reflected not only in the quality and narrowness of footpaths and cycle paths, but also in language.

Update:

Die Landtagspressestelle hat ausführlich geantwortet. Leider wollten sie keine Updates hinzufügen. Ich zitier den Hauptgrund für die in meinen Augen problematische Formulierung aus der Email:

“Der Landtag von Baden-Württemberg ist für das inhaltliche Angebot des dpa-Nachrichtentickers nicht verantwortlich. Wir stellen den dpa-Nachrichtenticker auf unserer Homepage lediglich als Serviceangebot zur Verfügung.”

Lazy Coding

Steam, what are you doing on my machine? I have one chat window open, nothing else, there are NO messages going back and forth and yet my system stats show something like this (10 second integration):

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                            
1578766 ronny     20   0 4857032 330216 165264 S  38.5   1.6   4:23.91 steamwebhelper                                                                                                                                     
1578554 ronny     20   0  592368 132636  82224 S  18.3   0.7   2:16.90 steamwebhelper                                                                                                                                     
1578596 ronny     20   0 9196408 420472 108172 S  13.2   2.1   1:48.26 steamwebhelper    

The processes with the highest CPU load are steam, using 75% of one of my cores. For nothing. What is going on in the background?

I guess here we see the externalisation of developer costs. Instead of it decreasing Steam’s revenue for employing someone who implements the better solutions, every user is paying the costs in their electricity bill. For one user it’s only a few Watts, but 60 Million people use Steam on a daily basis. Even if everyone has Steam open for just an hour, we are talking about hundreds of Megawatthours per day, or tens of GWh a year. This is the equivalent to what over 10,000 households use a year.

Writing this down is a nice reminder for myself to try not to implement the lazy solution, but invest the extra brain work to create something I can be more proud.

While I wrote this text, the steamwebhelper processes accumulated 23 minutes CPU time (in 33 minutes runtime)

How to be a bad citizen (for Government)

########### Deutsche Version weiter unten #####

I think a government doesn’t particularly like me because of my affinity for bicycles. The starting point for my thoughts is: https://www.gov.uk/government/news/government-announces-new-long-term-plan-to-back-drivers. However, this is not limited to the UK, I think the German government (and others) are no better.

Although I have a driver’s license, I don’t own a car. In the past, when I lived in the city, this wasn’t a problem at all, but now in the countryside it’s sometimes a little more difficult, simply because the distances are a little longer, for example for the weekly shop. But I’m still fit and healthy enough that I can cycle five miles home even with 15 kg of luggage. And thanks to the development of electric bikes, I have little to worry about the future. At the same time, I still have the bus as an alternative, which runs every half hour at important times and every hour at other times to the next city. However, I’m lucky because the small villages in the area are less well connected. Sure, everything takes a little longer by bike or public transport, but I save time in the gym and, above all, money (or working hours to earn this money). And this is why governments don’t like me:

  • Spending less money reduces the gross national product. Unfortunately, this is how many people still measure their life satisfaction.
  • Having more time for positive things can lead to more criticism of the government.
  • The reduced car production requires fewer workers -> See gross national product.
  • Fewer cars means less road repairs and fewer new road construction projects -> labor force and gross national product.
  • Less sales from car manufacturers reduces their donations to parties. As a private individual, I do not have the financial means to enable the same corruption as the car manufacturers.
  • Less oil consumption reduces party donations from the oil lobby. As a member of a bicycle club, I cannot compensate for this corruption.
  • Less road construction reduces the turnover of large construction companies. This also breaks down the supportive connection between construction company bosses, politicians and bankers between them.
  • Less exhaust gases/fine dust/CO2 increases intelligence. No politician can want that. For example, “For too long politicians have focused on the short-term decisions with little regard for the long term impact on hardworking families.” should not be question critically. I’ll interpret this: We want to continue to force families to invest in at least two cars so that they have less time for their children, children that grow up in car-optimised places, are surrounded by noise and the consequences for the environment or climate, is a problem for future generations.

My thoughts included: “Yes Minister”, “Yes Prime Minister”, the almost non-existent consequences of emissions scandals, the refusal of work by German transport ministers, leaked coalition negotiations, lending to politicians, police laws of the last 5 years and much more from things that I picked up over the years.

################## Deutsch ###############

Ich glaube, aufgrund meiner Fahrradaffinität mag mich eine Regierung nicht besonders. Ausgangspunkt für meine Gedanken ist: https://www.gov.uk/government/news/government-announces-new-long-term-plan-to-back-drivers . Allerdings ist das nicht auf das Vereinigte Königreich beschränkt, ich glaube bei der deutschen Regierung oder in anderen Ländern ist das nicht besser.

Obwohl ich einen Führerschein habe, besitze ich kein Auto. Früher, als ich in der Stadt wohnte war das überhaupt kein Problem, jetzt auf dem Land ist es manchmal etwas schwieriger, einfach weil die Wege etwas länger sind, zum Beispiel für den Wocheneinkauf. Aber noch bin ich fit und gesund genug, dass ich auch mit 15 kg Gepäck acht Kilometer nach Hause radeln kann. Und dank der Elektrofahrradentwicklung, mache ich mir auch für die Zukunft wenig Sorgen. Gleichzeitig habe ich noch den Bus als Alternative, der zu den wichtigen Zeit halbstündlich und sonst zumindest stündlich in die nächste Stadt fährt. Damit habe ich jedoch Glück, die kleinen Dörfer in der Umgebung sind schlechter angeschlossen. Klar, dauert alles etwas länger mit dem Fahrrad oder Öffentlichen, dafür spar ich mir die Zeit im Fitnessstudio und vor allem aber Geld (oder Arbeitszeit um dieses Geld zu verdienen). Und das ist, warum mich Regierungen nicht mögen:

  • Weniger Geld auszugeben schmälert das Bruttosozialprodukt. Daran messen leider noch viele Menschen ihre Lebenszufriedenheit.
  • Mehr Zeit für positive Dinge zu haben, kann zu mehr Kritik an der Regierung führen.
  • Die verringerte Autoproduktion braucht weniger Arbeitskräfte -> Siehe Bruttosozialprodukt.
  • Weniger Autos bedeutet weniger Straßenreparatur und weniger Straßenneubauprojekte -> Arbeitskräfte und Bruttosozialprodukt.
  • Weniger Umsatz der Autohersteller verringert die Parteispenden von denen. Als Privatmensch habe ich nicht die finanziellen Möglichkeiten die gleiche Korruption zu ermöglichen wie die Autobauer.
  • Weniger Ölverbrauch verringter die Parteispenden durch die Öllobby. Diese Korruption kann ich als Mitglied in einem Fahrradklub nicht ausgleichen.
  • Weniger Straßenbau verringert den Umsatz der großen Baufirmen. Damit bricht auch der Filz zwischen Baufirmenchefs, Politikern, und Bankern dazwischen weg.
  • Weniger Abgase/Feinstaub/CO2 erhöht die Intelligenz. Das kann kein Politiker wollen. Zum Beispiel “For too long politicians have focused on the short-term decisions with little regard for the long term impact on hardworking families.” kritisch zu hinterfragen. Ich interpretiere mal: Wir möchten weiterhin Familien dazu zwingen in mindestens zwei Autos zu investieren, damit sie weniger Zeit für ihre Kinder haben, deren Kindern in Auto-optimierten Orten aufwachsen, von Lärm umgeben sind und die Konsequenzen auf die Umwelt oder Klima, ist ein Problem für zukünftige Generationen.

In meine Gedanken eingeflossen sind: “Yes Minister”, “Yes Primeminister”, die fast nicht vorhandenen Konsequenzen von Abgasskandalen, die Arbeitsverweigerung deutscher Verkehrsminister, geleakte Koalitionsverhandlungen, Kreditvergabe an Politiker, Polizeigesetze der letzen 5 Jahre und vieles Mehr, was man über die Jahr so aufschnappt.

Rotation

With a time lapse video in the winter and in the summer, I could cover the whole northern sky: When it’s getting bright in one of the videos, it starts to get dark in the other one. Probably best to watch fullscreen:

Winter night sky time lapse. For full screen: https://youtu.be/SqYlLvelal8 (unfortunately, dew on the lens made the stars less visible)
Summer night sky time lapse. For full screen: https://youtu.be/qDIjs-YaC5Q

The reason behind is between the two videos, the earth has done half a round around the sun and so at midnight, when looking at Polaris, one looks from opposite directions.

Programming improvements 3

A few things of the many things I learned last months in Python.

For and while loops have an else option

I used to write code like this:

helper = False
for something in some_list:
    if condition:
       helper = True
       break
if helper == False:
   do_something()

That can be done so much easier:

for something in some_list:
    if condition:
       break
else:    # break wasn't called in the loop
    do_something

A similar option exist for while loops.

Few other little things were:

if helper == False:          ->            if not helper:

def method(somevar=""):      ->            def method(somevar=None):
    if somevar != "":                          if somevar:

List comprehensions were also a revelation. Instead of using:

newlist = []
for entry in some_list:
    if condition:
        newlist.append(entry)

condition could be something like “entry > 0”. Using a list comprehension, that can be a one liner and is also faster in the execution:

newlist = [entry for entry in some_list if condition]

While I still feel, it would have been nice, if I’d have learned these little things before (which comes from the thought I would be liked more, and from the expectation of perfectionism by me and because of that I also think others expect perfectionism from me – which is just not achievable), it is nice to pick new things up now. While I thought in my 20s that in many areas of life I can stop learning at some point, in the last years I learned that learning will never end in any part of life, and that is good! Because if I stop being willing to learn, I will go backwards.

Low sun in winter

During frosty days, just before the winter solstice, I came along this place.

Frosty meadow in England. The parts in the shade from the hedge have three days of frost to them, the other parts just one day.
Frosty meadow in England. The parts in the shade from the hedge have three days of frost to them, the other parts just one day.

The sun was shining the days before, and cleared the frost where it reached.

I was surprised, how wide the shady area was. My instinct would have been, that the shadow would just have been a bit wider than the height of the hedge. But it is much wider. In the picture I measured the width of the frosty area and the height of the hedge at a few places and calculated the angle of the suns maximum elevation using

alpha = arctan(height/width)
Height [pixel]Width [pixel]Angle alpha [degree]
344112017.1
656208017.5
1012361215.7
Measured values and calculated angle of the sun

In the table above one has to take into account that it’s impossible to measure with one pixel precision for a hedge on uneven ground. Another person might measure the heights 30 pixel higher, or lower, and widths 80 pixel wider or narrower (for the second row), which could vary the angle by about 1.5 degrees. That was the reason, why I did three measurements of different areas in the picture.

So I get about 16 to 18 degrees, which corresponds with the real value of 90 – 51 – 23.4 = 15.6 degrees. The values in the formula are:
90: mid day height of the sun over the equator
51: my geographical latitude
23.4: angle between equator and ecliptic.
At the winter solstice the latter value needs to be subtracted, at the summer solstice it has to be added, giving a height of 62 degrees for the sun during mid day

When calls and texts while roaming do not work

This post is as reminder for my future self. If roaming data works, and if you can get texts and calls abroad, but you can’t call anyone in the UK (the provider country), then you might have disabled international calls.

I was in Europe, had used data already, couldn’t send a text earlier, but didn’t think anything about it. And then I tried to make a call. But I only hear the call sound that the called number doesn’t exist, and later that the called number was busy. I tried a few things to investigate about a problem, as six months ago it worked fine:

  • I can’t make calls or send texts
  • I can receive both calls and texts
  • I can use mobile data
  • roaming is enable both in the Giffgaff app and on the SIM settings; and the little “R” was visible next the network strength
  • the problem remains when I change the network provider
  • I’m in the country for over 5 hours now
  • restarts don’t help (enabling aeroplane mode, restart, and leaving the phone off for a while)
  • I tried to use country (area) codes +44 and 00 44

From the first four points it was clear that roaming itself worked alright, and from the next that it wasn’t a problem with providers. But I couldn’t think about what could be the problem.

Only after a nights sleep, I went again to the settings provided in the giffgaff app. And then I saw that a few months ago I disabled International calls. I enabled them and suddenly calls were possible.

Epiloge

As I didn’t try a call before changing the settings, I then switched the settings back off, so that the scientist part of me could check that there was a causation and not a merely correlation. And indeed, calls weren’t possible anymore. And then I was told that settings could only be changed twice in 24 hours, so I had to contact the helpdesk to change the setting back. Which they did a bit later, since then all is working well.

More information

https://community.giffgaff.com/d/33630718-cant-make-calls-from-germany

Climate crisis at home (update)

Five and a half weeks after me writing about the dry weather in the UK we finally got some substantial rain (about 25 mm over 8 hours). After the rain I took another picture of the same hole as before:

Deep cracks in the soil in the garden on 25 August 2022. The remaining green grass is less green, trees are getting rid of their leaves due to drought. The hole has slightly filled up with soil falling of the cliffs.
Deep cracks in the soil in the garden on 25 August 2022. The remaining green grass is less green, trees are getting rid of their leaves due to drought. The hole has slightly filled up with soil falling of the cliffs.

The old picture:

Deep cracks in the soil in the garden, less than 10 cm of the 30 cm ruler stick out. At least some grass is still green, and we hope for rain before all died back.
Deep cracks in the soil in the garden on 17 July 2022. Less than 10 cm of the 30 cm ruler stick out of the crack. At least some grass is still green, and we hope for rain before all dies back.

I thought that the cracks got bigger, however, the pictures don’t show a clear widening of the crack. It’s not completely clear due to the different angles of the pictures. But still a good example why we shouldn’t rely on feelings or opinions when making decisions, but on measurable facts.

After the rain I also wanted to see how deep the moisture penetrated the soil, 6 hours after the end of the rain I dug a tiny hole. I was surprised how quickly the spade stopped, due to hitting dry soil:

The 25 mm of rain penetrated about 50 mm of soil, below the soil is still bone dry.
The 25 mm of rain penetrated about 50 mm of soil, below the soil is still bone dry.

It will take a lot more rainy days before the moisture will reach depths of over a meter and even longer to fill up the aquifers. With the measurement from our garden today, I think we would need this amount of rain every day for at least a month to counteract the drought. Forecast predicts no rain for the next 7 days, so I guess the top layer of the soil will be again completely dry by the time the next rain will be here.

Below I copied the text from my original article. And I actually feel I was quite good with my actions. I kept cycling most local journeys and reduced my meat and milk consumption and just bought the train tickets to go to Germany in a month (which is not the easiest travel, but luckily there is help: https://www.seat61.com/Germany.htm#london-to-leipzig-and-dresden-by-train)

In future these droughts are likely to occur more often, the last IPCC report is very clear about this. And there are things we can do. Like planting some trees in the garden (and maybe on fields?). From my experience in Germany and the UK, people don’t like trees in the garden (all this work with the leaves, …) but in our garden there is a clear difference in the number and size of the cracks in the shade of the tree and in the grass area. And huge difference in grass colour. I hope we can convince our landlord, to get the approval for a few more trees.

The reason for the climate crisis now, is however the behaviour of the generations from the 1960 up to mine. An economy was build on cheap oil and gas, without paying the true costs (and now people complain, when they have to pay prices closer to the real costs). All the work that needs to go in moving cities away from the coast, to repair infrastructure after it was hit by a heat wave (or much heavier/frequent storms/floods), all the lives lost in heat waves and other severe weather. We are paying now for the living standard of our grandparents (And poor countries for the wealth of rich countries, the colonialism still continues). And a further problem is the inflexibility for change in these generations (don’t take away my petrol car or the 200 km/h on a German motorway, I want to drive everywhere, why do I need to see wind farms or solar parks in my neighbourhood, one day a week without meat? – How dare you!). Unfortunately, these are the people that make politics and decisions. And they (and me) will be dead when we reach the 4°C average warming by the end of the century (that is the scenario our current goals announced by the politics head to), and future generations will have to deal with that. Parents usually say they love their children, but somehow their actions feel different.

So what can I do:

  • do I need to use a car, or can I spent a few minutes longer on the public transport (less stress) or use an (electric) bicycle (saves the gym visit)?
  • can I eat more plant based products? (lentil burger/bolognese, oat milk, bean based spread instead of salami)
  • do I need to take the plane, or can I spent a bit longer, but use the train? (challenging)

Programming improvements 2

A few things of the many things I learned last weeks in Python.

This is what I used to do to conditionally set settings:

class MyClass:
    def method(self, args**):
        <some code block>
        if some_arg == "condition":
            self.option = "this setting"
            <run some code>
            <call a method>
        else:
            self.option = "another setting"
            <run some other code>
            <call a different method>
        <some more code block>

myclass = MyClass()
myclass.method(args)

And it could be much more complicated.

Using an object oriented approach, can be so much nicer.

class MyBaseClass:
    def method(self, args**):
        <some code block>
        self._submethod(subargs**)
        <some more code block>
    @abstractmethod
    def _submethod():
        pass

The private submethod would then be defined in the child classes. First for “condition”

class MyClass_condiontion(MyBaseClass):
    def _submethod()::
        self.option = "this setting"
        <run some code>
        <call a method>     # can be in this or the parent class

Second for the else:

class MyClass_else_condiontion(MyBaseClass):
    def _submethod()::
        self.option = "another setting"
        <run some other code>
        <call a different method>     # can be in this or the parent class

To call the classes one could use the condition:

if some_arg == "condition":
    myclass = MyClass_condiontion()
else:
    myclass = MyClass_else_condiontion()
myclass.method(args)

With this approach the coding is so much neater. Each method knows what it has to do and there is no fuss about the settings.

While I still feel, it would have been nice, if I’d have learned these little things before (which comes from the thought I would be liked more, and from the expectation of perfectionism by me and because of that I also think others expect perfectionism from me – which is just not achievable), it is nice to pick new things up now. While I thought in my 20s that in many areas of life I can stop learning at some point, in the last years I learned that learning will never end in any part of life, and that is good! Because if I stop being willing to learn, I will go backwards.