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