Category Archives: Software Development

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

Writing a BrainF interpreter … in VHDL

I’ve written parsers and interpreters before, but usually in C++ or, if I was feeling like doing all of the hard work myself, in C.

Posted in Software Development, VHDL | Tagged | 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

Looking for bugs (in several wrong places)

I recently went on a bug-hunt in a huge system that I knew next to nothing about. The reason I went on this bug-hunt was because, although I didn’t know the system itself, I knew what the system was supposed … Continue reading

Posted in Anecdotes, Software Development, Software Engineering, Software Testing | Tagged | Comments Off

Is Open Source software security falling apart?

There have been a number of well-publicized security flaws in open source software lately — the most well-publicized of course being the OpenSSL Heartbleed bug1. Then there’s the demise of Truecrypt, recent bugs in GnuTLS and recent bugs in the … Continue reading

Posted in Opinions, Software Development, Software Testing | Comments Off

A functional version of the KMP algorithm

For one of the projects I’m working on, I needed a compile-time version of the KMP algorithm in C++. I started by making the algorithm functional.

Posted in C & C++, Software Development | Comments Off

The benefits of formal, executable specifications

While a specification should not specify the C++ code that should be implemented for the specified feature, it should specify the feature in a verifiable manner. In some cases, formal — and even executable — specifications can be of great … Continue reading

Posted in Software Development, Software Engineering, Software Testing | Comments Off

Sometimes, your right hand should know what your left hand is doing

Especially if you’re a compiler…

Posted in C & C++, Software Development | Comments Off

Flawed ways of working: git-rebase

I tell my children not to lie. My parents told me not to lie. I’m pretty sure that by far most parents tell their children not to lie. Aside from used car salesmen and politicians, I think not lying is … Continue reading

Posted in Software Development | Tagged , | Comments Off

Structure alignment and padding

In my previous post on the subject, I talked about using magic numbers and versions, alignment, and later added a note about endianness after a suggestion from Michel Fortin. This time, I’ll talk about padding, how the sizeof operator can … Continue reading

Posted in C & C++, Embedded software development, Software Development | Comments Off