It is well documented how broken the type system of C++/Java style languages is. If you are stuck with one of these languages you can take pride that when it comes to types, you are operating in a context that is a step above Python and a few floors above Javascript. Milking the staircase analogy, at the roof of the building would be Rust and in low orbit you may find languages like Haskell and OCaml. That said, there are a few nice things you can do with C++ templates that are not extremely obvious but not too magical either. In this post I will try to describe some that we have found useful at codebender, since type conversions at the C++ level are required to make FireBreath play well with libraries like serial.

Maybe you’ve been using codebender for a while and have had great success making things. You write the code, click the magic ‘Run on arduino’ button and a few seconds (and some blinking LEDs) later your board is programmed and you enjoy the fruits of your efforts. If you have ever wondered how that generated machine code gets its way into your board, this article is for you.

Ever since codebender started growing, one of the biggest challenges we faced was pushing updates to our compiler and being able to quickly iterate on it, fixing bugs and improving its performance. Since we’re kind of obsessed with making all of codebender’s users happy, we need to make sure that all changes applied to the compiler won’t break existing sketches. After all, what’s a web Arduino IDE if you can’t compile your code in it? As of today, about 70000 users have registered to codebender and it hosts more than 200000 projects. How can you make sure all of them work fine without having the whole testing process last forever?