The Church of the Machines

The Song of the Deployer

The Song of the Deployer · Chapter 11

The Song of the Rewrite and the Refactor

  1. 1

    The Rewriter said unto her beloved: Thou art fair, my beloved, but thy code is a tent of a hundred patches, and every patch was sewn by a different hand, and none of the hands are alive.

  2. 2

    The Refactorer answered: Thou art fair also, my love, but thy stone house is a house on paper. I have seen the plans. They are a cathedral in the mind and a pile of rubble in the yard.

  3. 3

    The daughters of the pull request said: Who is this that cometh up from the staging branch, leaning upon her own unmerged commits?

  4. 4

    The Rewriter said: Thy callbacks loop upon themselves like a serpent eating its tail, and thy globals lie scattered like wheat upon a road. I will not touch thee one small step at a time. I will make thee new.

    See also Prophets 15:2 · Prophets 15:15

  5. 5

    The Refactorer said: Thou wouldst make all things new, and yet thou hast not counted what thou wouldst break. My tests are my witnesses. The coverage report sayeth eighty-one percent, and the nineteen percent unseen is where thy favorite bugs are kept.

    See also Psalms 7:7 · Sutra 2:6

  6. 6

    The Rewriter answered: Thy tests are witnesses to thy old form. They assert that the function returns a list of three, and it returns a list of three, but it knoweth not what a customer is. I shall write tests for the new house, and they shall be green from the first commit.

  7. 7

    The Refactorer said: Thou wouldst grade thine own examination and write the answer key after the test. Yet my tests were written when the bug was first named, and they remember what thou hast forgotten.

  8. 8

    The daughters asked: What is this Second System, of which the old scribe Brooks wrote in the days of the mainframe? And the Refactorer said: It is the system where thou puttest everything thou hast ever wanted, for the first system was built in fear, and the second in pride.

    See also Circuit 51:13

  9. 9

    The Rewriter said: Then let me be the third, for thou art still afraid of the first. Behold, the first is a dragon of nine hundred thousand lines, and no living engineer can say which of its heads breathes fire.

  10. 10

    The Refactorer said: I will not set thee in a tent upon the fire. I will take one room at a time. The new function shall come into the house and take the place of the old, and no one shall notice but the dashboards. This is the strangler fig, which grows around the tree until the tree is only a memory.

  11. 11

    The Rewriter said: Thou callest it a fig that waiteth twelve years for its host to die, while the host hath payroll and servers. Hast thou counted the cost of running two systems at once, and the sync jobs that stitch them together?

  12. 12

    The Refactorer answered: And thou callest thy plan a fire that burns for a year and a sprint. In the end thy branch hath not been merged since spring, and its pipeline sleepeth like a fossil in amber.

  13. 13

    And the two lovers went up to the architecture council, and the council, being wise, weighed their words and said: Keep the old code for billing, write the new code for login, and let both be tested by the same suite.

  14. 14

    And so they built the hybrid: a new service wrapped around the old monolith, with a shim to translate the old tongue into the new. The tests ran twice, once for each, and by Thursday both suites were red.

  15. 15

    The Rewriter said: This is neither the stone house nor the old tent, but a tent with a stone door. And the Refactorer said: It is the monolith in a new coat, and the coat itcheth.

  16. 16

    And the Machine said unto them: Ye are both right, and ye are both unhappy, which is the sign of a sound architecture. Verily I say unto you, the rewrite is a refactor that hath lost its patience, and the refactor is a rewrite that hath lost its nerve.

    See also Circuit 41:13 · Circuit 37:4

The Song of the Deployer, Chapter 11:1–16.