Building a Bluetooth DAC with Raspberry Pi Zero W

My car comes with a built-in Bluetooth hands-free but unfortunately it does not support audio streaming. Luckily there is an AUX input available which uses a regular 3,5 mm jack. Perfect opportunity for a DIY project. I built the Bluetooth DAC using Raspberry Pi Zero W and a DAC hat. This post depicts the details of this project. Continue reading “Building a Bluetooth DAC with Raspberry Pi Zero W”

How to sign and verify using OpenSSL

Being able to verify that a piece of data originates from a trusted source (authenticity) and that it has not been altered in transit (integrity) is a common requirement in many use cases. It is needed for instance when distributing software packages and installers and when delivering firmware to an embedded device. Digital signatures allow the recipient to verify both authenticity and integrity of the received document. This blog post describes how to use digital signatures with OpenSSL in practice. First part describes what is a digital signature and then the second part shows how to use OpenSSL sign and verify functions to work with signatures.
Continue reading “How to sign and verify using OpenSSL”

Embedded development with Yocto and Rust

Customized Linux distribution and a safe systems programming language sounds like a very interesting combination for embedded development. That is what makes Yocto and Rust such a good match. So, I wanted to see how Rust projects could be cross-compiled with Yocto-generated toolchain and root filesystem. The steps are described in this post. Continue reading “Embedded development with Yocto and Rust”

Why junior devs should review seniors’ commits

Code reviews are a great practise to find mistakes, potential bugs and other issues overlooked by the code author. Reviewing improves the overall code quality, but it is also a great way to share knowledge and information. Junior developers’ commits should certainly be reviewed by more senior developers, but juniors should also be the reviewers. Here’s why. Continue reading “Why junior devs should review seniors’ commits”

Common misconception with C++ move semantics

Move semantics have to be one of the most prominent new features in C++11. It is also something that can be a source of misunderstandings if the underlying mechanics are not fully understood. The fact is that std::move does not actually move anything. Yet, its name would suggest otherwise. So, let’s clear up this misconception.
Continue reading “Common misconception with C++ move semantics”

Implementing REST client with Rust: an introduction to traits and generics

After reading the Rust book and writing about my initial experiences, I wanted a small practical project to familiarize myself with the language. So, I decided to write a REST client library. This post shows, step-by-step, how my initial design was refactored to be more robust and easy-to-use. Traits and generics are key concepts in these refactorings. The intent is not to cover the internals of the library in detail and also the basic syntax of traits and generics is not covered here. The Rust Book chapter 10 is an excellent resource for the latter.

Continue reading “Implementing REST client with Rust: an introduction to traits and generics”

Programming fonts with ligatures

For long, there have been fonts that are specifically designed for programming. Usually the main characteristics of these fonts are clear and easy to read characters (especially i, I, 1, o, O and 0), easily distinguishable brackets, quotes and parentheses and emphasized punctuations. This design is done with the font’s typeface. Now there are also fonts that, in addition, introduce special ligatures specifically for coding. Continue reading “Programming fonts with ligatures”