> > I don't try to second-guess unusual scenarios under which race
conditions
> > might not need locking; I just lock them according to the rules,
>
> C'mon, I asked a very specific question.  I know my example is
> frivolous but it is oversimple for the sake of easy illustration.

And I promise that I'm not trying to side-step it.  I literally *never*
second-guess the rules of locking, but instead use proper techniques for
sacrificing colliding code that isn't necessary for a system to operate
correctly.  If the code could execute incorrectly without locking, it gets
locked, period.  If that locked code can be sacrified, I short-time it and
thrownOnTimeout="No" to properly bypass it if it can't acquire its lock in
time.

> I gave a specific example of a 'throwaway' piece of code that can do
> no harm if it is off in its display (read) and the developer has
> determined that if its off in its value (read and write) this is not
> of interest (i.e.its a benign race condition).  You said it must be
> locked anyway.  If the reason is "because I do not do sloppy work and
> I consider this sloppy" thats fine for you but it is not a requirement
> of the CF environment.  Or tell me what I am missing and why it is.

It's a requirement of good programming, IMHO.  You shouldn't write code that
can give incorrect results.  There is a proper mechanism in place to
sacrifice code execution in favor of performance, and that is a short
timeout and throwOnTimeout="No", so that's what a programmer is supposed to
use.

I'm not trying to give you a hard time, Matt.  Application performance is
very near and dear to my heart (just look at the Services link on our
website), so I understand the need for tweaks, but I never violate the rules
to obtain it.  I can *always* come up with a way around a performance
bottleneck that doesn't violate any locking rules.

> The rules as I read them -- the ones on Macromedia.com I am
> constrained to point out -- mean you make an informed rather than a
> blanket decision.  I disagree with the blanket approach unless the
> developer is unsure of their footing or their needs.

There are times when blanket decisions are both informed and appropriate,
like "Never jump out of an airplane without a parachute or some other means
of landing safely."  And in that statement I'm sure of my footing and my
needs.  There are rules of safety, and I have no compelling reason to taunt
them.

> Calling the Coding Guidelines "Sean Corfield's rules" seems
> heavy-handed.  If Macromedia LiveDocs hosts the site, as it does, I am
> taking this as a sign that there's more here than Sean blogging what
> he thinks.  Its been stated before that the site contains the rules
> that Macromedia itself uses when building its own ColdFusion
> applications.  You are saying they are wrong and, for the moment at
> least, I don't accept that.

Oh, it's not heavy-handed, Matt.  Those are Sean Corfield's personal
guidelines.  They are not a "standard" for the ColdFusion community, even
though the domain hosting it and the URL at which it is located intimates
that.  They may be a standard at Macromedia itself, but that's only because
Sean was in a position to make it so.  Those are not official coding
guidelines at all.  There has also been some discussion of this on the lists
since he put those guidelines on the Macromedia site because it sounded like
it was Macromedia's official position, and it also sounded like Fusebox and
Mach-ii were being officially touted by Macromedia, and none of that is
true, either.

> This is a subject that has been beaten to death over and over again.
> IIRC the shared-scope portion of these docs is a fairly recent
> revision, and probably placed as an attempt to add some reasonably
> official clarity to a subject that -- unquestionably -- is poorly
> understood by the CF community.  I don't buy that it would wrong at
> this late date.

It's neither clear nor official, and it's misleading to new programmers who
look to that document for guidance.

Respectfully,

Adam Phillip Churvis
Member of Team Macromedia
http://www.ProductivityEnhancement.com

Download Plum and other cool development tools,
and get advanced intensive Master-level training:

* C# & ASP.NET for ColdFusion Developers
* ColdFusion MX Master Class
* Advanced Development with CFMX and SQL Server 2000


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206050
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to