Secrets of Success - How Divide and Conquer Strategy Generates efficiency to Systems and Boosts Productivity

Photo by pine watt

In 2004, Google published a popularized programming model and Strategy that uses Divide and Conquer Strategy to optimize its search algorithm. Jeff and Sanjay created the MapReduce framework to simplified data processing in a large-scale distributed setting. A MapReduce job usually splits the input dataset into independent chunks that are processed by the map tasks in a completely parallel manner. Then, it sorts the output of the maps, and input it to the reduce tasks. The reduce tasks will collate the input from the map tasks and combine them in some way based on the desired performance, such as its sums, average, count…etc. Apache, the open-source organization, began using MapReduce to implement an open-source search engine that is still active today. MapReduce has been the most crucial technology innovation that tackles large scale distributed settings.

The Divide and Conquer strategy are one of the most useful computer science algorithms that you can use in your daily life. The definition of Divide and Conquer Strategy classifies into two parts. First, to divide a big task into multiple smaller tasks, tackle each job individually. Then, use either one or combine those smaller tasks to reach the desired result.

Implementing Divide and Conquer Strategy in learning by stretching out study time over a month. Use different techniques every single day to observe which study technique can give you the most efficient result, and approach other materials with that study technique.

Divide and Conquer Strategy is not only implemented in software algorithms but also widely adopted in the history of humankind to obtain power and to optimize tasks.

Politicians and leaders use Divide and Conquer tactics to maintain control in power. Julius Caesar said,” Divida et Impera” to divide Rome and “all Gaul” itself, not one ever contradicted him. In the Art of War Sun Tzu writes, “… the art of using troops is this: When ten to the enemy’s one surround him; when five times his strength, attack him; If double his strength divide him…”.

Check and Balances use the concept of Divide and Conquer Strategy to create three branches of government to limit the power of the others. This way, no one branch becomes too overpowering, and it establishes a system that puts the government to serve its citizens.

Investors use Divide and Conquer Strategy to optimized one’s portfolio. One article published in Independent.co mentioned how investors could use a combination of diversified assets by understanding how each asset works in the past to assess the proportions of different assets.

Although Divide and Conquer strategy is so simple and sounds obvious, most of us overlook the concept in practice and become overwhelmed in the face of challenges. Using Divide and Conquer in the wrong settings might be perceived as ruthless. For instance, a manager can use Divide and Conquer Strategy to assign responsibility jointly to two people who are already at odds. At first, this might be an attempt to give the two employees another chance to work things out. However, but often it is to protect the superior position by keeping its warriors in conflict. It creates a toxic environment in the workplace that causes employee turnaround. It is better to foster honesty and unity rather than divisiveness in the workplace.

In this article, I will share two things that you can use Divide and Conquer Strategy - Learning and Searching.

Divide Learning based on Breath instead of Depth

Supposed you want to learn ten different subject topics. It will make sense to split the problem into multiple subsections and fully understand one subsection before going to the next one.

However, this method doesn’t work if you want to retain information and knowledge in the long term. Why? Because our brain is not like a computer where you can download the information into the brain to recall whenever we choose. Your brain is like a muscle; you need to continually reinforce it to remember something to put the information from your short-term memory to the long-term.

Therefore, instead of understanding one topic before jumping to the next topic, break down ten topics into multiple sub-topic and learn them all the same time, gradually increasing intervals.

I use this method to study the algorithm for the Software Engineer interview. There are various topics in data structures and algorithms that we need to consider. How can we retain all that information in a short amount of time before the coding interview?

Most people break down topics by studying one topic at a time and move on once they feel like they’ve learned it. After that, they rarely come back. However, as I mentioned earlier, this makes it hard to retain long term information. This approach doesn’t give us enough time to build the mental muscle of the topic. As soon as our brain muscle on that topic is starting to form, we switch to the next topic and allow it completely atrophy.

You need to reinforce your brain to keep going back to the same topic and allow the subconscious mind to make an additional deeper connection so that knowledge is transferred from short-term memory to long-term memory.

Here’s how to implement Divide and Conquer Strategy to learn more things: Commit to spending 30 minutes to 1 hour each day to study for each topic.

  1. Day one, study that topic as much as you can.
  2. Day two, study the next topic even if you didn’t finish the first topic on the first day.
  3. Go through every topic once, and cycle through the topic that you study on Day one. However, this time, you will partially review the topic and partially going deeper.

Use spaced repetition can help your brain to build an active muscle to retain information from short-term memory to long term.

Searching

We spent a lot of time in our daily life searching.

For instance, debugging software is a time-consuming task because you don’t know how long you can search for the root of the bug.

Google helps us a lot with the major decisions in our life. For instance, we spend most of our time searching on Google before we buy a house. We spend a lot of time searching on Google for a good investment before purchasing any stock options. We spend a lot of time searching on Yelp to find a new restaurant or good food every lunch break.

In an organization, the most time-consuming process of making a decision is searching for the right source and analyze them.

Using Divide and Conquer strategy can help simplify and do search more efficiently, and one of the most efficient ways of searching is using Binary Search.

Many people have unconsciously used binary search in childhood. For example, if you are searching for a word in a dictionary, you will not go through each page to search for the word. You will start searching the words from the middle and narrow down either the set of remaining words to check.

In debugging a problem, you will divide the code into two sections, and see where the problem lies. If it lies in the first half of the code, you disregard the other half. Divide the first half again of the code into another half, and do the same thing, until you find the root of the problem.

A lot of recommendation system uses binary search to recommend the topic and category that interest the users. For instance, Pinterest will ask two personal questions when you register - your age and gender- and how you answer them shapes everything that happens next. Based on your responses, along with your language, region, and bits of your history, Pinterest machine learning system will use binary search concepts to find the category that suits you.

The point of using divide and conquer is this: you don’t need to restrict yourself to look for the entire output of the system to troubleshoot the problem. Look at the intermediary points to find out where things are going wrong.

Wrapping Up

Divide and Conquer strategy can be simple concept and an obvious one. However, it can be complicated to implement them in practice.

When you feel overwhelmed in learning multiple things, think about breaking them up into smaller tasks, to the point where you don’t feel overwhelmed in that single task.

Binary search used Divide and Conquer Strategy to search anything more efficiently.

If you learn the art of Divide and Conquer, you will not only optimize your time in working on each task but also maximize your productivity to the extreme.

Like this Article?

Sign up for my newsletter to get notified for new articles!


Related Posts

Magical XOR - How can You use this trick on your next Coding Project?

Master XOR for your next Coding Project

How to Cope Illusions of Competence as a Software Engineer

Retain the knowledge that you learn

Common Pattern of Creating Stack-Safe Recursion

Create your recursion in a stack safe way with Tampolining

Want to Produce More Quality Work as a Software Engineer?

Change your Schedule

How to Construct an Immutable Queue

Constructing an Immutable queue with State Monad