Generated by asking Claude Sonnet 3.7: "Rewrite the Prodigal Son parable from the Bible to instead be about clean code changes"
There was a development manager who had two developers. The younger developer came to the manager and said, "Give me my portion of the codebase that I'm assigned to maintain." So the manager divided the responsibilities between them.
Not long after, the younger developer committed all his code without review, took a backup of his work, and departed to a remote repository where he squandered his inheritance with messy, uncommented code and duplicated functions. After he had spent everything on bloated libraries and inefficient algorithms, a severe production incident occurred throughout the company, and he began to be in need.
So he went and took a contract with a company in that remote repository, and they sent him to their fields to manage legacy code. He longed to refactor even the most deprecated functions that the legacy systems were using, but no one gave him permission to change anything.
When he came to his senses, he said, "How many of my manager's contractors write clean, efficient code with proper documentation, and here I am starving for good practices! I will go back to my manager and say: 'Manager, I have sinned against best practices and against you. I am no longer worthy to be called your developer; make me like one of your contractors.'"
So he got up and went to his manager. But while he was still a long way off, his manager saw him and was filled with compassion for him; he ran to his developer, opened a code review, and walked through his code with him.
The developer said to him, "Manager, I have sinned against best practices and against you. I am no longer worthy to be called your developer."
But the manager said to his senior developers, "Quick! Bring the best IDE license and install it on his machine. Put a mechanical keyboard in his hands and ergonomic furniture in his workspace. Bring the stable build and let's deploy it; let's have a code party and celebrate. For this developer of mine was writing spaghetti code and is now writing clean code; he was committing without tests, and now is found writing unit tests." So they began to celebrate.
Meanwhile, the older developer was in the codebase, refactoring. When he came near the office, he heard the sounds of the team celebrating a successful sprint review. So he called one of the QA engineers and asked what was going on. "Your colleague has come," he replied, "and your manager has merged his pull requests because he has returned to writing maintainable code."
The older developer became angry and refused to join the code review. So his manager went out and pleaded with him. But he answered his manager, "Look! All these years I've been following the style guide for you and never diverged from your coding standards. Yet you never gave me so much as a bonus for writing clean code. But when this developer of yours who has wasted memory with inefficient algorithms comes home, you celebrate his pull requests!"
"My dedicated developer," the manager said, "you are always with me, and everything in our repository is yours. But we had to celebrate and be glad, because this colleague of yours was writing unmaintainable code and is now writing clean code; he was lost in technical debt, and now is found refactoring."