Everything has a beginning.
Morning starts with coffee; day starts from a stand-up; problems start with “let me change one line”, questions start with “why”, answers start with “have no f*cking idea, but I guess”, refinement starts with a delay, meeting starts with “round drink” bell, annual appraisal with “you know it was a tough year”.
The code starts with the first line; problems start earlier with vague concepts, wrong assumptions, badly refined tasks, poor requirements, architect’s day-off, broken coffee machine, wrong version of node.js. Code generates bugs together with added value to solve functional problems. It may take hours to solve a problem, and even more to find it. Problems and bugs irritate us, make us angry and grumpy. I’ve never met a person happy with bugs, neither among developers, nor within management team. But everything has a purpose even if it’s not clear from the beginning.
Despite obvious purpose to postpone release or spend some extra overtime, the main purpose of problems is to move us further, to let us try more, break more, fix more. But if we want to achieve this Code-without-bugs nirvana, we need to reflect on problems, spend time analyzing not only solutions, but a root causes, wrong prerequisites, mistakes. It’s important to find a solution, but it’s not less important to trace a path to this solution. Because you may need to do it again. Or at least to use it as an ode to the one’s genius between juniors. In this blog we will try not only show the solution but the way to solve it, an environment where problems occurred, specific conditions that made a ground to grow mistakes.
Not all problems are in you code. But those that are in you code apparently are much easier to solve, even if it takes hours to parse logs, takes days to reproduce, takes nights to think about. You need to search, read, apply, throw solution away, search again, read, try, ask somebody, try again, drink coffee, curse loudly, preferably on foreign language, try again and again, and again.
Everything has a beginning, and it starts in your code.