Energy consumption vs time saving

There is a construction site at the feeway exit for my work place. Because of that, it takes about ten minutes more to commute. That triggered me to drive along the other site of lake Zug. It is the shorter route. But since it is a small road that goes through all the villages, it usually takes about ten minutes longer. What is more interesting, is the energy consumption.
On the freeway route the car usually consumes between 15 and 23 kWh per daily commute. The actual value depends mainly on temperature and weather conditions. The highest consumption values are with freezing temperatures and snow storms. This results in bad aero-dynamics and high rolling resistance combined with energy used for heating the cabin.
On the alternative route the car only consumed about 11kWh the other day. That was with moderate temperature and a short part of freeway. And this was still with winter tires, which usually lead to higher consumption.
The massive difference is not explained by the shorter distance, but by the slower speed. Hence by driving the shorter route, I could reduce the energy cost per daily commute from an average CHF 2.7 to CHF 1.7 but is this worth enlarging the commute from 2×30 to 2×40 minutes? Not really!
Oh and BTW, the daily commute by train would be CHF 25 and take on the order of 2×50 minutes.

Bitcoin Advanced Course by 21lectures

Last week I attended a Bitcoin Advanced Course that was hosted by 21lectures. Lucas who is also the president of the Bitcoin Association Switzerland initially wanted Jimmy Song to teach his Bitcoin courses also in Switzerland. But when that didn’t work out, he decided to build the classes himself, with the help of great quality teachers and developers from the local community.
To guarantee fruitful interaction, the groups are kept small. But when I arrived, the group was even smaller than I expected. What surprised me even more, was that a good portion of the students came to Zurich from other countries especially for this course.
The biggest part of the course was taught by James Chiang. He is preparing a bigger course that he will host online. It consisted of theory and practical exercises.
Setting up the environment for the exercises proved to be almost as challenging as the hardcore crypto theory.
For me, the most interesting part was the last day, which was about the Lightning Network. As it is still new technology that is in heavy development, there is not a lot of learning material around. All the more valuable was the first hand information we received from Christian Decker.
An important part of the whole experience were the lunches. Most of the times, the teachers joined, so that we could ask additional questions and have interesting discussions.
If you are interested in Bitcoin and programming, I can definitely recommend this course.

A somewhat interesting aspect was also how to get to Zurich. Downtown parking during office hours is really expensive, and there can be traffic jams. The venue was very close to the main train station. So it would appear to be reasonable to get there by train. But a return ticket for one day costs CHF 56. Lots of Swiss people have a half price card for public transport. They changed their terms a couple of years ago. I made the mistake of reading the new terms and discovered that they are really not acceptable. So I drove there by car, which cost CHF 4.15 for the electricity and CHF 36 for the parking. Still a lot, but also a lot cheaper then by train.

CppOnSea

I meant to write about CppOnSea for a while. The event is already a month in the past. So I better write down my impressions as long as I can remember anything. My comments will probably be shorter than had I written it down earlier.
Last year I learned from a podcast about a new C++ conference in Great Britain. It made a good first impression. As the details trickled in over the course of the ensuing months, I started to think it would be worth visiting.
When I asked around in the office who would join, I got only one positive answer. Reaching the venue by plane would not only be impractical, but I also didn’t really want to pollute the atmosphere. So I proposed to drive there with my electric car.
I checked the weather in advance, since what I wanted the least, was driving through a snow storm for a whole day. Exactly the night before we left, we had a good portion of fresh snow. As it was even on the highway, we made rather slow progress in the first two hours. The rest of the trip was uneventful, with the exception of having to drive over a small pass because a tunnel was closed in the Elsass. We took the tunnel below the channel. It is different than riding through the Swiss mountains on the back of a train, but not too much different. We arrived late in the evening at a nice old hotel on the cliff right next to the event hall where the conference was going to be. The breakfast was a lot better than what I remembered from previous stays in the UK.
A baroque event hall built right into the cliff served as the venue for the conference. During the breaks we had a nice view onto the sea, and sometimes we had the impression we could see France on the other side.

Opening Keynote: Oh The Humanity

The opening keynote was funny and entertaining. That is all I remember.

Postmodern immutable data structures

The speaker presented his library for immutable data structures. They enable a more functional style. It sure has something to it, but I don’t see a use case in anything that I am currently involved.

What I Talk about When I Talk about Cross Platform Development

He had a much broader scope than what I considered so far. It is interesting to know, but I don’t think I will use any of it in the foreseeable future. But it triggered me to think about using emscripten again.

Better Tools in Your Clang Toolbox: Extending clang-tidy With Your Custom Checks

I have known and sporadically used clang on linux for some years. But even though it is a great compiler I didn’t use it too much because you would have to compile everything yourself, rather than using dependencies from the apt repository. Also I knew that clang is shipped with VisualStudio, but only for cross compiling to ARM. What was new to me, is that you can also compile (but not link) regular desktop applications on Windows, with some work even MFC applications. This in turn allows the usage of clang tidy, which a good portion of this talk was about. What was also new to me, is that the MSVC compiler switch /permissive- causes VisualStudio to use a completely new compiler that is no longer built with YACC, but is much more standards compliant. This better compiler introduces breaking changes to old code. That is why we didn’t use the flag so far. But I think it would be good to slowly introduce it module by module. This way we could sanitize the codebase, and maybe later start using the clang tools.

Deconstructing Privilege

This one was in the main hall, and for all attendees. It had nothing to do with C++ or with programming per se. It was more about social interactions with minorities. I still don’t know why there was such an emphasis on this topic. But it seems to be a phenomenon at lots of IT conferences lately.

The Hitchhiker’s Guide to Faster Builds

Building the CAD I am working on can take up to an hour if I build only locally. Over the years we optimize the pre compiled headers from time to time, but also the linker takes a lot of time. So this was especially interesting for me.
The speaker ran through an extensive list of approaches to reduce build times. Lots of it was not applicable for us, or too esoteric. But one main takeaway was that I should look into union builds. He mentioned cotire to help with that. When we switched to cmake a couple of years ago, I tried to use cotire to simplify the handling of pre compiled headers, but couldn’t really get it to work. Maybe it is time to re-visit it.

Diffuse your way out of a paper bag

This one was entertaining, but I didn’t learn much from it, except for the british humor.

A linear algebra library for C++23

In a way it is surprising that C++ has no linear algebra library standardized by now. Because of this many independent libraries exist, and many companies wrote their own implementations. This could lead to the conclusion that it comes too late. But I was delighted to learn, that the proposed library mixes well with existing libraries and data structures. So we will see how much of it we end up using when it is finally released.

Sailing from 4 to 7 Cs: just keep swimming

This one was about tooling. Nothing that I think will be applicable for us.

Keynote: What Everyone Should Know About How Amazing Compilers Are

This one was informative and entertaining. He had many good examples of how amazingly good modern compilers are at optimizing our code, and work around bugs in certain CPUs. This video is worth watching even if you don’t work with C++.

How I wrecked the new glider by flying into a cable

We went skiing to Stoos lately. From time to time I went up to the Fronalpstock with the kids. Every time we were up there, I checked the conditions for paragliding. Every time, the wind was blowing from the back. Not very strong, but if it is from the wrong direction, it can be too much rather quickly.
When the day was almost over, I figured that I could also go to the Klingenstock, which is better shielded from southerly winds. When I reached the summit, there was virtually no wind at all. As the sun was already quite low, I could not spot some cables that I knew from the past. I knew I had to be especially careful.
I don’t fly at the Klingenstock very often, only once in a couple of years. The last time was with the speed wing, and I started close to the top on the west side. With the speed wing, I just glide with the skis and the glider comes up pretty quickly. I didn’t want to stretch the lines that quickly with the fragile single skin glider. That is why I descended a bit to a more flat area. I took off from there with a regular paraglider many years ago.
Now the single skin has a worse glide ratio compared to a regular glider. This is why after take off and flying straight for a while, I realized that it would get tight with clearing a small hill in front. My first reaction was to avoid it by flying left. But then I would cross the ski slope with very little ground clearance or possibly even having to land. This is not only forbidden, it can also be dangerous in some cases. So I decided to fly around the small hill on the right hand side. Thus I made a right turn of approximately 90 degrees.
And there it was. All of a sudden I saw a cable right in front of me frighteningly close. I had no time to think. Call it instinct or muscle memory, I immediately continued the right hand turn as hard as I could, to fly back to the slope. For a moment it looked almost as if I could clear the cable and perform a slope landing. But when I was only about 5 meters above ground, the upper left part of the lines connecting the glider to the harness collided with the cable. My forward movement came to a halt, and I slid down gently into the soft snow. Along the way down I could hear lines snapping and the fabric ripping. I was not injured or even hurt, but the glider looked like a wreck. I sent it for repair. But it turned out that it was a total loss. The glider was only two months old and had less than ten flights. Bad things always happen when the equipment is new! Like when I was ground handling a brand new glider 15 years ago, and a RC airplane hit it.
This was the most severe incident in my 17 years of flying with more than 2’200 flights.
In the aftermath it is always important to analyze what went wrong, and what I should have done better.
The first and most important thing is that I was not hurt. But could I have saved the glider?
To save the glider after I saw the cable, I could stall or spin it. That way I would hit the ground before the cable or slip under it. But these procedures induce a pendulum moment and/or spin movement. This is not what you want close to the ground. The risk of injuries would be way too high. In school we learned that some people overreact in this sort of situation, and involuntarily stall or spin the glider. This often results in injuries. So I am relieved that my instinct reaction was just right. I would act the same way if I had the time to fully evaluate the situation.
If my reaction was correct after the fact, what could or should I do better that it couldn’t happen in the first place?
The easiest answer would be to look out carefully for any sort of obstacles. The bad part about this, is that I actually did that.
The next would be to inform about a flying area before going there. When leaving home, I expected to fly from Fronalpstock which I know fairly well. And even if I considered flying from Klingenstock, I don’t think I would look up the map with aerial obstacles, since I was flying there before. But maybe I should.
Cables can be dangerous also for other aerial vehicles like helicopters. There are efforts to remove cables that are no longer in use. So I asked the corporation that owns the land about the cable.
In the meantime I already received the replacement, which is the exact same model of single skin paraglider. Last weekend I used the new glider for the purpose that I bought it for : run and fly. I ran halfway up the Urmiberg an flew down.

Run and fly with the XXLite2

Before I participated in the rollibock trophy in Fiesch last October, I thought my paraglider equipment was fairly lightweight. The glider is a regular Mac Para Marvel, but the Advance Lightness 2 harness is optimized for weight as the name implies, as well as the accompanying backpack. With helmet, gloves, sun glasses, flight computer and clothes, the equipment is slightly less than 14.5kg. When I started paragliding in 2002, a normal equipment was about 20kg. For reference, My tandem equipment is around 30kg, and my competition equipment also was in that ballpark.
When I looked around the participants at the rollibock, I was astonished by the small and light backpacks they had. They were literally running up the mountain. When single skin gliders were first released, it didn’t spark my interest. They were a strange appearance, and the flight characteristics looked slightly frightening to me. But a lot has improved since then. Some models have tubes along the leading edge, others from front to back. They have a lot better characteristics and performance than the first models. I started my research in the internet. Some models weight only 1kg.
Best of all, I started thinking how cool it would be to combine hill running with paragliding. I try to run once a week from Brunnen to Morschach and back. Depending on my daily condition, I make it up to the cable car, or I turn around shortly before I reach Morschach. I always prefer running uphill. Especially since I started getting cramps in my forearms on the descent, sometimes even extending from there. It only happened on longer tours, and only on the descent. After a while I found out that it was caused by dehydration, and I took detours to water sources. I didn’t want to carry anything when I go running. But carrying an ultra light paraglider is something entirely different.
So I asked the loal flying school for an Ozone XXLite 2 glider for a test flight. November is the worst month for flying in Switzerland. The weather is mostly bad with lots of fog, and most cable cars are closed for revision. When the weather was finally flyable, somebody else grabbed the wing already a couple of times. In early December, I finally got to try it. I didn’t really know what to expect. Some people I talked to, praised single skin gliders as great and fun, while others dismissed them as falling out of the sky like a stone. I completed two flights from the Rothenflue. Take off was very nice both times. With the slightest blow of light wind, you can bring it above the head and maintain it there. Also without wind it was easy to get airborne. The handling was surprisingly similar to a regular paraglider. It doesn’t flare as well as a regular wing, but it does flare somewhat. I didn’t know beforehand, but most single skin gliders apparently don’t flare at all. Apart from the handling, I was mostly interested in the performance of the glider. Of course it was not made for performance, and is far from regular gliders in that respect. The teacher from the school providing the glider told me to expect something in the range of a school glider at the time I started flying. When I checked my XCTrainer in the air, I mostly saw glide ratios between 6.5 and 7 with speeds around 35km/h. For comparison, my regular glider has a glide ratio of around 9 and a current high end comp glider is slightly above 10. The trim speed again seems to be different from other single skin gliders that apparently mostly fly less than 30km/h.
My resume after the first two flights was that the flying characteristics are good enough, and the small and ultra light package is just astonishing. In short, I ordered one on the same day. Luckily the forecasted delivery time was was much shorter than I expected.
A week after ordering, I picked up the new wing including the super light harness that I didn’t see before. Of course I bought the glider at the flying school where I can pay with Bitcoin.At home, I installed the special lightweight carabiners and the speed system. But the weather really didn’t look good. We had occasional rain and very strong wind for days. I added a ribcap and gloves to the kit. With this addition, the backpack now weights 1.8kg.
As the first chance of getting good enough weather, I went to the Zugerberg. Instead of the usual walking to the takeoff, I ran. The light backpack really doesn’t bother at all. Even with light wind from behind, the glider took off flawlessly. The gliding ratio was enough to clear the trees halfway down. When I started paragliding, some school gliders had to land before the trees here because they didn’t glide good enough. Also the landing was smooth. The only thing that was strange was the cold wind flowing around my butt. Usually it is very comfy in my cocoon harness. The equipment is packed rather quickly into the backpack, and I was ready to run up to the train. From the train of course I ran again to the car. So my first flight with the new kit was not a pure “run and fly”, but I can say that it works as I envisioned. Now I’m ready for the real “run and fly” adventures.

Generating solar electricity at home

After I switched to an electric car, I started to care much more about where the energy we consume comes from. With petrol and diesel you don’t really have that option. We are in a comfortable situation that we have some small hydro electric dams nearby. Thus all the electricity we use at home and for driving around, comes from 100% renewable, local production. When you meet with other E.V. drivers, renewable energy production is always an interesting topic. Lots of these folks have their own solar panels on the roof. Solar is especially interesting as it has no moving parts, and can be employed by private people. It becomes more problematic however if you don’t own a house. We live in a rented apartment, thus we have no option to put our own solar panels on the roof. Not all is lost fortunately. Recently I learned about panels with an integrated micro inverter that can be plugged directly into a regular plug on your balcony. According to Swiss law, up to 600W can be installed by private individuals. They only have to notify their power provider.
So I ordered an ADE Geranium from Energiegenossenschaft that I could pay with Bitcoin. Last week it arrived, and I immediately installed it in our garden. It can feed up to 250W into the plug. I don’t expect to feed a lot of this into the grid. It is more to reduce the standby consumption by refrigerators and computers. 250W is peak anyway and not often reached. In the first week after installation, it only produced 3.5 kWh. So it will likely take 10 years for it to amortize. But it comes with a 25 year warranty.

Bye bye Jaguar

In my former Job, I visited customers from time to time. One day in 2001 on a parking lot across the street of a customer, I saw a gorgeous Jaguar XJ. It was from the second series, painted in British racing green and had a vinyl roof. It didn’t have a price tag, and I thought I would never be able to afford a Jaguar anyway. But out of curiosity I asked what it would cost. The answer was CHF 6’000 from the inspection or CHF 4’000 as is. I was blown away. Never would I have thought that this car could be that affordable. A friend warned me by telling a story of somebody bringing his Jag for a repair and asking for the price. The answer was that if you drive a Jag, you don’t ask how much it costs. Nevertheless I was hooked. That is how my love for Jaguar cars started. Before that, I viewed them as beautiful, expensive old men cars. Of course I wanted to buy the car with a valid inspection. I called the mechanic many times, and he always told me that he didn’t have time to look at it. Until one day he told me that he wanted to take the car on the lift, and the lift went right through the rust. So this one was not worth it, but there must be others. Hence I started to look for other XJ cars from the early 80ies. On customer visits, occasionally I drove detours to Dealers that specialized on vintage British cars. That is how I learned about the XJS, and henceforth included it in my search.
In the summer of 2002 I found an XJS that I liked. It was from 1984, in very good condition, had 75’000 km on the clock and should cost CHF 10k. On the test drive I heard a strange milling noise when driving around corners. The owner agreed to give it cheaper, and I took the risk of the repair for that noise. Luckily it turned out to be just a faulty rubber part on the mounting of the transmission.
I drove many pleasant trips with the Jag in the past Years. The mighty V12 5.3l engine runs incredibly smooth. And the car was always very reliable. Of course I had some repairs, but nothing to complain about. It always consumed a lot of gasoline, and leaked some oil. That was just part of it.
Most trips were within Switzerland, often with the Jaguar Drivers Club. Only in the last few years, we drove to the Lego Land in Germany and to Elba island in Italy. We wanted to drive to Elba with the Camper, but after too many coolant pipes bursted, we used the much smaller, but more reliable Jaguar instead. Unfortunately this had an unpleasant side effect.
When the car turned 30, I registered it as a veteran. You can only get that status if the vehicle is in very good and original condition. It is basically classified as worthy of conservation. But that status was later renounced because I drove too many kilometers (the Elba trip).
After 16 Years of ownership, I sold my Jaguar XJS. It was not as easy as I anticipated, and in the end I gave it for much cheaper than I wanted to. But after switching to an electric car, I simply lost interest in polluting vehicles. When I sold it, it had a little more than 135’000km on the clock. So I drove it for about 60’000km in 16 years. The bulk of it was in the first few years.
If Jaguar delivered the I-Pace two years earlier, I would probably stayed with the brand. But a recent article just reminded me that I am very well served with Tesla:
https://www.topgear.com/car-news/electric/top-gears-big-jaguar-i-pace-test-journey-back

Charging at a strangers house

We spent the last week in an alpine Chalet and had to leave the car in a public parking halfway down the mountain. Upon arrival, the battery was down to 20% SOC. I read that leaving it below 20% or above 80% for extended periods of time was not too healthy. So I asked at a house next to the parking, if I could plug in the car for a while. They seemed friendly and agreed immediately. I told the man that I would need about 40kWh, and asked how much the electricity costs. He said he had no clue and I would have to know.
When I came to pick up the car, I gave him about twice as much as the electricity would cost at the most expensive rate known to me, and about three times as much as I pay at home. That was when he started complaining. He said when he goes to the gas pump with his ICE car, he wouldn’t get a lot of gas for this price. And if he knew that I was going to pay so little, he wouldn’t let me charge. Same for me, if I knew he would be discontent, I would rather drive 20 minutes to the next Supercharger, get free electricity, and still be welcome.
I never paid so much for a charge as I gave him. Usually if the electricity is too expensive at a public charging station, I just drive on to find something reasonable. But I paid him more than I usually would, because I wanted it to be a good experience for him.
I read about mostly good experiences when asking strangers for a plug. But after this incident, I will think twice next time.
What were your experiences with charging at a stranger’s house?

Spending Bitcoin while charging the car

When I go some place new, I always check out what Bitcoin accepting venues there are. I usually try to prioritize shops that accept crypto currency.
When I drive some place far away, I have to charge the car on the way. No big deal, usually I can eat, drink or go to the toilet. All those activities, I prefer not to perform in the car while driving anyway. When I’m done, the battery is charged enough to continue the journey.
But how cool would it be to combine the two. If there was a restaurant that accepts BTC next to a supercharger, I would eat there for sure. Unfortunately finding this information manually is a hassle. That is how the idea was born to write a simple script to correlate charging stations and Bitcoin shops. I did it only quick and dirty. It could be improved a lot, but I’m not sure that is necessary.
You can visit a map with the correlated locations on ZeroNet: Bitcoin shops at car charging stations
If you want to have a look at the script that compiles the list or improve it, you can do so at: bitcoin_supercharger.py

Green Technology Tour

Charles and I are going to participate in the WAVE (world advanced vehicle expedition) along the Grand Tour of Switzerland. This years tour will take place from June 8th to 16th and is titled “Green Technology Tour”.
We enter the trophy as Team Bitcoin with a big BTC logo on the frunk.
The tour will have well publicized stops at approx 40 cities. I’m very excited to spread the word about decentralized payments, and that Bitcoin is so much more than speculation…

You can follow our team blog directly on ZeroNet:
zero://wavebtc.bit
or through a proxy:
http://zeronet.ulrichard.ch/wavebtc.bit
https://zero.acelewis.com/#wavebtc.bit
The proxy links may not work every time. The second one randomly redirects to different proxy servers, some of which can be temporarily down, or don’t allow adding new sites. If you get an error, just try again, or better yet install ZeroNet.
In that respect ZeroNet is very similar to Bitcoin itself. Both networks are incredibly reliable and resilient. Unfortunately that doesn’t apply to the connection to the old world: The exchanges for Bitcoin and the proxies for ZeroNet.

General info about the WAVE is at:
wavetrophy.com