3 ms·
I actually just started to refactor some of my code earlier this week to deal with this very problem. It was related to deserialized data being transposed from
by HybridCurve 4y ago
I actually just started to refactor some of my code earlier this week to deal with this very problem.
It was related to deserialized data being transposed from one complex digraph to another. The reason I did not catch it as being problematic sooner was precisely because the state management was loosely distributed within the transposing functions' call hierarchy. The code which was trying to manage the states had emerged from fixes for a series of different problems related to edge cases, and once the new problems started relating to fixes for the others, I had that "Ahhh, well sh*t.." moment you get when finding you were missing something important.
> I think this probably the most important concept for programmers to keep at the front of their minds when working day to day.
The lesson I had learned was to be more mindful when synthesizing a solution and there might be more state interdependence than we expect. Centralizing state management has helped me solve it in this case.