Monthly Archives: July 2015

CppCon 2015

I submitted a talk proposal to CppCon for this year’s conference but unfortunately I won’t be speaking. According to the reviewers, my abstract was too vague so I guess I’ll have to detail everything next time around.

I was going to talk about how to leverage C++14 for unit-testing legacy C code. You could use C to unit-test C code, but C++’s near-perfect backwards compatibility and its many, many features make writing the test code a lot easier.

I’m going to try to go to the conference anyway. Maybe I’ll get a lightning talk in presenting my Emacs package for C and C++ development.


The importance of setting a good example

Most developers will pay just enough attention and do just enough work to get their current task done. To that end, and to reduce mental burden, whatever patterns the current codebase does are copied/extended/emulated. After all, most development work consists of changing existing code to do something else as well as whatever it did before.

As I mentioned to a colleague once, “code cruft happens little by little, never in one fell swoop”.

So it’s important to set a good example by not doing things the hacky way. Or, at least, by not leaving the code hacky by the time the next developer looks at it. The other day at work I implemented a proof-of-concept by modifying my carefully designed pristine code and, because it was easier, added a global variable to get the job done. It was a quick hack, I knew it was a bad idea and I could always fix it later, right?

Fast-forward a few weeks and 2 other developers had been working on this code. Now we had a dozen global variables. The two other devs aren’t bad at what they do; but having had a global there in the first place caused new ones to grow. Bad ideas are infectious.

So be sure to try and do things the right way. Other people will copy the patterns you write, whether good or bad.

My DConf 2015 talk: Behaviour-Driven Development with D and Cucumber

Here’s my DConf 2015 on testing and BDD for D applications using Cucumber:

Behaviour-Driven Development with D and Cucumber

As usual, I talked a lot faster than normal and finished with plenty of time to go. I think it went well though, my super-tired-eyes-because-of-jetlag notwithstanding.