On 9/01/2013 23:16, Frank Westlake wrote:
> I have not studied computer science academically and I have never worked
> in the computer industry so this is merely personal opinion based on 28
> years of programming experience. If anyone has information which
> contradicts any specific point it may be interesting to read, but more
> interesting will be information which contradicts my general principles.
>
> I don't write well so if I seem to have misstated something please ask
> for clarification.
>
> I think the generally recognized goals of optimization are for speed and
> for space, but as I see it there could be many more goals which may be
> more important then those two. Herein I discuss those which I see as
> being mostly relevant to this forum.
>
> SPEED
Certainly - but spending hours to save a few seconds in a batch that
only gets run once a day is silly.
>
> SPACE
Hmm - like a 128Mb USB, perhaps. Oh, but it has to reside with Uncle
Bill's space-gobblers. Yeah - gotcha.
>
> PROCESSOR USAGE
Nominally, background non-real-time processes should be low-priority and
that's the province of the OS - but we're talking theory aren't we?
>
> MODULARITY
All very good in theory - until the local PhD candidate decides to
optimise your module in some way.
NO on using templates to copy - at least without very strict controls.
I worked for a company where the programmers had become used to using
COBOL copylibs as templates, edited into the programs and altered to
suit. And maintained. And recopied.
Came the inevitable day that the file format changed...
But equally, using copylibs isn't immune to the ministrations of the
ignorant. At another site, copylibs had been used mainly as intended but
the system had been designed by an accountant and implemented by a pair
of programmers who'd had no formal training - in fact, when put on a
formal course had demanded to be removed because it was "braking there
branes."
Came the day when the company wanted to add more branches - implemented
by the inevitable OCCURS clause. The PhD student insisted to her husband
(the "IT manager" who'd simply been a salesman with the company for 40
years) that all that was required was to change the OCCURS clause and
recompile. If I absolutely INSISTED on doing this unnecessary testing,
then she'd get together with her fwend and spend a WHOLE DAY on testing
the 600+ programs in the suite that used the copylib...
'Course - that WAS COBOL, but the principle still applies in my book. A
dose of experience beats all the theory in the world.
>
> READABILITY
Not the most important - THE important matter is that the OBJECTIVE be
achieved. A close second is something you've omitted - RELIABILITY.
Worked for a mob once that was implementing some ISO documentation
standard. The "manager" insisted on using documentation templates such
as "Form 35" (Not "Form 35 - User Requirements.") Everything documented
to the hilt - that the person making the request was authorised, trained
and qualified, as were the analyst and the programmer. Bureaucrat's
paradise. Only thing missing was the certification by the user that all
this uber-documented work actually achieved the objective...
Readability is a sound principle. Naturally, it won't help in the
hopeless cases where OP insists you supply code (for free, of course)
that automatically substitutes their URL and password for 'yoururl' and
'yourpassword' and when it doesn't work, the total response is "It
didn't work properly."
>
> MAINTENANCE
Yes - at least for the literate.
>
> Frank