December 2021
Intermediate to advanced
352 pages
9h 32m
English
In 2012 I facilitated a code review with a colleague, let’s call her Beth, which I set aside as a useful example of the field. The purpose of the function was to take a selection of icons arranged in a row along the bottom of the screen and spin through them by an arbitrary amount. We had just migrated to C++11.
After half an hour of hacking away at it, the function looked like this, having lost about a dozen spurious lines of code:
UIComponent* spin_cards(UIComponent* first, UIComponent* n_first, UIComponent* last) { if (first == n_first) return last; if (n_first == last) return first; UIComponent* write = first; UIComponent* next_read ...Read now
Unlock full access