Refactoring, Ctrl-C/V & Relativism

I was just reading a friend's ever-clever bitstream on copy and paste behaviors while thinking through a number of things I've been experiencing and studying. After too much tea and too much reading without a break, I accidentally juxtaposed the ideas of refactoring, copy and paste and relativistic decision-making as they do or do not contribute to societal evolution and legacy. You might need ditch weed for this. Hold on.

The idea of refactoring as it relates to software systems is focused on taking some set or sub-set of code and "re-factoring" it, or otherwise, re-molding it to a more optimized state of existence and usefulness. Code that is not useful is either removed, replaced or refactored to be driven by test criteria, to be made smaller, faster and more reliable, as well as, other nefariously intelligent things such as reducing complexity, minimizing internal and external dependencies and so on. The changes are intended to be purposed and in small increments so as to preserve the integrity of the idea being refactored. It is not as if the base idea is wrong. Its current instantiation may simply require..."attention". You can reasonably characterize the behavior as the disciplined /art/ of engineering and one can absolutely do it wrong. However, to do it correctly may not be noticed by anyone other than the developer pair and change logs. The takeaway from this example is that there first must exist something that has a useful purpose, serves a greater good and merits optimization. Were there first nothing, refactoring nothing is not useful.

Now the idea of copy and paste is another conversation unto itself. To copy and paste an idea from one part of code to another without refactoring it to context and purpose may lead to failure. Already said quite well by the Agile Otter, --don't. Should I take code from one context and simply paste it into another context, it may actually be worse off on a number of levels than before such annihilation. Copyright or IP violations, stupid user issues, career compromise and so on. The conversation is actually deeper than this single-dimensional point. The simplest nugget around copy and paste problems may be this: what works in one context may not actually work when put into another context. In some way shape or form, it will require refactoring. And the takeaway for this particular para is that again, there must be a pre-existing state in order for copying and pasting anything to actually be a modification.

...but what if there was first nothing? Or, what if there was first a fractured instantiation of an idea?

If I first have a software program and I want to modify it, I have many decisions that I can make. Does the system work as it should already? Is it crafted to adapt/evolve or otherwise modify its own behavior as environment variables change or am I solely responsible for its evolution? Is there some part of the system that is just plain missing? Is there some part of the system that requires a nudge, nod or bump to move it from State A to State A++? Am I tired? Do I really give a rip?

The choice to copy and paste an idea from somewhere else into my existing system is a context-driven, relativistic choice. The choice to refactor my existing code or refactor that which I copied and pasted from someone else's hard work is also a context-driven, relativistic choice.

What if the data points I used to derive context are wrong? Is then my context wrong? Is it wrong locally or systemically? Is context relative to perception? Experience? How do I arrive at consistent context across ten different developers working on the same code base? How do I know that all ten developers are willing to invest the same level of effort, quality and usefulness into evolving said software system? What if just one of them, the one with the most influence and power, has it wrong?

Are we talking about a software system and team? Or are we discussing culture? Or are they the same? Is this the Matrix?

What if a culture has no identity? What if it has no discernible identity? What is the society itself cannot agree on one stronger cultural element over another OR it cannot agree on the synthesis of multiples?

Do you cut and paste an identity from somewhere else? Or do you cut and paste elements of one culture and paste it into your own? What if you miss the context in which it first originated elsewhere making the cut and paste non-meaningful or even breaking something else that used to work? Sure the framework appears to be there, but does it do anything useful? Is it really anything of note if you didn't create it and it doesn't usefully fit into this context?

And what about refactoring what already exists? Sure copy and paste plus refactoring could be the ticket in some cases. Refactoring an entire society seems like trying to boil the ocean in a single motion. Doesn't make sense. What if we refactored one element of a society or even one gradient of one element? Atomic level may be too small. To manipulate a system without disrupting it, incremental adjustments are required. The inverse may also be a strategy but is outside the bounds of this soliloquy. (Hello, am I alone in here?)

Alas, but I'm as bored as you are with this conversation.

What if, and I'm just making this stuff up as I come off the high from two pots of tea and too much sugar... what if every single person kept every single commitment every single time? Refactoring, Ctrl-C/V and relativism then all have a place to exist thereafter. First there is a base, then there is an evolutionary history thereafter. Yes, yes, I agree; there is an evolutionary history even if there is no base, it just may not matter for any longer than it takes to flush the cache.