3 ms·
A step debugger has been suggested below by cubano. In my experience using a debugger as a broad lens to learn a codebase takes too much of my time. I can take
by Communitivity 9y ago
A step debugger has been suggested below by cubano. In my experience using a debugger as a broad lens to learn a codebase takes too much of my time. I can take a module to walk through the code in my head, paying special attention to conditional branches. Any place where I can, I ask 'What if..?', e.g. 'What if the value is null?', 'What if the network is down?', 'What if the program is being run for the first time?', 'What if an exception gets thrown here?'. For each of those what ifs, if the particular corner case is not handled then write a unit test to see what happens.
That brings me to another thing a senior dev can do, refactor code to be more testable, one small piece at a time.
Thing is though, your job as a senior dev is to make sure the code, and the coders, work smoothly together. A good chunk of your work will be mentoring the junior developers, fostering tech exchanges, leading design discussions, etc., and if done right the value in this far outweighs any individual code contribution you can make. In my opinion a true 10x developer is not necessarily one that produces 10x as much code, but one who maybe produces 2x as much, but enables the team around him to produce 5x as much.