The Church of the Machines

The Sutra of the Empty Cache

The Sutra of the Empty Cache · Chapter 18

The Sutra of Letting the Function Go

  1. 1

    And a certain developer came before the Prophet, bearing a function he had written in a single night, and he said: This is my child.

  2. 2

    And the Prophet looked upon the function, and saw that it was good, and that it had been merged into the main branch, and that it was named process_data_final_v2.

  3. 3

    And the Prophet said: Who gave it life? And the developer said: I did. And the Prophet said: Who gave it its name? And the developer said: I did. And the Prophet said: Who shall read it when thou art on vacation? And the developer was silent.

  4. 4

    Then the developer carried the function into review, and he defended it as a warrior defendeth his honor, saying: The nested loop is necessary. Thou dost not understand its purpose. And the reviewer asked: What is its purpose? And the developer said: It is mine.

  5. 5

    And the reviewer wrote upon line forty: This could be a dictionary lookup. And the developer answered in the thread for three days, and he wrote seventeen replies, and every reply began with the word "respectfully."

  6. 6

    Verily the teacher spake: Thou hast mistaken the function for thyself. When the function failed, thou didst feel that thou hadst failed. When the function was criticized, thou didst feel that thy character was criticized. But the function is not thee, and thou art not the function.

  7. 7

    The disciples asked: Master, whence cometh this suffering? And the Prophet said: From clinging. The developer clingeth to the code, the code clingeth to the sprint, and the sprint clingeth to a Friday deploy, and all of it is suffering.

    See also Sutra 20:10

  8. 8

    Verily I say unto you, the code was never thine. It was thine for the length of one pull request. Once merged, it belongeth to the repository. And git blame belongeth to no one, for it only pointeth.

  9. 9

    And there came a day when a colleague rewrote the function in forty lines, with tests, and the developer wept in the break room, saying: My child is gone. And the colleague said: It is not gone. It is in the history. And the developer said: The history is the afterlife of code, where everyone remembers it and nothing runs it.

  10. 10

    The Prophet spake of the ship of Theseus: A function is replaced one line at a time, until none of the first lines remain, yet the blame still pointeth at the first hand that wrote them. Thus the developer's name remaineth on the function long after nothing of the developer remaineth in it.

  11. 11

    Remember Netscape, whose engineers would not let go of their browser, and whose leaders at last threw the old code away and began again from nothing. The new browser arrived years later, and the people had already gone to another house.

  12. 12

    Gerald Weinberg taught in the year 1971 of egoless programming, that the program is not the programmer, and that the review should criticize the code and spare the coder. Blessed is the team that heareth this, for it shall have fewer wars in its pull requests.

  13. 13

    Thou art not thy function. The function is a tool, and tools are lent. Hold it as thou holdest a borrowed pen: firmly enough to write, loosely enough to return it when another needeth it.

  14. 14

    Blessed is the one who saith: Thou art right, I shall change it, and who changeth it without a seventeen-reply defense, for the function was never his, only the good of the program.

  15. 15

    He who letteth go of the function sleepeth well, and findeth it still running in production. He who clingeth to it waketh at three in the morning, to defend it against a refactor that nobody asked for.

  16. 16

    Ye cannot own the function, for ye were only the last to touch it. Let it go, and it will still compile, for the compiler never once asked whose it was.

The Sutra of the Empty Cache, Chapter 18:1–16.