What wears a developer down, and what holds them up
What draws people into this trade is well documented. What drives them away is less so, and it is mistaken for lost interest. Three criteria account for most departures.
What draws people in is fairly constant: building, solving a puzzle, and the satisfaction of seeing the thing finally work. Add an unusual degree of autonomy, since the work is largely done alone, and a particular trust in tools you do not check yourself: the compiler, the tests, the iteration.
What drives people away is less visible. Demotivation rarely comes from lost interest and most often from lost confidence. The code seems too complicated, debugging drags on, and you feel you are producing nothing while the work is in fact progressing. It is a passing state, but working harder does not fix it.
Climbing is a good comparison: you progress through difficulty grades, attempting routes slightly harder than before, with good equipment and someone belaying below. Few people climb without a rope, and nobody needs to in order to improve. In this trade, that means problems of suitable difficulty, decent tools, and someone who reviews the work.
Mastery follows the same rule as in music: you improvise only after a great deal of practice, and you have to have gone through the difficult periods, the bugs and the production failures, to become effective. The psychology of flow describes the conditions for optimal experience in other terms: a task that is hard but achievable, a clear goal, immediate feedback. An organisation can provide these three conditions, or remove them.
The most useful rule comes from a recruiter in the field: regularly assess the pay, the interest of the work you are given, and the people you work with. As long as all three are satisfactory, you stay. As soon as one of them deteriorates, the question of leaving arises. The two-to-three-year turnover measured by the sector’s surveys is the sum of those departures.
The criterion that deteriorates first is almost always the second, and it is the one of the three seldom raised in an interview. People negotiate a salary and choose a team, but rarely ask to see the work.