On Dec 9, 11:17 pm, Bill Kelly <bi... / cts.com> wrote:
> From: "Dumaiu" <Dym... / gmail.com>
>
>
>
> > Perhaps I should avoid buzzwords.  I admit that, having never
> > actually looked 'optimization' up, I may define it more loosely than
> > you.
>
> For what it's worth, I'd suggest that the phrase "premature
> optimization" may be more akin to canon, than buzzword, and
> tends to mean something very specific.
>
> (By canon, I mean, "the body of rules, principles, or standards
> accepted as axiomatic and universally binding in a field of study
> or art.")
>
> For completeness sake, the original appearance of the phrase in
> publication:
>
>   "We should forget about small efficiencies, say about 97% of
>   the time: premature optimization is the root of all evil."
>
>   (Knuth, Donald. Structured Programming with go to Statements,
>   ACM Journal Computing Surveys, Vol 6, No. 4, Dec. 1974. p.268.)
>   ((Knuth is said to have been parahprasing C.A.R. Hoare))
>
> >  I didn't mean optimization for performance but for elegance.  
> > ne se dit pas?  The purpose of refactoring is to improve code by
> > increasing elegance, unless I seriously misunderstand.  My own
> > tendency is to overthink it and try to reevaluate a design after every
> > single change.  I think this is another case where balance is best.
> > If you have achieved such a balance with your "cycles,"
> > congratulations.  I apologize if I offended you.
>
> I think I *was* actually offended. <grin>  But it was obviously
> based on a misunderstanding.
>
> I don't think I've achieved ideal balance yet... I'm usually
> coming at it from the other direction: skipping a few refactorings
> until I realize some part of the code is really bothering me, then
> having to make time for a larger cleanup.  But hopefully I'm
> improving.
>
> Regards,
>
> Bill

	I've had a chance to think some more.  First, is the word 'canon'
canonical?  I mean, do I have to use it?  I've not encountered a field
outisde of computer science or the Roman Catholic Church in which
standards would be described as canon, even if they were 'universally
binding,' which they aren't.  It makes me feel like we ought to be
arguing about Star Wars or something.
	But on a more serious note: I am bemused by the discovery that I
still cannot convince myself of any fundamental distinction of intent
between what we call the processes of optimization and of refactoring,
despite the great differences in procedure by which they are
undertaken.  I earlier made the error of trying to see the issue in
terms of performance v. "good design," you could say, but it's really
more like a radial tug-of-war between many competing priorities.
After all, even when optimizing purely to decrease the load on the
computer, you still have to choose which *part* of the computer needs
the most attention.  By comparison, you refactor code to decrease the
load on at least one, but never all, of the human "parts" of the
software project.  And it's blurred further within the domain of
dynamic languages.  Even if you think only of maintainability, i.e.,
the human element, tradeoffs must still be made: the more you separate
interface from implementation, the uglier the implementation is going
to get.
	Is that a contentious statement?  I'm spinning this out as I go.  Let
me know know what you think.

	-Jonathan