JWColby
jwcolby at colbyconsulting.com
Sun Feb 18 07:16:16 CST 2007
LOL, I haven't read it either. However CodeLib and the like are about having code that is available to "paste" in to your project. I suppose that as long as you are just pasting it into your library module so that it is available in only one place, then no harm done. Cutting and pasting code throughout a project is just verboten. In any event, the implication here: > 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. Is that cutting and pasting is an everyday occurrence, and by inference that it is a good thing to do. In which case, it would be much better for the software industry if we simply had the CIA render him off to Egypt or somewhere where he could come to understand the effects of torture and perhaps make an informed decision not to do that anymore. 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 Michael R Mattys Sent: Sunday, February 18, 2007 6:50 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Missing references Er ... I haven't read Code Complete but ... Isn't it the case that the declarations and type-defs of the Windows API are what is being cut and pasted because there are so many that don't apply to the project at hand? That there is no way to compile or run the code unless and until it conforms to the Windows 'framework?' Michael R. Mattys MapPoint & Access Dev www.mattysconsulting.com ----- Original Message ----- From: "JWColby" <jwcolby at colbyconsulting.com> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Sent: Saturday, February 17, 2007 9:34 AM Subject: Re: [AccessD] Missing references > 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 > > -- > 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