Quality

Quality is important

During the apprenticeship at Victorinox we were indoctrinated with “quality above all else”. The teacher told us that also in our private lives we would be better off buying quality products even if they are considerably more expensive than throwaway products. Part of it stuck with me ever since. But I relaxed the rule somewhat. I usually assess how much I am going to use a product before I buy it. If it is a tool I expect to only need once a year, I buy a cheap one. The good ones are for people who need them in their everyday work.
But shoes are something entirely different. When I switched from the machine industry to software development early in my professional career, live became better. Shortly after the salary hike, I visited a shoe store. When the sales lady talked me into buying a pair of fine English goodyear shoes, I reminded myself that quality pays off in the long run. I have had these very same shoes for 19 years. I used them a lot and they are still very comfortable. Over the years, they needed some minor repairs. From above they still look perfectly fine, but now they are worn off, so that a bigger repair would be required. The cost would be about half of what a pair of new ones cost. I hesitated a while. Nineteen years is already quite remarkable, but how cool would it be to have 40 year old shoes that are still in regular use? On the other hand, by buying the almost same model from the same manufacturer at the same store, I am rewarding them for their exceptional work.

Economics are even more important

Producing quality products is unfortunately no guarantee for success in our society. A school mate once told me that his father worked as an electrician in New York. He was fired because the stuff he did never broke.
Quality control is well understood in the mechanical manufacturing industry. We worked with precisions of 0.01mm on a daily basis. It is also understood on the broader scale. Companies rigorously test their products before going into mass production.
But it is an entirely different beast in software. There are many facets to it. They range from not crashing, deliver expected results in all edge cases, robust against malicious attacks, execution time, energy efficiency, to maintainability of the source code. As an engineer, it saddens me to no end to witness that companies with the lowest quality software do so well economically. What could be the reasons for that? What is so different in software from hardware? The most obvious difference is that software can be patched so easily. Found a critical bug? Just push an update that fixes it. I used to say that software is newer and not as well understood as other disciplines. But after 17 years in the field, I no longer think of this as a major contributing factor. After all, the mechanical first industrial revolution happened also not a lot more than 100 years ago. I think the customers or end users are responsible to a large degree. As long as companies can sell sloppy products with aggressive marketing, why should they invest into quality? I hope that the digital natives, that are growing up with ever more technology, have a better understanding. But it might also be that they accept the current state as the reality we live in.

Categories: Software | Tags: | Leave a comment

Charging electric vehicles with Bitcoin

In my last post I ranted about the current payment methods for charging E.V.s. The electricity for a full charge of an electric car costs something in the range of $2 to $20. But most of the time, we only need a partial charge. Credit cards impose enormous fees on low value transactions, and require expensive equipment. PayPal even adds on top of that. This is why some energy providers opted to use RFID membership cards. Unfortunately there are many of these. Most have excessive annual fees. They are mostly incompatible island solutions and they usually offer bad deals. So let me explain why Bitcoin offers the perfect solution here.

Machine to machine

Some car manufacturers are already looking into equipping their vehicles with digital wallets. And some power companies are looking already into blockchain payments. So the car could pay directly for the power. This can be done exactly and trustlessly with use of Bitcoin payment channels. The cars already communicate with the charging terminals, so payment would be just one more stream of information. Because Bitcoin accounts don’t need to be tied to a person, and you can create as many accounts as you like, it is no problem to have a separate account for the car. Or you can share an account between your car and other devices. Whatever fits your use case best. The same goes for the infrastructure provider. He can maintain a separate hierarchical deterministic wallet for every charging station. It would even be relatively easy to put a protocol in place where the charging station doesn’t even need an Internet connection by itself. Instead the car or the consumer could present a proof that was signed by the energy provider that a valid payment was made. The possibilities are endless.

Accessibility

Bitcoin wallets exists on almost every operating system. Most of them are open source. This is in stark contrast to proprietary apps that some charging providers advertise. If they have one for Android and one for iOS, I’m out of luck. It won’t run on my Ubuntu phone.

Transaction costs

When I started with Bitcoin in 2011, transaction costs were really neglectable. They were optional, and usually a fraction of a penny. For a long time they were at about two pennies, which is still minor. Only recently they started to raise to about 20 pennies for an average size medium priority transaction. This is still comparable to Maestro cards, and way below credit cards. But it is not so great at the moment for micro transactions. The reason for this is that the block size is capped and the limit was reached. Thus a fee market emerged, where you pay a higher fee to have your transaction included in a block sooner. The Bitcoin community is in deep crisis over this. It is not as bad as it sounds though. Because Bitcoin is an open, distributed system, there is no dictator or board of directors who decides the course behind closed doors. Instead the discussion is held publicly. Everybody who feels he has something to contribute, can take part. It can take longer to come to an agreement, but the chances of getting a good solution are maximized this way. Consensus is something sacred with a trustless distributed network such as Bitcoin. So trust me, the fees will decrease again one or another way. If we can even call it a problem when comparing with other options.

User agreements

Do you know somebody who likes user agreements? Do you know somebody who reads everything he signs? I don’t, eventhough I force myself to read more than I would like to. If a multi page agreement is required to sell something or to make use of a service, that is a clear indication that there is something wrong with the design of the product. If I see an overly lengthy agreement before I can use something, I get offended and run away. The occasions where it is difficult to find a better alternative are few and far between.

If I buy a hammer in a store, I don’t have to sign neither the seller nor the producer off a liability in case I break something with it. If I buy a power tool, I don’t have to sign a letter to make nobody reliable if I electrocute myself. Even the company delivering the electric power cannot be held responsible if I get an electric shock. And I don’t have to sign them off before they would deliver electricity to me. This is because there are rules and regulations and certifications. We know how these tools are supposed to work, and we make sure they do so.

So why do I have to sign pages of incomprehensible legaleeze before opening a bank account or applying for a credit card? Why do I have to sign a user agreement when I want an RFID from one of the power providers for E.V.s? Why do I have to sign off my privacy rights before using an online service? Because the product is poorly designed!

I don’t have to sign anything to open a Bitcoin account. Not even if I want to create a million Bitcoin accounts. I can just do it. Bitcoin is asset based. So whoever or whatever is in control of the private key can spend the funds. Clear and simple.

Clear and simple

Charging an electric vehicle should be at least as simple as fueling a gasoline car. You can usually pay in cash or debit card. I heard that there are charging stations that you can pay in cash. So far I found only one. During a short flight yesterday I charged the car at the Swiss Holiday Park. This was actually the first time I payed for a charge. It was a good service at a reasonable fee.
Only Bitcoin could make the experience even better.

Categories: BitCoin, Tesla | Tags: , | Leave a comment

Charging electric vehicles

First experience

In a month of driving the Tesla, I collected some experiences but I feel I’m still a newbie. Charging is obviously very different from fueling a car. I gathered some information before buying the car, but it turned out I still had some misconceptions. The first thing I realized on the day after picking up the car. In retrospect I’m not sure why I was so fully convinced that there was a supercharger at the service center in Cham. It was somehow part of the decision to buy the car. So I drove to work, and the car displayed a warning that the battery would run low, and I should look for a charging opportunity. But it only suggested some hotels with destination charging in the area of Zug. Unimpressed, I drove to the Tesla Service center in Cham, and started looking around for the supercharger. A friendly employee informed me that they didn’t have any of these here. But I could charge it at their 22kW plug. While it was charging, we registered the ownership change, and I could look around in the shop. Another employee showed me lemnet.org, a website that displays charging stations on a map.

Near the work place

With this site I found three charging stations within walking distance of my work place. All three were listed as free and without restrictions. The closest one has two parking spots that are very visibly marked for electric vehicles. But after I plugged in the car for the second time, somebody informed me that they are intended only for customers. Ok, nothing wrong with that, but then it should be corrected in all the websites. I sent an email to the company that I would be willing to pay, if I could charge there regularly. So far I didn’t receive a reply. The next one is at a dealer for German cars, where my brother bought his eGolf. It would even allow for faster charging, if I had an adapter. Sometimes it is occupied. The third option is in a shopping mall. They have at least 4 spots, and so far I always found an empty one. Power is free, but I have to pay for the parking. And sometimes it only delivers 11kW. So for these three options it usually takes half a day for fully charging up. It is walking distance, but to drive the car to the other side of the railway tracks during the lunch break is almost 5km.

At home

Obviously the best option to charge an E.V. is during the night at home. Electricity is cheaper during the night, and the car is idle anyway. My brother was responsible for the electrical installations at the building we currently live. He told me that it would be no problem to install a charging possibility in the subterranean parking. A cable rail already runs from the distributor and electricity counters to exactly our parking spot. So I thought I would obviously get the permission to have a plug installed. To my big astonishment, I received the refusal only after I bought the car. When I asked for the reason, I only received a vague excuse.

Near from home

Public charging options are not so great where I live. There is one across the street, but with a really bad deal. More on that later. The next would be at the lake front with a Restaurant. That might be an emergency option to have dinner there, when the car needs an urgent refill. Then there are the shopping malls in the neighboring towns which offer free power and even free parking wile they are open. But the amount of power is limited so that charging takes longer than even the longest shopping marathon. There are good charging stations in a 10km radius, but I have to combine this with another activity.

At the work place

In the meantime I asked my employer, if I could install a plug at the parking in the office. Of course I would pay for the installation and the power. He has to check with the owner of the building. So an answer is still pending. So much to day to day charging.

Supercharger

For longer trips, there are obviously the Tesla superchargers. They are simply great! They are even greater after you explore other options. The navigation software plans supercharger stops into the trip, and calculates the remaining battery power at the destination. No only that, but it even displays how many stalls are occupied before you arrive at a supercharger. You get there, plug in, and wait for it to charge up. Of course it takes longer than fueling gasoline or diesel. But compared to all other E.V. charging options available today, it is more than twice as fast. Once you charged enough, you simply pull the cord, and drive on. I never had an issue with a supercharger. They simply work great. Most of the time for longer trips, superchargers are all you need. You might have to drive minor deviations, but that’s usually fine.

Other public charging infrastructure

Nonetheless, I wanted to try other charging stations. I’m still hesitant to buy the CHADEMO adapter for fast DC charging. But whether it is DC fast or AC slower charging, is only one distinction. The more important one turned out to be whether it’s free or not. In general I am not opposed to paying for a service I consume at all. Quite the opposite. I believe that if I pay for a good service, then it will be there also in the future, and maybe even improve further. But so far I never payed for charging. And the reason is simply that I could not. I have no exact data, but my impression is that about half of the public charging stations are free at the moment. Of course this won’t stay that way forever. It is more like a promotion, and the sponsors range from cities to energy providers to shopping malls. Half of the remaining stations support payment with NFC enabled credit cards with a hefty additional fee because of the credit card. Since I don’t have a credit card, I couldn’t make use of that option. What is left is a jungle of RFID cards and physical keys and whatnot. There are countless offerings where you pay an annual fee of usually around $100. This will give you access to a number of charging stations whose number and distribution wary greatly. For some offerings this flat rate is all you pay. For others you have to pre-pay, and still others will send you an invoice. The prices are sometimes per kWh, sometimes per hour and sometimes a combination. Most of the time it is not transparent what you would pay. With one operator you can send a text message that would charge your mobile a one time fee of $8 for one hour of charging. You could call this extortion of people with empty batteries. To make a long story short, paying for charging electric vehicles is pure horror. I don’t plan on making use of the offerings I encountered so far. Instead I wait and hope and suggest that it will soon be possible to pay with Bitcoin. This would be a match made in heaven.

Frequency of charging

The first thing people usually fear with E.V.’s is what would happen when the battery runs flat. Granted, that is not such a nice thought. And I’m not intending on finding out. The cars navigation system does a great job at helping to avoid such a situation. A friend of my brother reported to being able to drive for quite a distance after the indication for the remaining distance went to zero. This is probably not very healthy for the battery. During regular operation you usually don’t charge above 90%. This has two reasons. On one hand charging gets slower the closer to full you get. And on the other hand, it is also better for the health of the battery not to fully charge it too often. So 100% charge is in preparation for longer trips. But I also don’t feel too confident to go below 15% in regular operation. The reason is that should something unexpected come up, I want to be able to drive to e.g. the hospital and back and then still be able to reach a charging station. For all of these reasons I charge the car usually three times a week.

Proprietary standards

Even if the plug of the Tesla is a standard Type 2, it makes use of proprietary extensions. No other cars can make use of the superchargers, even if the plugs would fit mechanically. I am usually strongly opposed to such practices. If it was on a larger scale it would be monopolistic. I believe that open standards and interoperability are very important. So why do I support a company that develops their secret sauce? Tesla is still a startup compared to the incumbent car companies. Even if they have great successes by any metric, it is not granted yet that they will succeed long term. I certainly hope they do! Tesla has an advantage with knowledge in electric vehicles, with batteries and charging infrastructure. The traditional car manufacturers have an advantage in mass production and supply chain management. Both are catching up to each other. Now it is important that the intersection will happen at the right spot. I hope Tesla will open up their charging infrastructure to other cars in the future, even if that could imply that I will have to wait in line some day. But it would be too early now. Tesla needs every advantage they have at the moment to succeed. The Model3 will be their grading test. Elon Musk displayed a healthy attitude in the past by sharing the patents, and with his remarks after Dieselgate. So I’m confident he will do the right thing.

Categories: BitCoin, Tesla | Tags: , | 1 Comment

Buying a Tesla with Bitcoin

The first car that I bought at age twenty was dirt cheap, and didn’t last for more than two years. Then followed some Rover cars that were better, but also didn’t last very long. I was always the last one to own a car before it was no longer economic to fix it. After a while I wanted something better, and bought a Jaguar. Later I wanted a camper and bought a Volkswagen. I have had these two cars for 15 and 12 years. In the meantime they are 33 and 28 years old. The Jag was never an everyday car, and I didn’t use it when there was snow or salt on the roads anyway. Neither is the camper a typical everyday car. But as we didn’t want a third vehicle it would have to serve for weekend needs. I went to work by public transport. Over the last years our beloved Buessli started to fail us, and we used it to sleep inside less and less. Part of the reason for having two cars was redundancy. But lately when the camper had engine problems during winter, we ended up without a working vehicle. We had to go skiing with public transport. After a while we became annoyed.
Thus we started talking about selling it and getting a regular car. My wive also wanted me to sell the Jag. But I was opposing strongly. Meanwhile my brother bought an electric car and rejoiced about it. In my head an idea started forming that I would be ready to sell the Jaguar, but only to get a Tesla. If only they were cheaper. We didn’t want to wait for the Model 3. I would like the Model X very much, but the price was just too much. I would also like the Jaguar I-Pace, but it comes too late and again the price. So we started to look around for cheaper electric cars in general. One important condition is that the range lasts to the Wallis to visit the family of my wive. That’s where most electric cars on the market failed. Peugeot announced one for this year, but nothing was around for a test drive. And it would be a very small car, not really suited for a family to go on holidays.
Replacing our two special cars wouldn’t be easy anyway. The Jag is a sports car with a V12 engine that runs almost as smooth as an electric. The VW Camper has lots of room and beds and a kitchen. And then the new one should be electric.
A used Tesla S seemed to be the only option. It has enough range, enough space, enough power and is very nice to drive. But again the price … Fortunately the price of Bitcoin kept rising over the past years, and my investments appreciated enough to make this a possibility. And I wanted to buy my next car with Bitcoin anyway. I had a “Bought with Bitcoin” sticker ready for quite some time. Still few people have enough experience with the magic internet money to sell a car for it. Tesla would not sell cars directly for Bitcoin yet. There are a couple of stories of people who bought Tesla cars, but it was only through retailers. The closest being Auto Outlet in Finland. They would happily sell one to me, but the prices seemed to be even higher than in Switzerland. Reading up about car imports wasn’t encouraging to say the least.
So I asked a couple of people who wanted to sell their cars in Switzerland if they would do it for Bitcoin. Most replied “no” straight away. I didn’t want to talk anybody into something he doesn’t understand. So I kept asking. One gentleman agreed if we would make the transfer at a broker. But then he sold the car before I could even test drive it. Yes demand is high, and they usually sell quickly. So when another gentleman replied with a price in Bitcoin, I knew I would have to act fast. The test ride was very nice, and the same evening I convinced my wive, just in time.
Yesterday we went to collect it. The boys keep asking me why it is not as fast as the Jag. I had to tell them a couple of times already that in the 15 years I have had it, I never drove it faster than the Tesla top speed. And the Tesla accelerates faster, which is more fun anyway. It is about 1 second faster to go from 0 to 100. Still far from the model with ludicrous mode, but more than enough for all practical purposes.
The car is truly totally different from any car I drove in the past. It’s a blast, and hard to describe with words alone. People generally love their Tesla cars, but this guy has a very good way of expressing it.

TeslaBitcoin

Categories: BitCoin, Tesla | Tags: , | Leave a comment

Hackthevalley Hackathon 2017 Baar

Motivation

After the good experience last year at the six fintech hackathon, I was trilled to go to hack the valley which is even closer geographically and whose subject is even closer to Bitcoin. My goal was to gain experience with ethereum. So far I only completed the tutorials. I found the technology very interesting, but in the past, I couldn’t come up with a good idea how to make use of it. Neither did I learn of a killer product that went live. This is in stark contrast to Bitcoin. When I first learned about Bitcoin, it was immediately clear to me that this was something very special, something that I waited for without knowing.

Team formation

In contrast to the hackathon last year, most people already showed up as teams. I estimate that only about three of the fourteen teams were formed on site. I joined three guys from a bank in Paris, along with another French guy and a South African who lives in Zurich. First we had to decide on a project. We went through a list with a couple of ideas. But it turned out that for a lot of them it was hard to justify what benefit a blockchain would bring compared to a more traditional approach. That is something I see a lot in the current blockchain hype. Showing up as a team with a formulated idea is a big advantage, as the technology and possible problem areas can be explored before. But In both occasions I enjoyed it to meet new and interesting people and see what we can achieve together in this limited time.

Our project

We settled on the challenge “fighting fraud in the supply chain” with a project that puts smart locks on containers. The devices log all open and close operation on a blockchain. Unlocking operations would have to be authorized by a smart contract. The locks communicate with bluetooth low energy with an app on a smart phone. This in turn communicates to a backend that talks to the blockchain.

Implementation

Shortly after we had the rough concept, the other team members stated that they would feel more confident implementing the smart contract in java, rather than solidity. That’s why they voted for using hyperledger instead of ethereum. Setting it all up and getting the docker containers to work proved a lot more difficult than anybody anticipated. Not only had some team members Windows machines, but also on linux we faced a problem. Namely the docker containers were configured to use the google nameservers, while apparently all outside DNS was blocked by the Thomson Reuters network. The connectivity was generally very flaky.

Infrastructure

I enjoyed working with the team. But that we didn’t know the infrastructure we were working on, complicated our work considerably. The last time I programmed seriously with Java was probably 15 years ago. And we didn’t have good tool support within the environment. I’m sure it is possible to set everything up to work comfortably, but that would have cost us more time even than we lost with the complicated turnaround cycles. In the end, we couldn’t complete our prototype in time. Sure, that is is not a strict requirement of a hackathon. But it’s the pride and goal of every software developer to have the thing perform in a live demo.

Presentations and prize giving

As is common for events like this, the quality of the projects varies wildly. I think nobody in our team expected to be in the top ranks. Even though I must say the presentation looked better than my code.
The project that I liked the most was about subleasing parking spots while people don’t need them. I could imagine something like this generalized to become a decentralized form of AirBnB.
The winners were the same people that won the London HackEthon. During the presentation I thought it rather boring. It was about heart rate sensors publishing directly to ethereum. A smart contract would then take action if the data was out of order. Only after they received the price, I thought some more about it. In hindsight I can see the value in it, and that it was probably implemented better then most other projects.

Conclusion

Thanks to Thomson Reuters and all others involved for organizing this great event!
I hear a lot from Bitcoin maximalists that all other chains can’t compete with the one true blockchain. I’m also invested most in Bitcoin, but I want to be open to the possibilities of other blockchains and smart contract platforms in special. Although I must admit, I never saw a compelling reason for permissioned ledgers and private blockchains. A week before the event I learned about Bitcoin uncensored, and listened to a couple of the episodes. They essentially debunk most of the altcoins and blockchain projects. Calling them ponzi schemes and frauds. This made me skeptical of the blockchain boom, but all the more I was keen to discover good uses at and event full of blockchain hackers. I’m still positive that there are applications that can be improved with blockchains. But most of the ideas have to be descarded upon closer inspection. The only three practical uses for blockchain so far are monetary, timestamping and naming. I am looking forward to expand this list, but it’s not as easy as it seems at first.

Categories: BitCoin, Education, Projects | Tags: , , | Leave a comment

Resetting the Logitech K810 bluetooth keyboard

The Logitech K810 has been my favorite keyboard for many years. I have one at home and one in the office. It allows to easily switch between 3 different devices. It has the same size and layout as most notebooks, is stylish, and a blast to type.
But one day about a year ago something strange happened. When I wanted to type a ‘\’ I got nothing. When I wanted to type a ‘<‘, I would get a ‘§’. When I wanted to type a ‘>’, I would get a ‘°’. And vice versa. So, effectively two keys were swapped. This was only on the Windows workstation in the office. When I switched the keyboard to the Linux notebook or to the phone, all keys were correct. It also never happened at home.
At first I thought this was a joke by my co-workers. So I tried everything on the windows machine: un-pairing and re-pairing. Scanning the registry for uncommon key mappings. Nothing helped until I found a page that described how to perform a factory reset on the keyboard. The problem was solved, but only for a year. Last week when I came to work after the weekend, the very same keys were swapped again. Finding the page with the reset instructions was more difficult than I remembered. It was not freely available, but only after logging in on the Logitech support page. That is why I want to preserve it here, in case it happens again to me or anybody else:

  • un-pair and remove the keyboard from the bluetooth settings on your pc
  • reset your keyboard: with keyboard on and unpaired from any device, press the following key sequence:
  • “Escape”, “o”,“Escape”, “o”,“Escape”, “b”
  • if the reset is accepted the lights on top of your K810 will blink for a second
  • reconnect your K810 to your pc and test it on other devices if possible.
Categories: Software, Work | Tags: , , , | 1 Comment

Meeting C++ 2016

This is my first time at Meeting C++ in Berlin. I came here with my boss Andi. To profit more, we split up during the talks. Afterwards we shared what we learned.
I will complete this post later, and add links to the presentations and videos as they become available.

I attended the following talks:

Opening Keynote by Bjarne Stroustrup

He talked about the evolution and future direction of C++. Explaining the guiding principles and philosophy of the language. He also explained how the standards committee works, and that even he himself is sometimes over voted. He could tell that and even name the people of other opinions without any bitterness. Very professional and focused!
The main point that sticked out was: “zero overhead abstractions”

C++ Core Guidelines: Migrating your Code Base by Peter Sommerlad

Unfortunately Peter Sommerlad was sick and couldn’t come. So Bjarne Stroustrup agreed ten minutes before his own keynote to jump in, and give the talk without any preparation. He claimed never to have had a talk about this topic. He had some slides with the name of his employer, and he jumped around in those slides. Other than this barely noticeable detail, you couldn’t tell that the talk was not prepared. He talked about how to use the [GSL](https://github.com/Microsoft/GSL) in new code. But the main focus was on how to gradually improve old legacy code by introducing the types the GSL provides. In the future there should be even tools to perform the task automatically.

Reduce: From functional programming to C++17 fold expressions by Nikos Athanasiou

He started out by showing how fold can be performed at runtime with std::accumulate(). Then he gave some theory and showed the syntax of other languages such as: haskell, python and scala. The C++17 fold expression operator doesn’t just add syntactic sugar, but open up a load of new possibilities. With constexpr functions, the folds can be evaluated at compile time. As a consequence they can not only operate on values, but even on types. The talker shared with us how he broke his personal error message record: During his experiments he got an error with a quarter of a million lines!

Implementing a web game in C++14 by Kris Jusiak

In this talk we witnessed how a relatively simple game can be implemented with help of the following libraries: ranges, dependency injection and state machine. The code was all in pure C++14 and was then compiled to asm.js and/or webassembly using emscripten. The result was a static website that runs the game very efficiently in the browser. In the talk we were walked through the different parts of the implementation. In contrast to a naive imperative approach, after the initial learning curve this can be maintained and extended a lot easier.

Learn Robotics with C++ in 1 hour by Jackie Kay

We didn’t actually learn how to program robots. First, she walked us through some history of robotics. By highlighting some of the mayor challenges, she explained different solutions, and how they evolved over time. Because robots run in a real time environment and have lots of data to process, performance is crucial. In the past the problems were solved more analytically, while nowadays the focus is on deep learning with neuronal networks. She had a strong emphasis on libraries that are being used in robotics. To my surprise, I knew and used most of them, even the ones she introduced as lesser known such as dlib.

Nerd Party

In the evening there was free beer in the big underground hall. There was no music, so that people could talk. Not really how you would usually imagine a party. We had a look at the different sponsor booths, and watched some product demos. After a while we went up to the sky lounge in the 14th floor with a marvelous view over the city.

SYCL building blocks for C++ libraries by Gordon Brown

Even though I experimented with heterogeneous parallel computing a few years ago, I was not really aware what is in the works with SYCL. My earlier experiments were with OpenCL and Cuda. They were cool, but left a lot to be desired. I never looked into OpenAMP despite the improved syntax. In Contrast SYCL seems to do it right on all fronts. I hope this brings GPGUP within reach, so that I could use it in my day to day work sometimes. In the talk, he showed the general architecture, how the pipelines work. Rather than defining execution barriers yourself and schedule the work, you define work groups, and their dependencies. SYCL then figures out how to best arrange and schedule the different tasks onto the different cores. Finally he talked about higher level libraries where SYCL is being integrated: std parallel algorithms, tensor flow and computer vision.

Clang Static Analysis by Gabor Horvath

During this talk we learned how static analyzers find the potential problems in the code to warn the developers about. Starting with simple semantic searches, through path tracing with and without branch merging. Bottom line was that there is no one tool to beat them all, but that the more tools you use, the better. Because they all work differently, each on can find individual problems.

Computer Architecture, C++, and High Performance by Matt P. Dziubinski

This talk made me realize how long ago it was, that I learned about hardware architectures in school. Back in the day we thought mainly about the simple theoretical model of how an ALU works. The talk made clear how you could boost performance by distributing the work to the different parallel ALU’s that exist within every CPU core. In the example he boosted the performance by two simply by manually partially unroll a summation loop. Another important point to take home is the performance gap between CPU and memory access. Even for caches, it is widening with every new hardware generation. Traditional algorithm analysis considers floating point operations as the expensive part. But meanwhile you can execute hundreds of FLOP’s in the time it takes to resolve a single cache miss. On one side he showed some techniques to better utilize the available hardware. And on the other hand he demonstrated tools to measure different aspects, such as usage of the parallel components within the core, or cache misses. With so diverse hardware it is really difficult to predict, thus measuring is key.

Lightning talks

The short talks were of varying quality, but mostly funny. As with a good portion of the talks, there were technical difficulties with connecting the notebooks to the projectors.

Closing keynote by Louis Dionne

C++ metaprogramming: evolution and future directions
We both didn’t know what to expect from this talk. But it proved to be one of the best of the conference. He started out by showing some template meta programming with the boost::mpl, transitioned to boost::fusion, and landed at his hana library. The syntax for C++ TMP is generally considered insane. But with his hana library, types are treated like values. This makes the compile time code really readable and only distinguishable from runtime code at a second glance. True to the main C++ paradigm of zero overhead abstraction he showcased an implementation of an event dispatcher that looks like runtime code with a map, but actually resolves at compile time to direct function calls. Cool stuff really. Leveraging knowledge that is available at compile time and use it at compile time. He even claimed that in contrast to some other TMP techniques, compile times should not suffer so much with hana.

Conclusions

C++ is fancy again!
I have been programming professionally for about 17 years. In all this time C++ has been my primary language. Not only that, it has also always been my preferred language. But there were times where it seemed to be stagnating. Other languages had fancy new features. They claimed to catch up with C++ performance. But experience showed that none ever managed to run as fast as C++ or produced such a small footprint. The fancy features proved either not as useful as they first appeared, or they are being added to C++. In retrospect it seems to have been the right choice to resist the urge to add a garbage collector. It’s better to produce no garbage in the first place. RAII turns out to be the better idiom as it can be applied to all sorts of resources, not only memory. The pace with which the language improves is only accelerating.
Yes, there is old ugly code that is using dangerous features. That is how the language evolved, and we can’t get rid of it. But with tools like the GSL and static analyzers we still can improve the security of legacy code bases.
Exciting times!

Categories: Education, Software | Tags: , , | Leave a comment

Electrum 2.7 with better multisig hardware wallet support and Ledger Nano S

Electrum has been my favorite Bitoin wallet software for a very long time. The reason I had a look at it initially was because there was a debian package. Only when Trezor hardware wallet support was added and was not yet released, I downloaded the sources. It is written in Python. I work with python regularly, but it is not my primary language. But for frequently updating and testing experimental software, it is pretty cool. That’s how I started to report bugs in the unreleased development branch, and sometimes even committing the patches myself.
But the reason I’m writing this post is, that the new 2.7 release contains two features that are important to me.

Ledger Nano S

One is that the Ledger devices now also support multisig with electrum. I took this as the trigger to order a Nano S. It works totally different from the HW1 in that it has a display. Thus you can set it up without an air gapped computer. With only the two buttons, you can navigate through the whole setup process. As a bonus it is also to my knowledge the first hardware device to store Ethereum tokens, not counting experiments such as quorum. So I finally moved my presales ETH.

Multisig with hardware wallets

I wrote about multisig with hardware wallets before. But Thomas took it a huge step further. Now it’s not only super secure, but also super user friendly. Now the hardware wallets are directly connected to the multisig wallet. No more saving unsigned transactions to files and load in the other wallet. You can still do that if you have the signing devices distributed geographically. Given a solid backup and redundancy strategy, you can now also have a 3 of 3 multisig hardware wallet. So your bitcoins would still be secure if your computer was hacked, and two of the three major BitCoin hardware wallets had a problem, which is very very unlikely.

The only thing still missing is the debian package for the 2.7 version.

Categories: BitCoin, Software | Tags: , , , , , | Leave a comment

My new notebook

Last week I finally received my new notebook. It was a long journey, but it was worth it. If you didn’t follow my blog, you can read about it here, here and here.

Delivery

It was delivered in two pieces. The first box contained the notebook, and was delivered normally. The second box contained the docking station and an additional power supply. For the second box I had to send a copy of the invoice to the tax office. I expected Dell to place the required documents inside the boxes. But since it was a domestic delivery for Dell, they didn’t. And I forgot to tell my friend who re-shipped them to check. So when the second box was delivered, I had to pay the import taxes for the whole order in one go. That wouldn’t be a problem in itself, but an announcement would have been nice. Because I don’t usually walk around with so much money, I had to ask the whole team to borrow some cash. Yeah, cash was the only option.

First impression

As expected, the first impression was great. And I had high expectations because I owned a previous model already. The border less screen is a blast. The large bezel of some other devices is such an useless waste of space. Also the docking station works flawlessly. I had somehow the impression they had different models for America and Europe. But other than the power cord, I couldn’t tell anything that wouldn’t fit. Only one USB-C cable is between the dock and the notebook. This is enough for charging the notebook, connecting external monitors, USB3 devices and sound. Funny enough the Bluetooth LE Mouse has shorter wakeup times when the docking station is plugged in.
I don’t insist on linux being pre-installed to save the time installing. It is to make sure the drivers stay available also in the future. I want to make sure that the OEM’s are aware of the people who want to have sane operating systems on their devices. It is essentially the same reason I insisted on paying with BitCoin. It is my money that I spend, and thus I want my purchase to show up in the appropriate columns of the statistics. If people don’t care, some corrupt middle managers just make certain options harder to get and then claim nobody wanted them.
The only item that is not according to my wish list is the keyboard layout. I wanted a Swiss layout, but made the compromise to get a US keyboard because the other factors were more important to me. The plan was to get a swiss keyboard, and retrofit it myself. But when I look at the device now, I figured out that this wouldn’t be easy, as it would require a European palm rest. Thus I abandoned that plan. I had devices with US keyboards before. It’s no big deal, I just prefer the Swiss layout.

Installation

Every time I set up a new device, I follow the guides for installing with smartcard backed full disk encryption and smartcard backed ssh. I wanted to automate this process for a while. So I used the opportunity to write the scripts this time. Since I wanted the procedure to work reproducibly, I started over every time I missed something. In the end I installed the OS at least five times. The next script for installing all the software including those from personal packet archives is a classic. I probably created it almost a decade ago, and always refined it. I once tried to do something similar for Windows at work. But in the end I abandoned it.

Problems

No system is perfect, and especially notebooks are known to not always have perfect driver support for linux kernels. The Sputnik team certainly does a great job with routing all their tweaks upstream. So far, I only found two minor problems. Wifi and the touchscreen didn’t work after resuming. Since I use full disk encryption I, suspend only occasionally. The boot times are really ok anyway. This is my first notebook with a touch screen. I force myself to use it sometimes, but on such a small high res screen my fingers are just too big. So, it’s nice to have, but hardly essential.
It is also my first device with a 4k screen. Ubuntu does great with the scaling and settings. The only applications that don’t fully support high res that I found so far, are: electrum, bitsquare and openbazaar. Oh, and it would be nice if the applications used the DPI scaling of the screen they are currently displaying.
Last but not least, the battery time didn’t impress me the only two times I ran on battery so far. It hardly lasts for a full movie. But I will try terminating all my background tasks next time.

Update December 20th 2016

Here is a nice video describing the device:
https://www.youtube.com/watch?v=kvsgTJbIWNo

Categories: BitCoin, Software | Tags: , , , , | 1 Comment

Decentralized websites and more

“Cool idea, but to be of any use, it would need more functionality and more content” was my impression when I first looked into zeronet. Back then static web pages were all there was, and no UI support for any managing tasks. The next time I checked, probably more than half a year later, it had a blog engine, subscription on the welcome page, mail, chat, forums, wiki, boards and more. Blogs was what hooked me this time. The interesting feature was that you could subscribe, and have the news listed on the hello page. So I started to write new blog posts both on wordpress and on zeronet. True, wordpress has lots of more functionality than the zeronet blog engine. Some things are nice gimmicks, but none of it is really essential. ZeroBlog is really all you need.
Some people started to leave twister for zeronet, but I couldn’t quite understand why. For me, it filled another niche. They are both very nice in their own way.

How it works

To create a site, you can execute a python command on the commandline, or simply clone an existing zite. In both cases, a private key is generated that you need to later sign the content. Signing is really easy, but you better take good care for your private keys. Make sure not to share them, but do make backups for yourself. From the private key, a public key is derived and from that a BitCoin address. The BitCoin address serves as the unique identifier for your zite. If this identifier looks too complicated, you can register a shorter name on the NameCoin blockchain, and link it to your bitcoin address for the zite. Once you sign and publish your zite, you can give the address to your friends, or publish it where other people can pick it up. Whenever another zeronet user requests your address, he sends the query into the mesh. Whoever is closest, serves the files anonymously. Now the user who visited, becomes a seeder who also serves your content. No central server required. Now you can switch off all your computers, and your zite is available. Your zite stays online for as long as there is at least one other user seeding it.

Proxies

To visit zeronet sites, or simply zites as they are called, you should run the zeronet client. The software is written in python with few dependencies. So it is really easy to run. You can either run it locally, or on a personal server. Then just visit the entry page with the browser and navigate from there. But if you want to visit a zite without installing any software, there are also public proxies. There are many reasons why running the software is better than using these proxies, but I won’t go into the details now. And I don’t list the proxies here.

ZeroMe

Then came merger zites. I read about the concept before the release, and was really curious. Some things are not as easy to accomplish with a decentralized anonymous system as with a centralized architecture. But when I had my first play with ZeroMe, my reaction was “Wow this is what I have been waiting for”. I don’t use most social media because of the centralized architecture, and because they own all the data of the users and can make with it whatever they please. There have been decentralized social platforms before, but they were usually a hassle to install and maintain or not so great from a usability standpoint. Now with ZeroMe you choose a hub to store your data, an identity provider, and a presentation. So you have three orthogonal aspects to your experience.

Data Hub

You can subscribe to as many hubs as you wish, but store your data to only one of them per identity. They can be organized by region, language or interests. The more you subscribe to, the more data will be stored on your harddrive, and the more bandwidth will be consumed. You can also run your own hub, and use it only with your friends.

Identity

The identities existed for a while. You needed an identity to write a blog, to comment on other people’s blogs, to write and receive ZeroMail, to write to boards and chats and talks and wikis. Again different identity providers have different requirements. For ZeroId you have to register your handle on the namecoin blockchain. For Zeroverse you had to send a bitmessage. For KaffieId no external proof is required. You can maintain as many identities as you like. Some can be more credible, others totally anonymous.

Presentation

The official frontend is Me.ZeroNetwork.bit. But as it is all opensource. The first forks or clones started to appear. There is the darker themed Dark ZeroMe. There is ZeroMe Plus which adds some nice features.

Categories: BitCoin, Projects, Software | Tags: , , | Leave a comment