When Things Get Tough... Take a Break
Learn how making mental health a priority in your life will help you in the long run.
Join the DZone community and get the full member experience.Join For Free
Remember when you were in the midst of your primary education? Remember taking some math class, with concepts that were difficult to comprehend?
I certainly do ... often saying, "when in the world will I ever need to know about
tan() and all of this stuff about radians." To me, I was pretty certain I would not need to do any radian math when balancing my checking account.
But then I ended up on a project where we are building a Photoshop-like client in pure HTML.
Here comes the advanced math!
You may also like: Recognizing and Curing Superhero Syndrome.
How Math Enters The Equation
When I interviewed developers on this particular project, I talked about the challenges of the project path before the team. I explained that this would not be some form-based application storing and manipulating data. Instead, this project would be focused on building core elements that would allow end-users to build a publication.
One example I provided, was to give the users the ability to draw some line with a collection of points anywhere the end-user wanted to place them on the canvas. Then, with the line in place, the user could double-click the new object and add some text. Once the text is saved, it would flow on top of the line, rotating the letters in the direction provided by the line's coordinates. Certainly, not an easy task — clearly, an employment of advanced mathematical equations.
To finish my story, I would often reference the scene in The Matrix where the Morpheus character reveals two pills for Neo to consider taking. The blue pill would allow Neo to forget everything he just heard. The red pill would allow him to continue the journey. In my case, I had some candidates bail from the challenges of the project — while others dove into the rabbit hole with us — which has been an amazing project.
Complicating the project is the need to render pages created in the Photoshop-like client into an image or PDF form. The complication focused on the standards and guidelines that must be adhered too — since that aspect of the project is not in scope to replace. In this case, the JSON format in the client needs to be converted into an older version of SVG, which does not support the CSS-based attributes in the most-recent SVG specification.
Further complicating the challenge is a different grid system in place with the rendering tier. Instead of the (0,0) x/y position being at the top center of the page, it is located at the top left corner of the page. This means that the x/y coordinates have to be recomputed before the conversion to SVG and rendering occurs — which has an impact on the transformations. When a rotation or skew becomes attached to an object, things get tricky.
Enter the complicated math.
Recognizing the Need to Take a Break
When reaching a stage of work where the complication level is at its peak, the level of frustration associated with not being able to resolve a given issue can also rise to similar levels.
Personally, I often establish a plan of attack on what I feel like the solution will entail. This exercise will employ several routes and scenarios to validate my assumptions. Like a Product Owner maps out exception flows for a given feature, I often map out alternative ideas in the event my original thought assumptions are not valid.
When all of those options are attempted and a solution still does not exist, this is when I recognize it is time to take a break from the current problem that is being solved. Some options I often employ are noted below:
1. Family Time
Working remotely a large percentage of the time makes it easier to take a break and enjoy time with my family. We have a really good arrangement in place, where I am able to focus and work while in my home office without distractions. So when I walk downstairs to spend time with my family, it is really no different than coming home from some other office location.
The time spent with family gives me a break from the challenges, having a similar effect as working out or exercising.
Going from a four-day workout schedule (before having a toddler in the house) to now a one-to-two day workout schedule, I certainly recognize the value that some form of exercise can provide when a break from a given task is needed.
One of the options I employ is to take some time to:
a) Go for a run.
b) Take a bike ride.
c) Visit my local gym for a much-needed workout.
Taking time to exercise often helps refresh my mind to allow me to better focus on the problem at hand when I arrive back at my desk.
3. Get Some Sleep
With the deadlines on this project, I often spend additional time after everyone goes to bed in order to continue working. In those cases where I find myself out of ideas for a problem I am trying to solve, I feel like this a case where my body tells me that I really need to get some rest.
Taking time to get some much-needed sleep can lead to a mind (and body) that is better equipped to focus on challenges that could not be resolved in a fatigued state.
4. Focus on Another Task
Stopping work is not always an option when a challenge cannot be resolved. Since I have a large backlog of tasks to complete for this project, I will take a break from the current problem by grabbing another task and working on it — before heading back to the challenge I could not resolve.
It turns out, this approach is just as effective as the other three items noted above. I feel like the effort of switching branches and working on another aspect of the application leads to a refreshed mindset when returning to the problem at hand.
Regardless of the career choice, having a position that is challenging and exciting will often lead to opportunities that are not easy to diagnose or resolve.
When all ideas to resolve the situation are exhausted, this may also mean that your mind is exhausted from the task at hand. At that point, it might be a good idea to take a break. Regardless of how that time is spent (family time, exercise, sleep, switching task focus), when you return to the original problem your mind is likely to be in a better position to arrive at a resolution.
Have a really great day!
Opinions expressed by DZone contributors are their own.