Working with OPC (Other People's Code)

2005-07-22 Thread Rick Root
rant I took over this job from another guy about almost 3 years ago. Many of the things he built I have rewritten. In many cases, I found it easier to rewrite them from scratch than to fix them or enhance them. For example, here is a snippet of his code that exemplifies that type of

RE: Working with OPC (Other People's Code)

2005-07-22 Thread SStewart
the Scottish Rogues -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 11:30 am To: CF-Talk Subject: Working with OPC (Other People's Code) Importance: Low rant I took over this job from another guy about almost 3 years ago. Many of the things

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Cutter (CF-Talk)
22, 2005 11:30 am To: CF-Talk Subject: Working with OPC (Other People's Code) Importance: Low rant I took over this job from another guy about almost 3 years ago. Many of the things he built I have rewritten. In many cases, I found it easier to rewrite them from scratch than to fix

Re: Working with OPC (Other People's Code)

2005-07-22 Thread James Holmes
Wow. I'd like to know what the crackhead thought this would acheive: CFSET EVENTURL = EVENTURL On 7/22/05, Rick Root [EMAIL PROTECTED] wrote: For example, here is a snippet of his code that exemplifies that type of programming that he did:

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Dave.Phillips
How about this one: CFIF thevalue = evaluate(de(chr(asc(1 :) Dave -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 12:14 PM To: CF-Talk Subject: Re: Working with OPC (Other People's Code) Wow. I'd like to know what the crackhead thought

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Claude Schneegans
Wow. I'd like to know what the crackhead thought this would acheive: CFSET EVENTURL = EVENTURL Set a variable eventUrl to whatever eventUrl variable from another scope contains. -- ___ REUSE CODE! Use custom tags; See

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Aaron Rouse
I deal with stuff like this all the time around here. From what I have gathered, the reason it was done here was because of lack of knowledge on the different scopes. So best I can figure they thought if it was being passed to the page that they would have to set it so they could reference it.

Re: Working with OPC (Other People's Code)

2005-07-22 Thread S . Isaac Dealey
Wow. I'd like to know what the crackhead thought this would acheive: CFSET EVENTURL = EVENTURL Set a variable eventUrl to whatever eventUrl variable from another scope contains. Yeah, technically this will set variables.eventurl to the value of form.eventurl or url.eventurl ... but it's a

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Ken Ferguson
I love this stuff! I get the biggest kick out of going through some of the things people write. I was doing some enhancements on an app for a client a year or so ago and there were several templates well over 1,000 lines each with variables named aa1, aa2, aa3, bb1, bb2, bb3 and on and on

Re: Working with OPC (Other People's Code)

2005-07-22 Thread S . Isaac Dealey
Here is my version, rewritten: -- cfif EVENTURL neq and reFindNoCase(https?://,EVENTURL) eq 0 cfset EVENTURL = http://; EVENTURL /cfif -- How about this? cfset eventurl

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Dave.Phillips
: Friday, July 22, 2005 2:05 PM To: CF-Talk Subject: Re: Working with OPC (Other People's Code) I love this stuff! I get the biggest kick out of going through some of the things people write. I was doing some enhancements on an app for a client a year or so ago and there were several templates

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Matt Osbun
Subject: RE: Working with OPC (Other People's Code) Yes Ken, it's good to remember our humble beginnings. While we laugh now, we're years after someone who laughed at us. Keeps us humble. :) But at least we can enjoy it now! I guess we've earned our 'stripes'. Dave

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Jennifer Larkin
I can top that with a cfset var1 = var1 + 0 It will make my things not to do in CF blog column eventually. That's not the best part of the snippet of code in waiting. But yeah, feeling your pain. Keep in mind that ergonomic wrist rest pads that span the width of the keyboard also make a good

RE: Working with OPC (Other People's Code)

2005-07-22 Thread S . Isaac Dealey
cfif evaluate(#namelist#) = cfset l#namelist# = 0 cfelse cfset l#namelist# = evaluate(#namelist#) /cfif The rewrite (because namelist is a query name and column name and I wasn't prepared to go the extra mile to eliminate the evaluate in this case): cfset l#namelist# =

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Douglas Knudsen
I blogged about my fav here http://www.cubicleman.com/?id=51#comments This one wins the award for sure. Ever hear of MonthAsString()? doh! !--- This is used in Historical View reports to determine month headers --- CFIF variables.holdmonth EQ '01' January CFELSEIF variables.holdmonth EQ '02'

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Ray Champagne
wrote during your humble beginnings... I wrote *what*? Matt Osbun Web Developer Health Systems, International -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 1:06 PM To: CF-Talk Subject: RE: Working with OPC (Other

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Matt Osbun
[mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 1:17 PM To: CF-Talk Subject: Re: Working with OPC (Other People's Code) LOL! I'm doing that right now. Silly loops of loops of loops of queries just trying to get the same result that I would have gotten if I had just written the DB query

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Al Everett
] [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 1:06 PM To: CF-Talk Subject: RE: Working with OPC (Other People's Code) Yes Ken, it's good to remember our humble beginnings. While we laugh now, we're years after someone who laughed at us. Keeps us humble. :) But at least we can enjoy

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Dave.Phillips
LOL. Yep, I've done that a few times. Dave -Original Message- From: Matt Osbun [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 2:15 PM To: CF-Talk Subject: RE: Working with OPC (Other People's Code) Unless, of course, you're currently updating code you wrote during your humble

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Ray Champagne
with OPC (Other People's Code) Yes Ken, it's good to remember our humble beginnings. While we laugh now, we're years after someone who laughed at us. Keeps us humble. :) But at least we can enjoy it now! I guess we've earned our 'stripes'. Dave

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Ken Ferguson
Then you look around the room slyly to make sure nobody else noticed. If not, then you're free to yell, who's the idiot that wrote this mess?!?!? For good measure, make sure you really berate the guy. LOL Al Everett wrote: Been there. On 7/22/05, Matt Osbun [EMAIL PROTECTED] wrote:

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Jacob
Message- From: Jennifer Larkin [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 11:14 AM To: CF-Talk Subject: Re: Working with OPC (Other People's Code) I can top that with a cfset var1 = var1 + 0 It will make my things not to do in CF blog column eventually. That's not the best part

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Jerry Johnson
AT your sister's wedding? I kind see why that might be embarrassing. Did the wedding photog get any pictures? On 7/22/05, Ray Champagne [EMAIL PROTECTED] wrote: Looking back at some of my code brings back the same type of embarrassment that I felt after sleeping with the fat ugly chick at my

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Rick Root
S. Isaac Dealey wrote: Here is my version, rewritten: -- cfif EVENTURL neq and reFindNoCase(https?://,EVENTURL) eq 0 cfset EVENTURL = http://; EVENTURL /cfif -- How about

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Ray Champagne
No, it was after the wedding (post reception party at my apartment for the hardcore drunks), she was a friend of the family's daughter, about 5 years younger than me. I was 26 at the time, drunk and stupid. No one knew about it except her, my roommate and the 100 people he told. What an

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Ray Champagne
hmmmhope my mom doesn't read cf-talk archives. :) Ray Champagne wrote: No, it was after the wedding (post reception party at my apartment for the hardcore drunks), she was a friend of the family's daughter, about 5 years younger than me. I was 26 at the time, drunk and stupid. No

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Bryan Stevenson
OK...I'll chime in ;-) Had a client with a site that ran off of 5 MS Access tablesseems straightforward righthehe Each table (all related to one another) was stored in a seperate MDB file (not linked...each with it's own datasource)!!! Cheers Bryan Stevenson B.Comm. VP Director

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Bryan Stevenson
hmmmhope my mom doesn't read cf-talk archives. :) LOL..nope...but Goolge does ;-) Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: [EMAIL PROTECTED] web:

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Ray Champagne
Yea, I've burned myself enough on this list to not worry anymore. :) Bryan Stevenson wrote: hmmmhope my mom doesn't read cf-talk archives. :) LOL..nope...but Goolge does ;-) Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone:

Re: Working with OPC (Other People's Code)

2005-07-22 Thread S . Isaac Dealey
I like it! Although I've found regular expression replacing with backreferences to be illegible, personally. Yeah, they often have that effect... :) s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework

Re: Working with OPC (Other People's Code)

2005-07-22 Thread S . Isaac Dealey
And not even a switch-case! :) I wonder what the last cfelse is for... if no value was provided for the month? Plus, with the quotes, this would produce no output for 1-9 without the leading zero. Even without monthAsString... #listGetAt(January,February,etc...,variables.holdmonth)# I

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Jacob
cfset date = #dateformat(now(), MM/DD/YYY)# Today's date is: cfoutput#date#/cfoutput -Original Message- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 11:45 AM To: CF-Talk Subject: Re: Working with OPC (Other People's Code) OK...I'll chime in ;-) Had

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Dave.Phillips
Good point...better hope she never google's Ray Champagne. You're already in spot 2 on houseoffusion.com! Ack!!! Dave -Original Message- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 2:46 PM To: CF-Talk Subject: Re: Working with OPC (Other People's Code

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Ray Champagne
Message- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 2:46 PM To: CF-Talk Subject: Re: Working with OPC (Other People's Code) hmmmhope my mom doesn't read cf-talk archives. :) LOL..nope...but Goolge does ;-) Bryan Stevenson B.Comm. VP

RE: Working with OPC (Other People's Code)

2005-07-22 Thread SStewart
Who's down with OPC Sorry, it was there, had to be done Scott A. Stewart, Web Application Developer Engineering Consulting Services, Ltd. (ECS) 14026 Thunderbolt Place, Suite 300 Chantilly, VA 20151 Phone: (703) 995-1737 Fax: (703) 834-5527 Many thousands of years ago, a blue faced

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Rick Root
[EMAIL PROTECTED] wrote: Yes Ken, it's good to remember our humble beginnings. I laugh at my own terrible code sometimes, if not often. I remember once writing a huge long custom tag that basically did exactly what GetDirectoryFromPath() and GetFileFromPath() did because I wasn't aware they

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Jennifer Larkin
Definitely been there. I distributed the first thing I ever wrote on CF-Talk and about 3 years later I got a support request. I hadn't even looked at it in two years, so I opened the file to look something up and OH MY GOD THE POUND SIGNS! Pound signs everywhere. On 7/22/05, Al Everett [EMAIL

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Jerry Johnson
I slaved for a good five hours one day in Foxpro, and then proudly showed off my code to a coworker. She said And how does that differ from properCase()? (It wasn't as good? It ran slower?) On 7/22/05, Rick Root [EMAIL PROTECTED] wrote: I remember once writing a huge long custom tag that

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Dave.Phillips
To: CF-Talk Subject: Re: Working with OPC (Other People's Code) Definitely been there. I distributed the first thing I ever wrote on CF-Talk and about 3 years later I got a support request. I hadn't even looked at it in two years, so I opened the file to look something up and OH MY GOD THE POUND

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Eddie Awad
On 7/22/05, Douglas Knudsen [EMAIL PROTECTED] wrote: I blogged about my fav here http://www.cubicleman.com/?id=51#comments This one wins the award for sure. Ever hear of MonthAsString()? doh! Who is the poor guy who inherited this code: http://www.mschopman.demon.nl/horror.txt? -- Eddie

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Bryan Stevenson
cfset date = #dateformat(now(), MM/DD/YYY)# Today's date is: cfoutput#date#/cfoutput I'll do ya one better.how about not using the Now() function at all...instead the guy grabbed the date from the database (I might add the database was on the same server as CFso no time zone issues)

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Bryan Stevenson
No lie - I *just* came across this in the code I'm maintaining: input type=hidden name=stupid value=42 / NO LIE! Okay, I'm done with this thread. Wow, talk about true to life! Dave I've seen professional firms use CSS style element names that would make your granmother blushand of

RE: Working with OPC (Other People's Code)

2005-07-22 Thread SStewart
PROTECTED] Sent: Friday, July 22, 2005 2:58 PM To: CF-Talk Subject: Re: Working with OPC (Other People's Code) Definitely been there. I distributed the first thing I ever wrote on CF-Talk and about 3 years later I got a support request. I hadn't even looked at it in two years, so I opened the file

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Damien McKenna
I must say that I've written some nasty FB3 code that will be much cleaner when I rewrite it in FB4.1... when I get the time. -- Damien McKenna - Web Developer - [EMAIL PROTECTED] The Limu Company - http://www.thelimucompany.com/ - 407-804-1014 #include stdjoke.h

RE: Working with OPC (Other People's Code)

2005-07-22 Thread Damien McKenna
-Original Message- From: SStewart [mailto:[EMAIL PROTECTED] I had to pull the variable bitch out of someone's code once the boss wasn't pleased when he found it. I'd like to dedicate this variable to Veronica in Sales... -- Damien McKenna - Web Developer - [EMAIL PROTECTED]

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Claude Schneegans
Yeah, technically this will set variables.eventurl to the value of form.eventurl or url.eventurl ... but it's a piss-poor way to do that... Do you know a better one? ;-) -- ___ REUSE CODE! Use custom tags; See

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Rick Root
Claude Schneegans wrote: Yeah, technically this will set variables.eventurl to the value of form.eventurl or url.eventurl ... but it's a piss-poor way to do that... Do you know a better one? ;-) well, at the very least: !--- copy eventUrl into variables scope from unknown scope --- cfset

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Cutter (CF-Talk)
: Jennifer Larkin [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 2:58 PM To: CF-Talk Subject: Re: Working with OPC (Other People's Code) Definitely been there. I distributed the first thing I ever wrote on CF-Talk and about 3 years later I got a support request. I hadn't even looked

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Jochem van Dieten
SStewart wrote: I had to pull the variable bitch out of someone's code once the boss wasn't pleased when he found it. Was it for an animal shelter? Jochem ~| Discover CFTicket - The leading ColdFusion Help Desk and

RE: Working with OPC (Other People's Code)

2005-07-22 Thread SStewart
ago, a blue faced Pict stepped on a bloated sheep carcass... and thus the Pipes were born the Scottish Rogues -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Friday, July 22, 2005 04:45 pm To: CF-Talk Subject: Re: Working with OPC (Other People's Code

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Bryan Stevenson
Hehehe, Nope, the developer who's code I was fixing didn't like the client. sas Reminds me of some code I took over from some others on this list (or at least were on this list...can't recall who now) AnywaysI found comments in the code like Do not trust Mr. Xhe will promise the

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Jennifer Larkin
That kind of comment seems helpful. We used to have fun with comments at one place where I used to work. There was one really bad developer and basically everyone else. Once the bad developer handed off his code to the group, comments started to appear like: And here's where John goes completely

Re: Working with OPC (Other People's Code)

2005-07-22 Thread S . Isaac Dealey
OK...I'll chime in ;-) Had a client with a site that ran off of 5 MS Access tablesseems straightforward righthehe Each table (all related to one another) was stored in a seperate MDB file (not linked...each with it's own datasource)!!! If they're stored in the same directory,

RE: Working with OPC (Other People's Code)

2005-07-22 Thread S . Isaac Dealey
Yeah, when I first started in CF, I had to deal with the code of my predecessor, he surrounded very page with a single set of cfoutput tags and left justified everything, no indentation at all. It would take me hours just to read it. I took his name in vain more than a few times

RE: Working with OPC (Other People's Code)

2005-07-22 Thread S . Isaac Dealey
-Original Message- From: SStewart [mailto:[EMAIL PROTECTED] I had to pull the variable bitch out of someone's code once the boss wasn't pleased when he found it. I'd like to dedicate this variable to Veronica in Sales... Thanks Damien. :) Laughing so hard I can barely see...

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Matt Robertson
Do you know a better one? ;-) Yes. (me speaking to developer who wrote that): I warned you already to always scope your vars, ye idgit! ***thwack!*** *thud* I reworked some old code and jiggered the db structure for someone within the last week that took their processing time from like 40

Re: Working with OPC (Other People's Code)

2005-07-22 Thread Bryan Stevenson
: www.electricedgesystems.com - Original Message - From: S. Isaac Dealey [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Friday, July 22, 2005 3:47 PM Subject: Re: Working with OPC (Other People's Code) OK...I'll chime in ;-) Had a client with a site that ran off of 5 MS Access tablesseems