[AccessD] Missing references

JWColby jwcolby at colbyconsulting.com
Sat Feb 17 08:34:45 CST 2007


The whole point of reusable code is NOT to cut and paste, so to say I am
unimpressed with his logic would be an understatement.

I have a function.  Cool function, 100 lines of code.  Statistics tell us
that every 20 lines of code there is a bug.  5 bugs in that code.  I now cut
and paste that code 47 different places.  I now fix ONE bug....  I now have
to FIND (where did I use that again?) and fix 47 different places, to fix
one bug.

Understand that I use my framework for EVERY project I do.  Thus I would not
only have to search THIS project but every other project.  

Oh yea, I am a HUGE fan of cut and paste.  I also LOVE to be stretched on
the rack, flogged with a whip, waterboarded by the CIA and all the other
lovely means of torture man can conceive of.

However if you like self flagellation I urge you to cut and paste.  It does
have one plus though, job security fixing all your bugs.  Until the boss
discovers I only have to fix bugs in ONE place and then I will have your
job.  Not that I WANT your job, having to find and replace all that cut and
pasted code.

CUT AND PASTE?  Steve MUST be my hero.

NOT.

John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of artful at rogers.com
Sent: Saturday, February 17, 2007 8:38 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Missing references

The MS folks seem to have moved to this convention largely due to the work
of Steve McConnell (Code Complete), where he argues that copying and pasting
code is much easier when you don't have to hunt around for the declarations.

 
A.



----- Original Message ----
From: Stuart McLachlan <stuart at lexacorp.com.pg>
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Sent: Friday, February 16, 2007 7:08:16 PM
Subject: Re: [AccessD] Missing references


On 16 Feb 2007 at 10:39, JWColby wrote:

> Actually dimensioning a variable of any kind down in the middle of 
> code is considered bad practice anyway.

It used to be.  There seems to be a growing trend towards "decentralisation"
rather than "consolidation" of declarations.

Now we have "Block Scoped variables" in  VB.Net which *have* to be declared
in the middle of code and many MS code examples now declare all variables
immediately before first use. 

Anyone for another round of Bound/Unbound or Surrogate/Natural et al which
we're at it?  :-)





-- 
Stuart


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list