Hacker News new | ask | show | jobs
by sriram_malhar 1517 days ago
Having a clear set of expectations before debugging or profiling.

One of my colleagues from whom I learnt much used to put assertions instead of print statements and rerun the test suite. Sometimes those assertions were quite complex; they would do a few sanity checks of entire data structures.

While doing benchmarking or profiling, knowing to do back of the envelope calculations to know the minimum and maximum metrics, such as IOps, messages per second, the average queue lengths, database writes and so on. The same colleague above had it honed to a fine discipline. He had memory and cache and db query latencies in his head and could tell if and where something was not right.