Resetting the mind
There I was. Trying. Thinking. Working. And failing.
What is the problem? Why won’t this work? I followed the documentation. I double checked my syntax. I retraced my steps and reviewed my logic. But my code is failing and I am not getting the result I am expecting. What is missing?
Working on the capstone project with my group, I encountered this experienced that I’ve been through multiple times before (as do all coders). The experience of seemingly doing everything correct, yet getting an incorrect feedback from testing. It happens when learning a new language, while still occurring while using familiar tech.
Our project requires the use of a natural language parser to interpret and manipulate user input. I decided to venture out to learn regular expressions. And wow. After several hours of reading documentation, looking through tutorials, I just barely was able to return a searched group of characters from a string.
I was frustrated. Did I just waste the all this time and not even see if this was applicable to our project? I decided to take a break and work on something else.
The day after, I decided to return to my venture. Lo and behold, I was able to successfully do what I intended with regex. It was, as if, something clicked and I was able to better see how the syntax worked, and use regular expression.
This was not the only time this happened. It really does seem that taking a break and distancing your mind on a certain topic really does more than brute forcing it for another few hours. I’ve really heard a lot of advice, not just for programming, about the importance of taking a break.
It just feels both good and exasperating that sometimes, all I needed was to step away and focus of something else for a while. I was so close, but just blocked off at that moment in time. Just need to breathe and relax to find they way through.