In this episode, I explain why the previous solution is not as performant (as fast) as it could be. I show you why it’s not as fast. Then you will refactor the code to make it faster. You will see the results for yourself. Once you refactor, then bam, you completed this lab! WooHoo! Excellent
Labs
Labs are hands-on coding projects that you build along with Tonya as she explains the code, concepts, and thought processes behind it. You can use the labs to further your code knowledge or to use right in your projects. Each lab ties into the Docx to ensure you have the information you need.
Each lab is designed to further your understanding and mastery of code. You learn more about how to think about its construction, quality, maintainability, programmatic and logical thought, and problem-solving. While you may be building a specific thing, Tonya presents the why of it to make it adaptable far beyond that specific implementation, thereby giving you the means to make it your own, in any context.
The Root Cause
Now you understand the clues and what they are telling you. Let’s identify the root cause and discuss the why of it. Why are the callbacks out of order on the first post in the loop? In this episode, you should have a huge “Aha” moment where it just makes sense to you. Then you are going to resolve the root cause by changing the code. Woot! If you need to brush up on variable scoping, here is the link to the PHP Variables Bootcamp.
Analyzing the Clues
At this point, the clues are telling us about the anomaly. Do you see it? The data you see in your browser is clearly telling you “Hey Silly, the problem is right here.” Let’s see if you can figure out what the root cause is from the clues at this point in the lab. It’s time to analyze the clues. In order to understand what they are telling you, first, you need to visualize in your mind the order in which things are happening in the code, how PHP is executing, and when stuff is getting put into the Event […]
Fine-Tuning Our Tests
Now it’s time to stop and assess what our first tests told us. What clues did it provide? Let’s take a look at the data it reported in the WordPress event registry table. From this exercise, you will fine-tune the tests to get closer to finding the root cause. You will repeat the problem-solving steps.
Putting in Our First Tests
In this episode, you and I will figure out what we want to test first. Then we’ll walk through and discuss what WordPress is telling us.
Evaluate the Contributing Factors – Part 2
As the last episode was running long, I split it up into two videos to give your brain a rest. This is part 2 of evaluating the contributing factors. In this episode, we are narrowing in on what we want to test to prepare ourselves for the next episode and step.
Evaluate the Contributing Factors
The next step is to evaluate all of the contributing factors in order to determine where to start testing. Ok. It requires first that we figure out how the code is working, or how we think it’s working. In this episode, I’ll walk you through the process, explain the code, and give you a refresher on the event registry system that the WordPress Plugin API provides. Now if you haven’t already gone through the event registry videos, you need to do that now. Here are the links to get you up to speed. Please note: It is vital that you […]
Identify the Expected vs. Actual Behavior
The first step in my four-step problem-solving process is to identify the expected versus actual behavior. You simply write down everything that you see which is different from what is working versus what is not working, as well as what you expected to occur versus what actually occurred. It’s literally a process of pulling out your notebook and writing down the differences. Even the most minute detail needs to be recorded. Why? Because it may be a clue to help you find, understand, and resolve the true root cause. In this episode, you and I will walk through this process […]
Lab Introduction
Let me introduce you to the lab and what you will be doing. This lab starts with a broken website as some wonky, unexpected behavior is happening. You will be walking through the problem-solving process of how to identify the root cause, why it’s happening, and then how to resolve it…properly. In doing so, you will dive into the Genesis framework and WordPress’ Plugin API.
My 4 Steps to Problem Solving
Bugs are going to happen even to the best developer. That unexpected behavior is just part of this profession. But what sets you apart and defines you is your ability to problem solve. It’s about finding the root cause, that thing or things which are at the center of the problem, and then properly resolving it. In this daily tip, let me share with you my four (4) steps to problem solving. These steps are the same no matter if you are on the hunt for a minor issue to some intermittent, pain in the backside, wonky problem.