Look out! You've awakened the Software Engineer!!
SteveHopwood wrote:Any coder will confirm that he/she spends most of his/her time tracking down the last time they solved this problem, or that problem and using copy/paste/edit to save working out how to code it again.
I must beg to differ, strenuously. No offense intended, but an experienced professional coder would quail at the very thought of having dozens of copy-and-pasted versions of code lying about. They might all be different in some way, causing confusion when you use a copy that works differently than you're used to. Worse, if you find a problem in it, it's nearly impossible to find all the copies you pasted everywhere, and if you can, then you have to fix the same problem 27 times. There are plenty of reasons why copying the code to a zillion different places is a recipe for disaster, or at least serious headaches.
A pro coder will build a shared LIBRARY of reusable code, so the same common code gets used everywhere. That way there is ONE copy of each key routine, in a known place, and all programs use that same shared copy. You write your library routines carefully so they encapsulate their functionality, without a lot of extraneous cruft like "you have to set this global variable before you call it, and pull your result from that global variable when it's done, and oh by the way it also changes this thing and that thing that you have to know about." Simple clean functions do everything internally (as much as possible), without broadcasting details of their internal workings. That way you can change the internal workings if necessary without disrupting the programs that call it.
Most modern professional programming languages are actually built to
hide all internal details of your code so that calling routines literally
cannot see or affect the code's internal functioning. They changed to this non-obvious approach because decades of research and practical experience have shown that
this is the most efficient way we know to develop software.
With most of your code in these black-box functions, your main program becomes much smaller and vastly easier to write, debug, maintain, and understand. This is the way all (literally 99.9% or more) professional software is developed. I'd bet even incompetent hacks like the Empty4 developers use this approach. It's the technique that has been developed over decades by thousands of programmers. It's the only way that's manageable for large software projects, and IMHO it's the best way for small ones too.
Steve, the fact that you've taught yourself to code, and that you are so incredibly prolific, is a great testament to your intelligence and your ability to hold huge amounts of complexity in your head. The fact that you are continuously bedeviled by copy-paste bloops &etc, that bugs fixed in your shell do not propagate to older EAs, that you cannot remember how an EA works a few months after you write it, and other problems, speaks to the inefficiency of the approach you use. Your approach works for you, but IMHO it doesn't work very well. I think you would be amazed how much more productive you could be if you made the effort to switch to a modern software-development model.