It’s a common saying among developers that they spend more time naming variables than they do developing. Naming variables isn’t that hard, but it’s actually quite difficult and important.

importance of naming variable

It happened the other day in a company meeting. We had an internal service called Alert Manager, and someone proposed adding a feature to it. The idea was accepted, but as the discussion continued, the scope of the proposed functionality kept expanding. Eventually we agreed that this broader concept should be separated from Alert Manager and turned into its own service. The problem was that we still had no name for the new service, so for convenience people kept referring to it as Alert Manager, which started confusing everyone, myself included. People could no longer tell whether a given feature belonged in the original Alert Manager or in the new service, and the confusion was even worse for people who had not been part of the conversation from the beginning. To stop the confusion from getting worse, I suggested we pause and at least come up with a working title. The name Admin Portal was chosen. Only after the new name appeared did the confusion begin to fade. We even found ourselves discussing the possible features of Admin Portal in much more concrete terms. It seemed easier for everyone to flesh out a service called Admin Portal than to imagine some still-unnamed thing. That made me think again about the importance of naming.

Everything that needs to be distinguished from other things has a name. Cars, buildings, streetlights, streets, paintings, mouse, keyboards, and so on. And it’s easy to communicate with others because the name is part of an agreement that we’ve all agreed to call the object. Without a name, it’s easy to create miscommunication when we call something “a vehicle with wheels that can travel on a road”. Someone might think of a motorcycle, someone might think of roller skates, someone might think of a handcart, and so on. The moment you start calling it a “car”, you minimize that misunderstanding. Everyone has the same object in their head and can talk about it.

Moreover, the right name becomes even more important for the people who have to build that “something”. Without a name like “car,” it’s hard for an organization that needs to build a car to flesh it out. But once we name the thing we need to build a “car”, it becomes clearer what we need to build. We all have the same idea in our heads: it has to have rear-view and side mirrors, tires made of rubber, a door for people to get in and out of, and a glass window to see out the front.

But at the same time, naming an object also narrows it. A team that sets out to build a “car” will naturally start caring more about things like the engine and fuel efficiency. There is little need to keep debating what belongs inside it, because everyone already assumes seats, a trunk, and the rest. And yet, perhaps what that team really needs is the idea of breaking through the limits of the word “car” and putting a kitchen, a toilet, and a bed inside it. (At that point, of course, the object will receive a new name: “camper.”) Still, it is not easy to break free of the limits imposed by a name.

I realized that the moment you give something a name, you also begin to close off the space for imagination around it. That made the act of naming feel even more important to me. If you label someone in their twenties, in their fourth year of college, as a “college senior,” it suddenly feels as if they should be preparing for employment. But if you call that same person “youth,” they could become a rapper, a merchant, or something else entirely. Of course, they could also simply be unemployed.

While naming something makes it more concrete, it also has the effect of defining its limits. In the same way, even among developers who get paid to write code, the people who think of themselves as wage earners or salarymen seem a little different from those who think of themselves as developers or software engineers. Naming takes real care, and even after a name is fixed, we still have to keep carving out room for possibility instead of letting ourselves be fenced in by the limits that name creates.