Sleep as a Problem Solving Tool
Sleep, as it turns out, is a great problem-solving tool.
Sleep is when you take all of the jumbled thoughts of the day and put them into a logical order so you can more easily work with them.
I find this organization to be very helpful when I've come up against a particularly complex problem.
With a complex problem, that is a problem with many competing demands or different angles to look at, it's easy to start down one solution trail, hit an obstacle, come back, try a different trail, hit another obstacle, then try the old trail again, thinking maybe you can find a way around the old obstacle, find a potential way around the obstacle, question whether that way is safe or not, return to the other trail or try a different one, find more obstacles, more potential solutions, and more dangers, then lose track of which dangers, obstacles, and solutions went with which trails. Sleeping, I've found, cleans this whole mess up. It gets known obstacles, solutions, and pitfalls matched up with the right trails, and helps you follow those trails more quickly so you can get to finding and sorting out as-yet-unknown issues faster.
This week, I had an issue where I wanted to set the focus on a text box when a certain screen was opened in a web app. Autofocus worked the first time the screen was loaded up in Chrome, but not again until you refreshed the whole app. And it didn't do anything in Edge. I checked Stackoverflow for a way to call focus when the page had finished loading, but none of the watchers seemed to do the trick. I banged my head against the wall for a solid two hours before giving up and moving on to another task. The following morning, after the sleep put everything in order, I was able to see that all of the watchers I was using would logically be called before the input was actually available to be focused on. So I just set up a half-second timeout at the end of the load script, and it worked beautifully. Of course, after another night or two of sleep I now think it might work better if I could find an event triggered for that specific event once that specific input does become available. But I've moved on. If users complain, we can look into that further.
Of course, this does not bode well for people who try to work on a side project just one day per week. Doing that, one's brain is liable to process the trails by the following day, then forget them entirely by the time one actually gets back to the project. Perhaps one might try taking a small portion of your time the previous day just trying to wrap your head around what you're planning on doing so that things are just a little bit more organized going into the main work day.
Comments
Post a Comment