|
|
|
|
|
by phamilton
3478 days ago
|
|
Suppose I need to track whether items are in a processed or unprocessed state. The intermediate developer would create a boolean field on the item, allow constant time lookup on that flag so we can easily fetch all unprocessed items. A Senior developer would recognize a few core assumptions that would make the boolean field a problem. (1) It assumes there are only 2 possible states (2) It assumes that an item will only have one state at a given time. They would seek out ways to relax those assumptions without increasing complexity. They would likely use an Enum with two states rather than a Processed boolean. That would remove the first assumption with an almost negligible cost. As far as the second assumption, they might decide the cost of removing that assumption is too high compared to the likelihood of it mattering. A month later, we have to track which items are assigned for processing. The intermediate engineer has to invalidate a previous assumption and convert the field from boolean to enum. The senior engineer just adds an enum. A month after that, we find out we need to track multiple assignments. Both engineers have a lot of work to do (you can't win them all). That's the difference I frequently see. Senior engineers can see problems down the road and recognize their implicit constraints. They aren't always right, but more often than you'd expect some decision they made pays off. |
|
What you described is an intermediate programmer trap. A senior programmer would make a design easy to refactor if such a change is needed, but not pay the unnecessary cost up front.