Technical Leadership through Testing

As technical lead at Loggly, responsibility for a well-engineered infrastructure ends with me. And one way to ensure the system is designed and implemented well is to stay as close as possible to the code, ensuring that the team and I write quality software.

But it can be difficult to complete the design and implementation of the features I am responsible for, ensure that what the team produces is well-implemented, and understand every line of code — there is only so much time in the day.

Of course, the first answer is to have really good people on your team. And we certainly have that at Loggly. But I have adopted two other approaches that help me achieve the goals of quality system implementation, staying close to what has actually been implemented, and keeping the design coherent.

Make sure the tests get written

Possibly the only way, other than peer-review, that can ensure high-quality code is comprehensive unit testing. But as a technical lead, having an extensive suite of unit tests in place also helps me. I don’t have to deeply understand every single line of code that makes it into the system. Sure, perhaps the new code change is flawed, but if the team and I write lots of tests, flawed code will quickly be flagged by the unit tests.

In other words, as technical lead I am responsible for the quality of code produced by the team. But it’s impossible to look at every line of code that is committed, and in many cases the engineer actually writing the code has more expertise than I. But as long the unit tests are in place — and accompany every change — I don’t have to look at every line.

Write the integration tests yourself

While developers are responsible for unit testing, I actually enjoy writing automated integration tests. Tools such as netcat and sqlite allow me to simulate various elements of the systems we’re building.

For example, if you have a program that moves data from one place to another over the network, netcat can act as a sink for testing purposes. Direct the output to a file, and confirm that it’s exactly as you expect. Count the lines, calculate MD5 checksums — there any many ways you can be sure that the output is bit-for-bit correct. And by learning to simulate various elements of the system, I can stay close to the design without having to see every line of code.

So if you are in a technical leadership position, consider testing as a powerful technique, allowing the computers to help you manage the team.

Leave a Reply

Your email address will not be published. Required fields are marked *