Refactoring
Posted: Sun Jan 06, 2019 10:28 am
I have a very, very clunky thing called "Devawriter Pro" which I have been developing for about 9 years.
It is clunky in these ways:
1. Orphaned code left over from earlier recensions
[Mainly focussed on the numToChar/ numToCodePoint switchover].
2. Horrible reduplication of code [think 50 buttons using 99% the same code].
3. Other "side-projects" that never got "there" but still lying around under the hood.
According to a conservative estimate I could reduce the size of my main stack by at least 50%.
Questions that inevitably pop up are:
1. Is the time that will be involved in refactoring going to be reflected in terms of a financial increase.
[This question is a load of old "sh*t" as I've never made more that $400 a year for the thing:
I just shoved it in here for completeness.]
2. How much of this can be done automatically?
[Probably in my case, NONE, as LiveCode does not understand the "joys" of
ancient Indian writing systems.]
3. How can I ensure that as I change bits of code in various places it does not have unseen and
unsuspected consequences elsewhere?
4. Version tracking? Should I build an autosave script into the stack prior to doing anything else?
5. Why am I even bothering to think about this and write these questions?
WELL, at least I can answer #5:
AND it comes in 2 parts . . .
Because I am well aware that if I really want to keep going with this thing [think "bottomless pit"]
the cracks are going to start appearing very, very soon if I don't address the fact that, like MacOS 9,
my current version (2.6.0) is floating around on code from version 0.1 which should have gone
the way of the woolly mammoth a long, long time ago.
People are writing all sorts of "jazzy, technical stuff" about refactoring over on the Use-List
in "jazzy, technical" language that makes me feel unco queer because it seems
(possibly unnecessarily jargonised) very difficult for "simple" folk like me to follow.
It is clunky in these ways:
1. Orphaned code left over from earlier recensions
[Mainly focussed on the numToChar/ numToCodePoint switchover].
2. Horrible reduplication of code [think 50 buttons using 99% the same code].
3. Other "side-projects" that never got "there" but still lying around under the hood.
According to a conservative estimate I could reduce the size of my main stack by at least 50%.
Questions that inevitably pop up are:
1. Is the time that will be involved in refactoring going to be reflected in terms of a financial increase.
[This question is a load of old "sh*t" as I've never made more that $400 a year for the thing:
I just shoved it in here for completeness.]
2. How much of this can be done automatically?
[Probably in my case, NONE, as LiveCode does not understand the "joys" of
ancient Indian writing systems.]
3. How can I ensure that as I change bits of code in various places it does not have unseen and
unsuspected consequences elsewhere?
4. Version tracking? Should I build an autosave script into the stack prior to doing anything else?
5. Why am I even bothering to think about this and write these questions?
WELL, at least I can answer #5:
AND it comes in 2 parts . . .
Because I am well aware that if I really want to keep going with this thing [think "bottomless pit"]
the cracks are going to start appearing very, very soon if I don't address the fact that, like MacOS 9,
my current version (2.6.0) is floating around on code from version 0.1 which should have gone
the way of the woolly mammoth a long, long time ago.
People are writing all sorts of "jazzy, technical stuff" about refactoring over on the Use-List
in "jazzy, technical" language that makes me feel unco queer because it seems
(possibly unnecessarily jargonised) very difficult for "simple" folk like me to follow.