Sailing Through PEDAC: the Left & Right Brain Approach
A long time ago, there were two sailors — one hailed from Europe and the other a native from the isles of Truk. Both were skilled men with the ability to safely sail a small boat through the vast Pacific Ocean, from one island to the next. However, the way each sailor went about this task was completely different.
Prior to leaving the shore, the European sailor would first chart a course in latitude and longitude, and then estimate his time of arrival at each point in the journey. Once his plan was devised, all that was left was to carry out each step until he arrived at his chosen destination. To make sure he stayed on course, the European would utilise all the tools available to him — such as a map, compass, and sextant to name a few. His movements were extremely precise and he always knew where he was going.
The native Truk however had no need for a plan, and instead began his journey by picturing his destination in relation to the surrounding islands. While sailing, he’d repeatedly adjust his direction based on his current position. Each decision made was in the moment and dependent on the relative positions of the sun, landmarks and wind direction. The Trukese used relativity to navigate the seas from where he began, where he currently was, and where he needed to go next. Although he was sailing without European instruments, his process was both fluid and too complex to be put into words.¹
Now, you might be wondering how this story relates to Launch School’s PEDAC problem-solving approach. But before I can answer this, I will first need to explain the story’s underlying concept.
The Two Brains
Each sailor represents two kinds of thinking our brain adopts. The European sailor thinks in logical, linear, analytical terms — commonly known as ‘left-brain thinking’. And then there’s the native Trukese, who embraces a more spatial, non-linear, intuitive approach, also known as ‘right-brain thinking’.²
While there has been much debate about where these two types of thinking are located in the brain; what I’m more interested in is how we can use the two-brain idea to inform our understanding of how to use PEDAC.
What is PEDAC again?
PEDAC is introduced by Launch School as a problem-solving process that can help programmers code with intention. In particular, it helps to solve more complicated programming problems that cannot be solved at first glance. It is a tool that saves time and counters the ‘hack and slash approach’ — which can often lead to fatigue, frustration and countless hours of trial and error.
The PEDAC acronym consists of a series of steps which stands for:
- Understanding the Problem
- Examples and test cases
- Data Structure
It is worth noting that the first five letters — PEDA — involve the planning stage of the problem-solving process. Whereas the last letter — C — is the only actual step where coding takes place.
Left Brain Thinking
Returning to our sailor analogy — just like PEDAC, the European’s navigation strategy requires a lot of planning prior to execution. All of his actions are intentional and flow in a linear, analytical, logical sequence with tools assisting him towards the final destination.
PEDAC stops us getting lost in a sea of confusion, by providing the necessary structure and problem-solving tools to get to the solution. You first understand the problem by gathering inputs, identifying problem domains, examining requirements, asking questions and finally putting together a mental model. This leads to testing examples, structuring your data and eventually writing an algorithm for coding.
If we were to imagine a mental model of the PEDAC process it would look something like this:
So at this point it would seem that we only need to use our left brains to solve a programming problem with the help of PEDAC. There’s no use for right brain thinking…right?
Right Brain Thinking
As the story suggests, it is difficult to put into words how the Trukese navigated without the use of instruments. His process was based on improvisation relative to where he was currently situated.
Right-brain thinking naturally appears more complex because it does not contain the language centres of the brain³. It is without words, yet it understands spatiality, relativity, imagination and unity.⁴
Does this even play a part in the PEDAC process? Actually in many ways it does. Think about when you begin writing your code (after writing your algorithm) and when testing for an expected return value, you find a bug. This bug wasn’t part of your plan, so what do you do now?
You can’t “sail around” this bug — like the Trukese, you’ll need to adapt to the situation, by checking where you are in the code and adjusting your direction accordingly. Debugging utilises right brain-thinking. We look for patterns and differences — something that just doesn’t add up. We look at the parts relative to one another and the sum as a whole.
Right brain thinking also features in how we use the PEDAC process to solve a programming problem. It’s easy to assume that being an acronym, PEDAC should be used in a linear fashion — where we first complete the P then the E, D, A and finish with C. This is often not the case.
From my observations of others and my own application of the process, while PEDAC appears to look like a linear structure (left brain), the way we actually utilise it is often non-linear (right brain).
So if we were to update our mental model of how PEDAC is actually traversed it could look something like this:
PEDAC in this light is not as linear and chronological as we thought. When solving a more difficult problem we might first start with P then move to A, then to E, and back to P again and so on. How then can we rely on a structure that might require a lot of jumping around?
PEDAC Problem Solving: a Left & Right Brain Approach
Rather than imagining PEDAC as a single word, we might be better off appreciating each letter as a stand alone object, complete with its own logical structure and analytical behaviour. Each letter can then be considered a left brain process.
There is no guarantee of the final order of PEDAC when problem-solving, as one problem might need to be solved in this way: PPPPEADACAC, whereas another might be more straight forward like this: PAC. This means the way we navigate PEDAC is situational and relative to the problem — which is considered to be more right brain thinking.
In truth, we need both parts of our brain to make the most of PEDAC. Without the logical structure of each letter, we could be forever recalibrating to find the right path, which could borderline as a hack and slash approach. And without the freedom to rearrange each letter in relation to the problem, PEDAC would become too rigid and unadaptable to more complicated problems.
Although the two sailors in our story never had the chance to amalgamate their left and right brain approaches — we can imagine how effective it would be to merge their two styles together. Fortunately in present day programming, and with a little help from PEDAC, we are able to combine the best of left and right brain thinking, and know what it feels like to truly code with intention.
1. J.A. Paredes and M. J. Hepburn, Vol 17, 1976 . “The Split-Brain and the Culture-Cognition Paradox,” in Current Anthropology. The University of Chicago Press
2,4. Edwards, B., 2016. Drawing On The Right Side Of The Brain. London: Souvenir.
3. Taylor, J., 2008. My Stroke Of Insight. New York, N.Y.: Penguin Audio.