Category Archives: C++ for the self-taught

Tutorial posts on C++

Radical Refactoring: Have the compiler to (some of) the reviewing

One of the most common sources of bugs is ambiguity: some too-subtle API change that’s missed in a library update and introduces a subtle bug, that finally only gets found out in the field. My answer to that problem is … Continue reading

Posted in Anecdotes, C & C++, C++ for the self-taught, Embedded software development, Radical Refactoring | Leave a comment

A different take on the “optimize by puzzle” problem

I explained the problem I presented in my previous post to my wife overt dinner yesterday. She’s a professor at law and a very intelligent person, but has no notion of set theory, graph theory, or algorithms. I’m sure many … Continue reading

Posted in Algorithms, C++ for the self-taught, Software Design | Comments Off

Optimization by puzzle

Given a query routine that takes a name and may return several, write a routine that takes a single name and returns a set of names for which each of the following is true: For each name in the set, … Continue reading

Posted in Algorithms, C & C++, C++ for the self-taught, Software Design, Software Development, Software Engineering | 1 Comment

Run-time composed predicates and Code generation

While working on Arachnida, preparing version 2.2 due out this fall, one of the things we’ll be introducing is a hardened OpenSSL transport-layer-security plug-in, to replace the one we’ve had for the last seven or so years. One of the … Continue reading

Posted in C & C++, C++ for the self-taught, Software Design | Comments Off

What happens if structures aren’t well-designed

In my previous post, I explained how to design a structure for persisting and communicating. I didn’t say why I explained it — just that things get frustrating if these simple rules aren’t followed. In this post, I will tell … Continue reading

Posted in C & C++, C++ for the self-taught, Embedded software development, Software Design | Comments Off

How to design a struct for storage or communicating

One of the most common ways of “persisting” or communicating data in an embedded device is to just dump it into persistent storage or onto the wire: rather than generating XML, JSON or some other format which would later have … Continue reading

Posted in C & C++, C++ for the self-taught, Embedded software development, Software Design | 5 Comments

Hidden complexity

It really surprises me sometimes how much you can have to explain about simple things.

Posted in C++ for the self-taught, Software Engineering | Comments Off

Setting up a new skeleton: re-factoring

Before we go much further with our SOCKS server, we should do a bit of cleaning up in the project: we’ll move the Server and Observer classes to their own library, so we can more easily re-use them, and we’ll … Continue reading

Posted in C++ for the self-taught | Comments Off

Sleep(…)

For those of you waiting for the next installment of “C++ for the self-taught”: I’m on parental leave at the moment. The podcast (and the rest of the blog) will be back in a few weeks.

Posted in C++ for the self-taught, This blog | Comments Off

Chausette: Starting to proxy

In the previous installment, we started to echo the data we received back to where it came from. That’s all fine and dandy, but it isn’t really all that interesting. In this installment, we will set up a pair of … Continue reading

Posted in C++ for the self-taught | Comments Off