An open letter

To my 20-year-old developer self

Things I’ve learned in 20+ years as a software engineer. You need a work laptop Not only does this give you the option of working from home but in reality your brain doesn’t work 9-to-5. You can make a note of an idea for tomorrow but why not get it done there and then? If your employer gets two weeks of extra work out of you it’s already paid for itself. [Read More]

The magnitude of it all

The units you should be aware of

In 2014 Randall Munroe estimated that Google stores 10 exabytes of data across all of its operations. See list of SI prefixes. If CPUs are topping out at gigahertz then single operations aren’t going to subceed the order of nanoseconds. 1 000 kilo | milli .001 1 000 000 mega | micro .000 001 1 000 000 000 giga | nano .000 000 001 1 000 000 000 000 tera | pico . [Read More]

Exceptions in destructors

In C++11 destructors default to noexcept so you have to go out of your way to make them throw. See throwing a vector in a destructor. #include <exception> #include <iostream> #include <vector> // Note the braces void exception1() try { throw 1; } catch (int e) { std::cout << "Caught " << e << std::endl; } catch (const std::out_of_range &oor) { std::cout << "Caught OOR\n" << oor.what() << std::endl; } catch (const std::exception &e) { std::cout << "Caught " << e. [Read More]

STL containers Sequence Containers array vector deque forward_list list Container Adapters stack queue priority_queue Associative Containers set map multiset multimap Unordered Associative Containers unordered_set unordered_multiset unordered_map unordered_multimap Features multiset, set and map are typically implemented as binary search trees. Forward lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence. map is generally slower than unordered_map containers to access individual elements by their key, but it allows the direct iteration on subsets based on their order. [Read More]


Argument dependent lookup

Why does this compile? A one-liner to print a vector to stdout. But why does this compile without the namespace std::? #include <iostream> #include <vector> #include <iterator> int main() { const std::vector<int> v{1, 2, 3, 4, 5}; copy(cbegin(v), cend(v), std::ostream_iterator<int>(std::cout, "\n")); } Run the code on Compiler Explorer, Jason Turner on YouTube and ADL on Wikipedia. Note: C++14 is the default for the latest GCC (9.2). Exercise Propose some other examples of ADL. [Read More]

Network analysis

On the Linux command line

For the purposes of this exercise we’re not employing any nefarious means to gain access to packets. Generally Ethernet switches attempt to intelligently direct packets to only the intended host so an ordinary machine sat on a subnet will only receive its own packets and broadcasts. But unsolicited broadcasts will at least show you some other active IPs on the network. You want to get “in the way” of as much data as possible so if you can run these tests on the router then even better. [Read More]

Software acronyms

Acronyms RAII - Resource Acquisition Is Initialisation RTTI “Run Time Type Inspection” - dynamic_cast<> RVO - return value optimisation SFINAE - substitution failure is not an error - “Prune functions that do not yield valid template instantiations from a set of overloaded functions.” SDLC - software design lifecycle ODR - one definition rule ADL - Argument-dependent lookup, (Koenig lookup) cout(std::endl) Testing Black box testing - examines the functionality of an application without peering into its internal structures or workings. [Read More]

Skills timeline

This timeline is created using R in GitLab CI.

Pluralsight evaluations

  • C++ - 244
  • Using the Scrum Framework - 216
  • Networking Fundamentals (N10-007) - 200
  • Git - 196
  • GitHub - 187
  • Linux Fundamentals - 172
  • Ethical Hacking - 162
  • AWS Cloud Compute - 158
  • HTML5 - 108

Influential technology by year

  • 2019 - Cloud computing, R (and the whole notebooks thing), GitLab, Hugo (blog)
  • 2018 - Docker (containers)
  • 2017 - Cryptocurrency, blockchain
  • 2016 - C++1z (the precursor to C++17)
  • 2015 - git / GitHub

Linux distributions

  • Debian (Ubuntu, Kali)
  • Redhat (Enterprise, CentOS, Scientific Linux)
  • Alpine


See the complete list, What Every Programmer Should Know About Memory and Grace Hopper explaining the nanosecond. Technology,Gigabits/s,Category USB 1.1,0.012,Peripheral ADSL2+,0.024,Broadband HSPA+,0.042,Mobile Bluetooth 5.0,0.05,Wireless LTE,0.173,Mobile DOCSIS 3.0 (Virgin fibre),0.216,Broadband VME64 32-64bit,0.4,Bus USB 2.0,0.48,Peripheral 1 Gb Ethernet,1,LAN SATA revision 1.0,1.5,Storage FireWire 1600,1.573,Peripheral DOCSIS 31,2,Broadband SATA revision 2.0,3,Storage FireWire 3200,3.1457,Peripheral PCI Express 2.0,5,Bus USB 3.0,5,Peripheral 6G-SDI (SMPTE 2081),5.94,Peripheral SATA revision 3.0,6,Storage SDHC/SDXC/SDUC (SD Express),7.9,Storage PCI Express 3.0,8,Bus HDMI 1.3,8.16,Video Thunderbolt,10,Peripheral 10 Gb Ethernet,10,LAN USB 3. [Read More]

How does your vector grow?

How many times is the destructor for the “fax” class called below after populating a five element STL vector? std::vector<fax> y; for (size_t i = 0; i < 5; ++i) y.push_back(fax()); Remarkably it’s 17 times! Run the code on compiler explorer. For each push we call the default constructor to create a transient object and then call the copy constructor to populate the new element with its data. So far so good. [Read More]