Let’s talk about what is the intent of variables, syntax, and naming standards. What is a variable? A variable is a symbol that represents data. It represents some value. It’s variable because you can change its value by reassigning it another value. For example, if you had a variable $post_id = 10;, you can change the value of the variable by doing $post_id = 20;. It’s the same variable, but you varied the value by assigning it a new value. Why is it a “symbol?” A symbol lets us define an alphanumeric symbol that we can read. It “represents” something […]
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.
PHP Variables Introduction
This episode introduces you to PHP variables and this bootcamp. You will also find out what you need for this bootcamp, which includes the Non-WordPress Sandbox, which you will use throughout this bootcamp.
PHP Conditional Expressions
Conditional expressions are an essential in programming, yet they are largely misunderstood. In this bootcamp lab, you will discover how complex expressions are evaluated as well as falsey states, assignments in the expression, and much more. Roll up your sleeves as it’s time to dive deep into PHP conditional expressions.
Computers do not think. You do.
This quick lesson will help you to understand your relationship as the programmer with the computer. It is one of the essential building blocks in your quest to build anything in software. Software development is a thinking profession. Computers cannot read your mind. They cannot infer or figure out what you want it to do. They are literal and exact. They only do exactly what you tell them to do. That’s it. Computers do not think. You do. When a computer is not doing what you want, stop and look at your code. Remember this tip. Then spend your time […]
Code Tip – Alternate Ternary Operator syntax ?:
The ternary operator can be confusing, as it dehydrates the longer if/else code blocks into a single line of code. It eliminates the repeating pattern. But what about the ?: syntax? How does that work? When should you use it? Check out the other syntax here. This tip is valid for JavaScript and PHP.
Code Tip: Purposeful Naming
Let’s talk about naming of variables, functions, etc. in your code. In this video, you will learn some handy guidelines on naming by intent to let your code express what it’s doing, why it exists, how to use it, and what to expect from it. This tip is valid for all programming regardless of the language or technology.
PHP Tip: What makes a conditional expression false (falsey state)?
In this video, you will learn the intent of this `if` conditional expression as well as what evaluates to false. This is known as checking the falsey state.
Operator Precedence Experiment
In this episode, you are going to do an experiment to discover the answers and see how the operator precedence actually works. When you combine complex expressions together, each expression is evaluated following the operator precedence. However, which side of the expression is evaluated first? And if one part is false what happens to the other parts? It’s important that you know how your conditional expressions will be evaluated and in what order to ensure you do not get unexpected behavior.
Logical Operator Experiment
Which side of the expression runs first? And when you do an && if the left side is false, does it run the right side? How about an ||? If the left side is true, does it run the right side? In this experiment, you’ll write code that proves the order and which sides actually run for the logical operators. You’ll get some tips too.
Operator Truth Tables
Logical operators work just like their hardware digital gate counterparts. Let’s figure out truth tables to discover how the And, OR, and Xor actually work.