4 ms·
This cuts both ways. You need a lack of fear to delve into the unknown to fix the root causes of things, to follow a thread all the way through an application
by barrkel 10y ago
This cuts both ways.
You need a lack of fear to delve into the unknown to fix the root causes of things, to follow a thread all the way through an application and not make the minimal local change that invariably hurts the overall design of the software. This is how maintained software rots: lots of local changes without regard for the global design. Making the bigger change (usually not actually bigger, just more global) is required to keep the architecture supple.
But you need to be concerned about breaking stuff. Everything you touch, you need to look at what relies on it. If testing is insufficient, it should be beefed up beforehand. Often testing is at the wrong level and is too closely linked to implementation changes, preventing the more global change required. It's less fear, though: more like paranoia combined with obsessive, iterated list-making + list-checking.
The worst thing is when you find yourself hours or days into a task only to hit a blocker - finding out that doing the right thing will be a lot harder than expected, while doing the hacky short-term thing will be unreliable or fragile or otherwise difficult to maintain.
So you need to start out with a research phase. Think through the code changes required for a local change, look at the component parts, consider how they could change to make a more global fix, then look at their dependencies, test coverage, etc. until you're confident the task can be accomplished. Think before acting.
Acting without enough thought and planning is the biggest problem I've found with junior devs. I've found it at both extremes of the "fear" discussed here: some devs that had no fear and made big global changes without considering the knock-on effects, who broke all sorts of other bits and pieces along the way that weren't central to their task so they never even checked them (these devs generally don't last long); and other devs who hyperactively make local changes, use a lot of copy and paste (including tests - the code turns out functionally correct), and generally seem really productive, but are actually generating technical debt.