Using Google Analytics Measurement Protocol with C++/Qt – A Software Engineering Exercise – Part 5
It’s time for a small, well-overdue post-mortem on this exercise. Overall, I’m both pleased and disappointed with the result of this exercise: Pleased, because the library is usable, and I’ve learned a good deal about applying modern software engineering practices using C++/Qt and open source services. On the other hand, I also feel that it’s not quite fitting as a C++ library, mostly because it does neither use all help the compiler provides, nor is it providing a particularly great API to program against.
One of the interesting aspects in the beginning was to see if this development approach would cost me a lot more in terms of time. And yes, it did - though mostly because I had to familiarize with Coverity and Travis-CI. The actual implementation time was less than 2 working days, including the overhead of setting up the project infrastructure and some moments of taking the API a bit too far. Once again, following the YAGNI principle was quite challenging.
Another point of interest was to see about the product quality, which admittedly is a rather imprecise term. What I’m happy with is that “it works” and “is maintainable” thanks to a set of tests. But I’m unhappy with quite a few things. For starters, documentation and examples are non-existent, which is a really good reason for a library not being adopted by anyone. Furthermore, it’s still too easy to make a hard-to-debug mistake by misspelling the Google Analytics parameters. Additionally there’s a lack of validating the parameters for custom metrics and custom dimensions. And then there is also the aspect that the code is not very efficient. All this leaves room for improvements, of which each single one could be considered as “you ain’t gonna need it” at the time of writing.
To summarize, then I am happy that I learned more about setting up a CI loop. The knowledge gained from this exercise was vital in setting up and fine tuning the build infrastructure at my current job. However, I’ve also learned that YAGNI can be an easy excuse for cutting too many corners.