The Parking Spot Analogy
How It Applies to Your Codebase and Your Life

Look at Figure 1 above. You’re the gray car looking for a spot. You find obnoxious Mr. Red taking up two spots. How entitled! How annoying! You don’t have a lot of time, and you’re just trying to go about your day. Nothing more frustrating than finding that someone else’s actions has now affected your day and your life at this moment, completely out of your control.

You don’t have a lot of time or choice, so what do you do? You squeeze in and continue on your day, all the while muttering and complaining at what you had to do — Figure 2. You entertain thoughts of keying Mr. Red just to teach him a lesson, but you don’t want to be petty and really just need to get going.
However, you’ve also put your own car in jeopardy of being dinged or scratched.

By the time you return, Mr. Red has left and Ms. Yellow has parked, and has done so perfectly within the lines, no less. Mr. Blue has also left — Figure 3. You see Mrs. White glaring daggers at you for taking up two spots. To anyone arriving now, you appear the entitled and obnoxious one. You can’t really explain the situation, so you figure it best to just get out quickly. She’s impatiently waiting for you to pull out. If she pulls a Karen on you, can you really blame her?
As you pull away, you realize your hand was forced into taking up two spots just to make your situation work. You needed to take care of your own business, so you just had to make your car fit.
Then, your mind idly pondered the possibility of what might’ve happened to Mr. Red to take up two spots just before you did.

Some time before you arrived, perhaps, Mr. Red was also in a hurry. Who does he find but a police car illegally parked across two spots (Figure 4)? He can’t even really complain to the law about the violation, as the violator and the enforcer were one and the same. He could have probably escalated the complaint, but that effort likely would have been fruitless. Also, he was in a hurry; he just needed to take care of his own business.
So what did Mr. Red do? He parked in the exact manner you later found him in.

Shortly after Mr. Red parked and left, Mr. Cop left as did Mr. Biker. Mr. Orange made sure to park correctly, but also likely gave sneering looks at Mr. Red.

That’s when you came along and blamed everything on Mr. Red and his sense of entitlement.
Takeaways
What does this have to do with coding? (If you are not a software developer, skip down to the next section)
- You start a new job and inherit the existing code. Immediately, you take a cursory look at the codebase and exclaim to your new supervisor, “The existing code base is a mess! Who would write this crap? Standards aren’t being followed, solutions are hacky, we’re not following pattern, there’s security holes everywhere, blah blah blah…”
- Consider the possibility that the previous coder (Mr. Red), whose code you now have to maintain, was a) Given poor requirements, b) Given limited time, c) Given limited or restricted access to current standards; perhaps, current standards were not even in place.
- More importantly, the coder before you (Mr. Red) also encountered a giant ball of spaghetti code and just had to make it work to satisfy his requirements and his deadline. So what did he do? He did his best to sidestep the mess, make some changes and moved on to the next ticket.
- What if Mr. Red’s hand had been forced by a figure of authority up in the hierarchy? What if the CTO (Mr. Cop) said “just get it done by 3pm no matter what you have to do?” Check for SQL Injection? No, that’s a myth, that doesn’t really happen. What about Man-In-The-Middle attacks? No, no time to code against that. Just release it as is. By the time you inherit the code, Mr. Red has left the company, as has the CTO. You find code with a bunch of security holes and can’t imagine how this code ever went to production.
- If you continue to work on the code without taking care of the existing issues, the issues will persist, and you may get the blame for its current state when Mrs. White comes along. Perhaps it’s time to employ the Boy Scouts’ mantra: Leave it better than you found it.
- The interest rate on Technical Debt is exceedingly high. Making no attempts to pay down this debt makes the codebase exponentially worse very fast. When the critical mass of tech debt is reached, the popular solution is a nightmare all on its own — The Dreaded Rewrite.
Not Just About the Code
The Parking Spot Analogy is not just a lesson in software development; it is a very real concept that can be applied to life in general.
- What’s the point of stressing out about situations that are out of your control? Handle the problem the best you can. The United States Marine Corps have a saying — Improvise, Adapt, Overcome.
- Don’t be petty, don’t be disrespectful, don’t be vengeful
- Don’t be so fast to blame and judge others without knowing their full circumstances
- Don’t be so fast to criticize a situation without understanding the full picture
- Don’t assume you’re the only one who’s ever encountered the problems you’re facing. Taking a Woe Is Me attitude is nothing but an energy drain.
- And finally, taking the metaphorical to the literal, the Public Service Announcement: Next time you encounter parking spot entitlement, remember that road rage is a waste of mental and emotional energy that can have real financial, health and legal consequences.
Image credits:
The figures above are created and composited by the author using images adapted and sourced from various sites around the internet: Red, Orange, Blue, Gray, White, Yellow, Cop, Motorcycle.






