0

The agony of legacy code - not for weak stomachs

ColdFusion

I have spent the last 10 hours of my day working over some legacy code that was originally built about 7 years ago by two PowerBuilder developers who where tasked with taking their first shot at ColdFusion on a mortgage loan application underwriting system.

Below is a small sample of the 2,875 line pile of horse crap that I have been wallowing through all day. There were over 100 queries in this single template. There was at least one example of the same row being queried at least 10 times, each time looking for some specific column.

I realize I have become kind of spoiled working in nice solid OO-applications in sound frameworks, but this is like a bizarro world.

If you are brave, take a look at this, and take pride in the fact that your code doesn't look like this on your worst day.

Enjoy!


		
		
		
			
			
				
				
				
    				
					@+*x^')>
					 
				
			
				
				
				
    				
					@+*x^')>
					
						
						
		
			
		
		
		
			
			
				
				
				
    				
					@+*x^')>
					 
				
			
				
				
				
    				
					@+*x^')>
					
				
						
		
			
		
		
		
			
			
				
				
				
    				
					@+*x^')>
					 
				
			
				
				
				
    				
					@+*x^')>
					
						
						
		
			
		
		
		
			
			
				
				
				
    				
					@+*x^')>
					 
				
			
				
				
				
    				
					@+*x^')>
					
						
						
		
			
		
		
		
			
			
				
				
				
    				
					@+*x^')>
					 
							
			
				
				
				
    				
					@+*x^')>
					
							
			
		
			
		
		
		
			
			
				
				
				
    				
					@+*x^')>
					 
							
			
				
				
				
    				
					@+*x^')>
					
								
									
		
	

tags:
ColdFusion
Jim said:
 
Actually I just inherited a pile of old CF web applications which make me cringe everytime I open them ALONG WITH several PowerBuilder applications - so I feel your pain...

 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
todd sharp said:
 
Makes me want to go home and crawl back in bed - and that's just me looking at it.
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
John Allen said:
 
Big D. Soooooo sorry, soooooo sorry. Reminds me why all the work i have put in over the last year was totally worth it.

ohhhhh so sorry ohhhh so sorry.
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
Phil Duba said:
 
Holy pound signs batman! That is a lot of garbage code. Reminds me of when CFMX came out and I had to upgrade an application written Cobol programmers writing their first CF app. I still wake up sometimes screaming at night, ;) , so I feel your pain Dave!
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
Scott Stroz said:
 
Make the bad man stop!!!!!!!
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
michael white said:
 
man, I hope you never have to actually change anything in that code... (just re-write from scratch... I'd figure a way. It's got to be cheaper and quicker)
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
fro said:
 
Hey, that looks like my first app. :)

j/k (kinda)
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
todd sharp said:
 
No you're not kidding fro..
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
Pete said:
 
Boy, I sure hope you didn't sign an NDA before you posted this on the internet! ;)
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
Joe Rinehart said:
 
My eyes, they bleed!
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
 
re: "Boy, I sure hope you didn't sign an NDA before you posted this on the internet! ;)"

I hope that someone malicious actually tries to steal this and use it. It would serve them right!
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
Tracy Smith said:
 
Those pounds signs drive me insane. I often have to "upgrade" code from a version 1 of a site that was done about 5 years ago. It's what I call "scary" code. In 99% of the cases, I'd rather re-write it from scratch rather than convert it. Of course, I do remember a BASIC program I wrote a long time ago that was upwards of about 6000 lines of code.
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
Peter Bell said:
 
There is something WRONG with coding like that? Dang. :->
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
 
I am still working in this monstrosity today, and would hereby like to nominate the following for "Variable of the Day":

loan_borr_1_prop_min_est_exp_dt
 
posted 1059 days ago
Add Comment Reply to: this comment OR this thread
 
John Allen said:
 
"Variable of the Day"

LO-Fen-L!!!!
 
posted 1058 days ago
Add Comment Reply to: this comment OR this thread
 
 
John F(en) Allen...everytime I see your headshot pic, it makes me chuckle
 
posted 1058 days ago
Add Comment Reply to: this comment OR this thread
 

Search