Trending
Opinion: How will Project 2025 impact game developers?
The Heritage Foundation's manifesto for the possible next administration could do great harm to many, including large portions of the game development community.
In this reprinted <a href="http://altdevblogaday.com/">#altdevblogaday</a>-opinion piece, Blitz's technical manager Lee Winder examines how people use the term "refactor" and how the once descriptive word has lost all meaning.
[In this reprinted #altdevblogaday-opinion piece, Blitz Game Studios' technical manager Lee Winder examines how people use the term "refactor", and how the once descriptive word has lost all meaning.]
Refactor: Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.
I pretty much wish that word had never been invented. The above definition (taken from Martin Fowler's Refactoring Home Page) seems to have lost nearly all meaning when used in day to day programming conversations. To further describe the original definition of refactoring:
Its heart is a series of small behavior preserving transformations. Each transformation does little, but a sequence of transformations can produce a significant restructuring.
But when someone comes to me and says "I'll just refactor that…" I can no longer assume to know what they'll be doing. Based on how people now use this term it could be any one of a number of things including (in order of violence)
Making small changes to make the system more understandable, simpler and easier to use without affecting it's perceived behaviour
Optimising elements of the system which should hopefully (?) not effect the external behaviour
Making wide ranging changes to a system which will effect elements of its behaviour
Deleting the whole thing and starting again without even looking at what we have now
It seems like there is a reluctance to use the words 're-write', 'modify', 'break' or (in a some cases) 'trash' when discussing intentions towards an existing system. As a result, what was a very descriptive and clear term has lost all meaning and resulted in something what can no longer be used to clearly describe a useful and often necessary development process. Do I wish the word hadn't been invented? Maybe I just wish it hasn't taken on an image that 'refactoring' is somehow cooler or more elite than simply saying what you mean when describing what you'll be doing. [This piece was reprinted from #AltDevBlogADay, a shared blog initiative started by @mike_acton devoted to giving game developers of all disciplines a place to motivate each other to write regularly about their personal game development passions.]
Read more about:
2011You May Also Like