Naming is one of the hard problems in programming

When we define a variable, we're giving a value a name. That name gives us enormous leverage. We can refer to that value later by name. We can refer to it multiple times. And the name itself gives meaning to our code. The number 36 is no longer just a figure. The String "Eric" is no longer just a sequence of characters. Because we can say:

(def age 36)
(def first-name "Eric")

And we give lots of meaning to our code.

We use a lot of variables in code, and a lot of names. We need rules for how they work--especially when they conflict. We want those rules to make our lives easier. We don't want to accidentally refer to the wrong variable or to unexpectedly have it change meaning.

That's what the scoping rules are all about. They tell us what each variable in our code refers to, even when there are duplicate names. If we master these rules, we can be confident that our code will do what we mean. And we can make the choices that are right for our new code.