You will have requested me to ship an account of the miraculous prevalence often called The Refactoring. In reply to your inquiry, I’ve consulted each our Git commit messages and truly spoken with residing witnesses to this miracle of miracles. Here’s a true account of what occurred in The Refactoring!
Yea, verily, to start with, there was the Code and the Code labored and the Firm prospered mightily.
Then, the Refactorers inspected the Code and pronounced judgment: the Code was !@#$%
The Refactorers despatched a deputation to interrogate the Cowboy Coder who had written the Code. He requested if Kent Beck was a form of beer. When proven a duplicate of the Holy Textual content Refactoring by the Prophet Martin Fowler, the Cowboy Coder leafed curiously by way of the Holy Ebook and began laughing. Without delay they seized this Heretic and Blasphemer and dragged him to the entrance door.
He started to shout “Wait! Wait! You don’t perceive what I’m doing! I’m deferring complicated costly work with little income producing worth in order that we are able to get revenues now!” And the last word blasphemy, the recourse of all sinners: “However the Code works!”.
I can not repeat all of the lies and calumnies this serpent amongst males then repeated to the assembled Refactorers. The Refactorers prayed and chanted: “There’s however One Option to Code and it’s Our Method! Begone sinner!”
The Refactorers plugged their ears in opposition to the Cowboy Coder’s lies and commenced to stone him and drove him into the wilderness by no means to be seen once more.
Because the Cowboy Coder fled, he cried out: “Lord forgive them for they know not what they do!”
The Code consisted of Modules Alpha, Beta, Gamma, Delta, and Omega.
The Chief Refactorer shouted forth: “There’s duplicated code within the modules! Sin! Sin! Sin! All duplicated code ought to be in a single module. The only module will make the code scalable and maintainable.”
The Refactorers labored mightily for forty days and forty nights to refactor the Code into Modules Alpha, Beta, Gamma, Delta, and Omega … and Epsilon, which contained the duplicated code. Alpha, Beta, Gamma, Delta, and Omega, every one, known as Epsilon.
And the Code didn’t work and the Firm suffered mightily.
And the Refactorers shouted: “It’s all the Cowboy Coder who wrote the unique Code’s fault! He didn’t write scalable, maintainable Code. All he cared about — sin of sins — was that it labored!”
And the Code nonetheless didn’t work and the Firm suffered mightily.
After which, Theo, that viper the Vice President of Gross sales plotted in opposition to the Refactorers and went to the CEO and whispered: “Maybe we should always ship a deputation of our most silver tongued gross sales and advertising and marketing executives into the wilderness with chests of incense and myrrh and advantageous gold to search out the Cowboy Coder, apologize, and ask him on bended knee to please return and repair the Code.”
And the CEO was outraged and shouted forth: “I can’t reward incompetence! By no means!”
And the Vice President of Gross sales was seized and dragged to the entrance door and stoned and solid out into the wilderness — by no means to be seen once more.
And the Code nonetheless didn’t work and gross sales plummeted much more with out that silver tongued viper amongst males the Vice President of Gross sales.
The Refactorers labored mightily for one more forty days and forty nights, cleansing and fixing the Code in Modules Alpha, Beta, Gamma, Delta, and Omega … and Epsilon.
And the Code labored poorly and the Firm suffered and the Refactorers obtained raises and promotions.
The Refactorers labored mightily for one more forty days and forty nights, cleansing and fixing the Code in Modules Alpha, Beta, Gamma, Delta, and Omega … and Epsilon and Epsilon Prime (They needed to refactor Epsilon because it grew too massive for the Coding Fashion Customary).
The Fifty-eighth Commandment of Good Coding: Thou shalt not have a Module with greater than 200 Strains of Code.
And the Code labored OK and the Firm was worthwhile as soon as extra and the Refactorers obtained raises and promotions.
After which Theo, the CEO spake: “The Alpha module can’t deal with widgets. I would like it to deal with widgets!” And the CEO wept and tore his garments.
The Refactorers bowed down earlier than the CEO and answered: “Concern not, the Code will deal with widgets.”
The Refactorers labored mightily for one more forty days and forty nights, modifying the shared code in Module Epsilon … Prime to deal with widgets.
After which the Code might deal with widgets however stopped dealing with wadgets (Module Beta), worrels (Module Gamma), ickbats (Module Delta), and lothbigs (Module Omega). That sinner, the Cowboy Coder had deferred implementing dealing with all of the particular, mutually contradictory peculiarities of wadgets, worrels, ickbats and lothbigs as a way to — sin of sins — get issues working quick! By his sloth and haste, the Cowboy Coder had created the misunderstanding that code might be shared within the dealing with of widgets, wadgets, worrels, ickbats, and lothbigs!
After which Theo, the CEO spake once more: “What the !@#$%^!” And the CEO wept and scourged himself!
The Refactorers bowed down once more earlier than the CEO and answered: “Concern not, the Code will deal with widgets, and wadgets and worrels and ickbats and lothbigs!”
The Refactorers labored mightily for one more forty days and forty nights, refactoring Module Epsilon into Modules Epsilon-Widget known as by Alpha, Epsilon-Wadget known as by Beta, Epsilon-Worrel known as by Gamma, Epsilon-Ickbat known as by Delta, and Epsilon-Lothbig known as by Omega, which in flip known as Epsilon-Prime (nicely all however Epsilon-Lothbig which known as Epsilon Double-Prime attributable to an obscure peculiarity of lothbigs not shared by widgets, wadgets, worrels, or ickbats).
And Theo, as soon as once more, the Code labored (kind of) and the Firm struggled to outlive, barely turning a revenue.
And the Refactorers stated: “It’s all the Cowboy Coder’s fault! Look how exhausting it was to switch and lengthen his code! Sinner! Sinner! Sinner!”
And Theo, right here is the miracle, the CEO believed and showered the Refactorers with extra raises and promotions.
© 2014 John F. McGowan
In regards to the Creator
John F. McGowan, Ph.D. solves issues utilizing arithmetic and mathematical software program, together with creating video compression and speech recognition applied sciences. He has intensive expertise creating software program in C, C++, Visible Fundamental, Mathematica, MATLAB, and lots of different programming languages. He’s in all probability greatest identified for his AVI Overview, an Web FAQ (Continuously Requested Questions) on the Microsoft AVI (Audio Video Interleave) file format. He has labored as a contractor at NASA Ames Analysis Heart concerned within the analysis and improvement of picture and video processing algorithms and expertise. He has revealed articles on the origin and evolution of life, the exploration of Mars (anticipating the invention of methane on Mars), and low cost entry to area. He has a Ph.D. in physics from the College of Illinois at Urbana-Champaign and a B.S. in physics from the California Institute of Know-how (Caltech). He will be reached at [email protected].