« Web Setup MSI fail when used on Servers ... | Main | DCOM lives! »

I was at a local fast food joint today and a fairly large individual in front of me order a Double Cheeseburger, Large Fries, and a Diet Coke.  The irony was as big as his backside.

An hour later at work a fellow identified an opportunity to reuse some code (Diet Coke = Good) but in the interest of schedule, ease of deployment, the differenting contexts the original code was used in, changes to the installer, etc. etc., the quickest way to use the code was by copying and pasting (Large Fries = Bad) from one subsystem to the other.

Ordinarily this would have killed me a little inside, but...sigh...at least it was a Diet Coke.

Was I wrong?



Friday, June 18, 2004 4:01:15 PM (Pacific Standard Time, UTC-08:00)
Drinking Diet Coke has nothing to do with 'diet'. It's all about the caffeine.
Friday, June 18, 2004 4:20:09 PM (Pacific Standard Time, UTC-08:00)
Touché! As a diabetic, I DO drink only Diet Rite or Caffeine Free Diet Coke. ;)
Scott Hanselman
Friday, June 18, 2004 9:11:48 PM (Pacific Standard Time, UTC-08:00)
If you are really referring to the code, then I have to suggest that purity will often give way to practicality.

If you were REALLY referring to the Diet Coke, then I have to say I know folks who only drink Diet b/c they think it tastes better than the original.

Friday, June 18, 2004 9:43:55 PM (Pacific Standard Time, UTC-08:00)
I drink Diet Coke because I prefer the tast. Chris, have we met?
Friday, June 18, 2004 10:35:30 PM (Pacific Standard Time, UTC-08:00)
Same here. I drink Diet Coke mainly because I don't really like the sweet stickyness of regular soda. So, I'm the one who also goes for the Big Mac, Fries, Apple Pie and Diet Coke.
Friday, June 18, 2004 11:59:23 PM (Pacific Standard Time, UTC-08:00)
I have to vote for the taste, too. It's what I learned to caffeinate on.
Saturday, June 19, 2004 10:33:21 AM (Pacific Standard Time, UTC-08:00)
Sigh...apparently the analogy didn't work. -1 for my failed Programming metaphors. :)
Scott Hanselman
Saturday, June 19, 2004 10:14:48 PM (Pacific Standard Time, UTC-08:00)
(The web site is still under construction)
I think I see where your comming from with you thoughts on this. For myself, this low carb kick of flagging what is good and what is bad on the menu board took less brain power than lifting a morning cup of coffee. With only thirty minutes to eat between work and class, these easy-to-learn flags are all most anyone needs.
For the gentlemen who's irony was thicker than his backside, attention to atleast some of this detail may not be such a bad idea.
Sunday, June 20, 2004 11:51:13 AM (Pacific Standard Time, UTC-08:00)
I think I understand your point.
Copy and paste a code is not a good idea, but it's the simplest way.
But at least it was a diet coke .... But at least it was a good code.
Depending on the deadline, sometimes we have to give up the elegance.
JG
Monday, June 21, 2004 7:08:03 AM (Pacific Standard Time, UTC-08:00)
THANK you JG. Yes, the analogy was:

* Copying and Pasting code is bad, much like an order of Large Fries.
* Attempting to reuse some code is good, much like ordering a Diet Coke, rather than a Regular Coke.

The question then is, is it good that the programmer attempted to reuse code? Or bad that he just copy/pasted?
Scott Hanselman
Monday, June 21, 2004 9:50:03 AM (Pacific Standard Time, UTC-08:00)
Reuse is not about copying and pasting. Any text editor will allow you to copy\paste to your hearts content without regard for the quality of the code. Reuse is about designing interfaces and libraries of implementation that are well designed, stable, and solve a general enough problem that they can be pulled into projects as needed and increase the productivity and\or efficiency of the team (since they would otherwise have to implement it anyhow). I liked your "simile" and it got the point across and probably made some people think. That is always a good thing. ;) However, IMHO, this isn't a question of reuse as much as a practical application of using a piece of code that the developer thought would save them time. We've all done it. It's like using a template (not generics) and there are several companies that even make a profit of(f) it. In that regard, it's a good thing. The real question is was the code that they copied the right solution or not?
Darin Creason
Monday, June 21, 2004 9:56:22 AM (Pacific Standard Time, UTC-08:00)
Touché and gracias! http://www.purchon.co.uk/poetry/simile.html

Analogy? :)

Ya, the good was good, the idea was good, the issue was that they could copy/paste in 15 seconds, or take 4 hours and refactor the code they needed from where it was to a utility class that wasn't bound to a particular context. So, then punted and copy/pasted with a few changes.
Scott Hanselman
Thursday, June 24, 2004 3:27:07 PM (Pacific Standard Time, UTC-08:00)
i understood the point perfectly. just so you know that the analogy wasn't lost on everyone. ;+)

regarding this:
>The real question is was the code that they copied the right solution or not?

no the issue here is that even if the code is the right solution, by copying it all future maintenance is made harder because there are now two places to maintain the same code.

cheers
leon
Comments are closed.

Contact

Sponsors

Hosting By

Hot Topics

Tags

Calendar

<November 2009>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Archives

November, 2009 (5)
October, 2009 (19)
September, 2009 (11)
August, 2009 (12)
July, 2009 (21)
June, 2009 (26)
May, 2009 (16)
April, 2009 (13)
March, 2009 (17)
February, 2009 (17)
January, 2009 (18)
December, 2008 (32)
November, 2008 (17)
October, 2008 (22)
September, 2008 (16)
August, 2008 (14)
July, 2008 (25)
June, 2008 (19)
May, 2008 (17)
April, 2008 (17)
March, 2008 (26)
February, 2008 (21)
January, 2008 (28)
December, 2007 (19)
November, 2007 (17)
October, 2007 (31)
September, 2007 (39)
August, 2007 (37)
July, 2007 (43)
June, 2007 (37)
May, 2007 (32)
April, 2007 (38)
March, 2007 (29)
February, 2007 (46)
January, 2007 (31)
December, 2006 (27)
November, 2006 (31)
October, 2006 (32)
September, 2006 (39)
August, 2006 (34)
July, 2006 (40)
June, 2006 (18)
May, 2006 (31)
April, 2006 (34)
March, 2006 (30)
February, 2006 (38)
January, 2006 (44)
December, 2005 (19)
November, 2005 (34)
October, 2005 (24)
September, 2005 (37)
August, 2005 (20)
July, 2005 (24)
June, 2005 (33)
May, 2005 (16)
April, 2005 (22)
March, 2005 (34)
February, 2005 (15)
January, 2005 (37)
December, 2004 (28)
November, 2004 (30)
October, 2004 (34)
September, 2004 (22)
August, 2004 (34)
July, 2004 (18)
June, 2004 (64)
May, 2004 (49)
April, 2004 (21)
March, 2004 (29)
February, 2004 (29)
January, 2004 (36)
December, 2003 (25)
November, 2003 (24)
October, 2003 (59)
September, 2003 (42)
August, 2003 (24)
July, 2003 (44)
June, 2003 (29)
May, 2003 (21)
April, 2003 (30)
March, 2003 (27)
February, 2003 (47)
January, 2003 (50)
December, 2002 (31)
November, 2002 (38)
October, 2002 (44)
September, 2002 (15)
May, 2002 (2)
April, 2002 (4)

Google Ads