A person, getting along through life. Part of that I like to share in my websites, blogs and videos. Sharing my positive experience is easy, but I also try to share connected challenges, and hope that other people can relate, or maybe just be a little bit inspired.
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)
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.
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.
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.
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]
344
1120
17.1
656
2080
17.5
1012
3612
15.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
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.
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.
The old picture:
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.
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)
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
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.
Before I moved to the UK, I heard of the rainy, foggy weather here. Typical English weather. But I have to say, that is not at all my experience. During the cycle commutes to and from work I got wet rarely and only at the a similar rate as in Germany. Although, these cycles are slightly biased, as I check the rain radar and have stayed half an hour longer to let rain pass, or left work a bit earlier to get home before the rain clouds arrived.
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.
Now it has been a very long time since I last was out in the rain. And that’s not because I haven’t been out. While most of June was relatively cool with many days below 20°C, it didn’t rain much. So far July was very dry as well, at higher temperatures. The really hot days, however, are still ahead.
The dry weather is definitely visible now. On my recent cycles I saw so many brown meadows or village greens. And the cracks in the soil in our garden get bigger and bigger. I never have seen such deep cracks in soil with vegetation on it.
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)
Actually I wanted to meet a friend tonight who has his job at the university in Central Europe and wanted to go to a friends wedding at the weekend and wanted to see some other friends before then. But as the meetup didn’t work, I can write a little bit about racism. Racism is the reason why he cannot enter the UK. He has the wrong passport and therefore does not have the privileges that one has with a Western European, North American, and probably also Australian, New Zealand, or Japanese passport: You can get into almost any other country without a visa. He only got as far as the check-in counter at the airport, where he was told that he was not allowed to go to England and would need a visa to enter the country. It’s just not on the British Border Control website, so he didn’t apply for one. And for many years he could easily travel without a visa.
At least the airline was kind enough to put him on a later flight so that he could make a few phone calls to the British Embassy and his nationality’s embassies in the capital and in London, as well as British border control. And there seems to be this rule with the visas, but not officially, because the British are too cowardly to cancel the mutual agreement on visa free entry, and instead have only an internal rule for their own border protection. After seven hours of phone calls, it was clear that the trip would not work out.
And of course nobody is responsible either, there is nothing official, so that he will still have to pay his own expenses.
And all because he was born in a country on the African continent. And that’s the racism of the white western world. This is not only a British problem, also in France, Denmark, Germany, Spain, Austria, Sweden, other European countries we treat certain groups of people as second class citizens. Every day.
A few things of the many things I learned last week in Python.
My draft when a new optional dictionary was added to the method:
def method(self, arg1, options={}):
However, a better version was suggested to me:
def method(self, arg1, options=None): options = (options or {})
And the other big learning through code review was, when constructing a string from a dictionary. My complicated code:
for key1, value1 in options.items():
if key1 == "searchString":
for key, value in value1.items():
result_string = f"someString.{key}.{value}"
The suggested version is so much neater:
for key, value in options.get("searchString", {}).items():
result_string += f"someString.{key}.{value}"
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.
Recently I was made aware about an impressive moon halo, also know as moon dog. I have seen light versions of it before, but not as clear.
It happens when a layer of ice crystals forms high in the atmosphere. Each of the crystals then acts as a prism, refracting the light into a certain way. It’s a similar (and yet not) effect like when a rainbow forms. And actually a moon halo also has a colour gradient, the inner bit is red, the outer bit is blue. However, in my image that is not visible, a longer exposure time would have been good. Next time 🙂
Instead, what I did was recording a time lapse for 30 minutes:
30 Minute time lapse of a moon halo
While some clouds move very quickly, the only apparent change of the halo is caused by earth’s rotation (the moon and halo moving along the image). This also made clear, what are stars and what are optical effects/defects from the lens. Right to the moon are Castor and Pollux of constellation Gemini, and below the moon, next to the tree, is Procyon. All stars fainter than magnitude 2 are invisible due to the scattered moon light (which itself is just reflected sun light).