In his recent book about Software Architecture, Robert C. Martin a.k.a. Uncle Bob describes programming as a discipline of science, rather than mathematics. In one of the first chapters of the book he talks about Structured Programming and how it enables us to produce – according to the scientific method...
[Read More]
Thoughts on Python from a C++ developer’s viewpoint: Style
This article is about Python style. Compared to the C++ world, there are pretty rigid conventions implemented in the language itself as well as in the Python ecosystem. That makes this topic kind of surprising and worth writing some lines about.
[Read More]
Thoughts on Python from a C++ developer’s viewpoint: Interfaces
In this episode I‘d like to highlight yet another Python fact I find
particularly surprising. This article is about the design tool in Software Engineering: interfaces.
[Read More]
Thoughts on Python from a C++ developer's viewpoint: Inside the interpreter
In this second article of the series on Python we're going to cover some really great features of the interactive interpreter. We'll see that a full-fledged debugger may not even be necessary to get serious work done in Python.
[Read More]
Thoughts on Python from a C++ developer's viewpoint: Class members
In this series of articles I will present some random things I've noticed when I started studying the Python programming language a while ago. I'm actually not very experienced in the language yet, as I don't get in touch with it that often. But I think if you also do...
[Read More]
Test-driven 7-Segment Decoder
This article is about creating a 7-segment display decoder in software. While this is probably considered a rather trivial task, it will serve as a good example for the discipline of Test-Driven Development (TDD). The motivation for a test-driven approach in this case is simple: being able to refactor later...
[Read More]
The bash debugger: an example
Sometimes you may find yourself in a situation where you need to actually debug a shell script you're currently writing. Especially in the initial phase of development, features like single-stepping feel quite handy. I this article we are going to look at two situations where the bash debugger (bashdb) is...
[Read More]
AVR sleep mode for fun and profit (part 2)
In the first part of this article we managed to put the AVR into power-down mode and were thereby able to lower the current consumption in idle mode to 0.0 mA. While this is great compared to the 22 mA before any optimization, there is no way to wake up...
[Read More]
AVR sleep mode for fun and profit
Today's blog article is about how to optimize the power consumption of an AVR microcontroller running on batteries. We're going to explore one of the ATmega32's sleep modes and how it affects power consumption. We will eventually reach a state where it actually makes sense to power the device from...
[Read More]
TDD - Should I mock or should I not?
Today I'm going to share an observation I made recently, related to Test-Driven Development (TDD).
[Read More]
Test-driving the MCP2515 CAN Controller (Part 3): Taking a look at the SPI bus
In this episode of the series we are going to focus a bit more on the target hardware. The driver code created during the previous two episodes is going to be compiled for the target microcontroller and programmed into flash memory. While it's only the reset functionality of the MCP2515...
[Read More]
Passing heavy C++ objects by value
Big objects are traditionally passed to methods by reference. Some weeks ago I talked to a colleague about that and decided to investigate a bit further. As a result of my research I must admit that, starting with C++11, things have indeed changed. Depending on what happens inside the body...
[Read More]
Background make execution in Vim 8
Version 8 of the Vim text editor introduced a great new feature for executing processes asynchronously. In this article I'm going to show you a plugin that makes use of these async jobs and how I utilize them to build a C++ project in the background.
[Read More]
Test-driving the MCP2515 CAN Controller (Part 2)
It turns out the device driver design established previously has a serious drawback. While the SpiDriver interface enables unit testing, the cost of polymorphism has to be paid also in production code. In this article you are going to see how high that cost is, i.e. how much extra code...
[Read More]
Test-driving the MCP2515 CAN Controller (Part 1)
So you are pretty much into Test-Driven Development (TDD)? You love to practice it on your development machine but think it might be quite a hassle when it comes to writing code for small microcontrollers? In this blog article we are going to take a journey to Embedded TDD using...
[Read More]