in reply to Re^4: Debugging a module that's failing under taint mode
in thread Debugging a module that's failing under taint mode
"... really cannot be used anywhere other than within the website that it is written for - really...it cannot ..."
Unfortunately, what happens all too often, is a sequence like this:
I hope you can see where this is going. There is no such thing as "will only be used by" or "final version" or anything else absolute like that. Every time you copy and substitute, or attempt to make identical changes in multiple files, you run the risk of introducing typos, subtle errors, and the like; the more you do this, these risks go from minimal chance to almost guaranteed. Furthermore, look at the huge rod you're making for your back with all of this extra work (that could've been avoided).
The A/B/C scenario I provided is, of course, a purely hypothetical example; however, it does mirror the type of thing that I've encountered on numerous occasions in over four decades of software development. Here's some examples.
Never assume your code will only ever be used by one entity. Always abstract your code such that it can be reused. Avoid hard-coded values like the plague.
Some of this might seem like additional work; however, once you get into the habit of doing it, you should find that it takes little or no extra effort. Moreover, as your software matures, the benfits accrue and you'll avoid the types of problems that I've indicated above.
You've been here for less than a year with a clear appetite for learning and improvement — this is great. You've taken onboard templates, placeholders, and so on; I hope you pick up on the ideas I've presented here too.
— Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Debugging a module that's failing under taint mode
by eyepopslikeamosquito (Archbishop) on Jul 03, 2021 at 10:41 UTC | |
by Bod (Parson) on Jul 04, 2021 at 17:49 UTC | |
|
Re^6: Debugging a module that's failing under taint mode
by Bod (Parson) on Jul 04, 2021 at 18:20 UTC | |
by kcott (Archbishop) on Jul 04, 2021 at 22:39 UTC |