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 pretty engrained in what we expect of each other. That is not to say that used car salesmen and politicians lie: that is to say we expect them to lie: there is an engrained distrust in society toward people who embellish or promise things for a living.

The real problem is when procedures force us to lie, and force us to use our tools in a way to make them lie. One way to make my favorite version control tool, Git, lie is by using git-rebase. The rebase command allows you to re-write history — to pretend that when you created a given branch isn’t really when you created that branch: you created it at some other point in the code’s history in stead.

Continue reading

Posted in Software Development | Tagged , | Leave a comment

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 be misleading and how to debug padding and alignment errors.

Continue reading

Posted in C & C++, Embedded software development, Software Development | Leave a comment

Flawed ways of working: centrally managed version control

Imagine, just for a moment (it would be painful to do this longer than just a moment) that Linus, when he decided to leave BitKeeper behind, switched to Subversion in stead of developing Git and that for any commit into the master branch of that repository, you’d need his approval. While you’re imagining that, just a few microseconds more, imagine he stuck to his guns.

Either Linux would no longer exist or Linus would have been declared mad, and Linux would have moved on without him.

Centrally managed version control systems are fundamentally flawed and impede productivity. Any project with more than a handful of developers/programmers using a centrally managed version control system will either lose control over the quality of the product, or bring productivity to a grinding halt.

Continue reading

Posted in Software Development, Software Engineering | Tagged , , , , , | Leave a comment

Minor changes in style

I am not usually one to make much of a fuss about coding style: as long as the code is easily readable, I don’t much care whether you use tabs or spaces to indent, how you align your curly quotes, etc. There’s really only two things I do care about when reading new code:

  1. is it easy to read the code without being misled by it?
  2. does the new code integrate well with the rest of the code?

I do have a few suggestions, though, but above all, I recognize it can be difficult to change habits — and therefore to change one’s coding style.

Continue reading

Posted in C & C++, Software Development | Leave a comment

Even in Quebec, Winter is not the only season

An just to remind myself and some of my colleagues, I drew this on the office whiteboard yesterday: 20121220-193947.jpg

Posted in Uncategorized | Leave a comment

Poll: New Debug Tool from Vlinder Software

Among the most common errors in software involves problems using the right parameters for functions like memcpy, memcmp, memmove, strcpy, strcat, wcscpy, tcscpy, etc. Often, the bugs are simple off-by-one errors, character strings that don’t end with a NUL character, … Continue reading
Posted in Vlinder Software | Tagged | 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 you why I wrote the previous one.
Continue reading

Posted in C & C++, C++ for the self-taught, Embedded software development, Software Design | Leave a comment

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 to be parsed and which takes a lot of resources both ways, both in terms of CPU time to generate and parse and in terms of storage overhead, dumping binary data into storage or onto the wire has only the — inevitable — overhead of accessing storage/the wire itself. There are, however, several caveats to this, some of which I run into on a more-or-less regular basis when trying to decipher some of that data, so in stead of just being frustrated with hard-to-decipher data, I choose to describe how it should be done in stead.

Note that I am by no means advocating anything more than a few simple rules to follow when dumping data. Particularly, I am not going to advocate using XML, JSON or any other intermediary form: each of those has their place, but they neither should be considered to solve the problems faced when trying to access binary data, nor can they replace binary data.

Continue reading

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

SPF deployed on vlinder.ca domain

Vlinder Software has deployed SPF DNS records on the vlinder.ca domain, tagging any E-mail not sent by one of the mail servers we normally use as a “soft failure”. In light of our project to roll out spam prevention measures … Continue reading
Posted in Vlinder Software | Tagged , , , , , , | Comments Off

Rolling Out Spam Prevention

It has come to our attention that a spammer, apparently of Russian origin, has been sending spam E-mails with forged From: addresses in the vlinder.ca domain. An example spam E-mail runs as follows: From: support@vlinder.ca Subject: RE: GALE - Copies … Continue reading
Posted in Vlinder Software | Tagged , , , , , , | Comments Off