Tier 1 Series 3

3D: Boolean Logic

Pilot Record
Student Profile
"In a cockpit, a light that says "NOT_UNLOCKED" is a mental trap. Does an 'Off' state mean it's locked, or just broken? If your AI uses double negatives or vague flags like tempBool, you've created Logic Fatigue. A skilled Engineer audits for Positive Inquiry."

The Concept: The "Is" Question

A Boolean is a simple True/False switch. To audit them effectively, they should always be named as a question that has a clear "Yes" or "No" answer.

The Prefix Rule: Start bools with is, has, can, or should.
Stay Positive: Use isDead instead of isNotAlive. Double negatives cause brain-scan crashes.
Red Flag Detected

The AI Trap: "The Double Negative"

You ask the AI: "Stop the ship from moving if the landing gear isn't down."

// AI-Generated Code: Confusing Logic Flow
public bool gearNotDown = true; 

void Update() {
    // Audit Fail: Reading "if not gear not down" is painful.
    if (!gearNotDown) {
        MoveShip();
    }
}

This is "Logic Friction." Every time you audit this code, you have to stop and think about the reversal. A professional pilot demands "Positive Status" lights that match the physical reality of the craft.

Elite Telemetry

Research shows "Elite" teams achieve 15% faster lead times by keeping AI on a "very tight leash."

  • Small Batches Solving one problem at a time prevents logic drift.
  • Modular Design Localizing the "blast radius" of AI changes.
  • Tight Loops Rapid iteration with constant code review.

The Mechanic's Correction

Corrective Protocol
public bool isGearDeployed;

void Update() {
    // Corrected: Clear, positive, and instant to audit.
    if (isGearDeployed) {
        PrepareForLanding();
    }
}
Your Pilot Command
> Use an Interface (IInteractable) to enable polymorphic interaction.
Next Mission
Header & Space