Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Yes you can shoot me.

 

I'm at work converting reports from ASCII Display over to a Reporting Module for more professional display.

 

500 lines of code with maybe 20 of them being comments - 10 of that being the Header which doesn't really say anything.

 

Oh, and whoever wrote this procedure didn't even tab properly so indents are all over the place.

 

This is a single procedure set up to handle 3 variations of the same report and various sorting methods.

 

I just know this could be handled better through use of procedures and/or classes. Damn I miss programming in .net

Posted

Oh... Sorry. Thought I mentioned. Progress 9 4GL. The people at work compare the syntax to VB6 (which is why I got the job which I'm not ungrateful for) and they also compare it as a database application akin to Oracle.

 

I pray for peoples souls that it's not really like Oracle. Oracle has to have more redeeming values and speed and ease of use...

 

To cut down on length of size for a procedure they use "include files" (similar to PHP, JavaScript and HTML) which is just another file which at runtime is inserted dynamically into the proceedure.

 

:eek: No. No. That proceedure I was working on was way more than 500 lines! I forgot that there was an include for populating the databables... probobly like 300 lines, and they use includes for the graphical report page creations in a way that it's effectively calling another 50 lines to the procedure each time a new page is printed.

 

Well anyways, the proceedure I saw and worked with was a grand 500 lines of no region folding straight up code.

 

And they look at me like I"m crazy when I use jEdit for it's Folding, inserting Todo lists, code anchors, etc. :rolleyes:

  • 2 months later...
Posted

Huh?

 

I thought this was only for VB.

 

I may get sacked for this but, no no no. 500+ lines for a procedure is definately a nono.

 

1.) Its hard to trace if errors occur.

2.) Hard for other programmers to understand and hard for you to document.

3.) Its not a good sofware engineering practice. :D

Posted
I thought this was only for VB.

 

I may get sacked for this but, no no no. 500+ lines for a procedure is definately a nono.

 

1.) Its hard to trace if errors occur.

2.) Hard for other programmers to understand and hard for you to document.

3.) Its not a good sofware engineering practice. :D

 

If it were a straight forward 500 line procedure, I could see it.

 

This procedure wasn't. Actually it was the worst kind of 500 lines... the kind where you copy the first 250 lines, throw logic around it and paste it in the second part of the logic. It was EXACTLY the same except for some changes. made. It could have easily been a 280 line report by adding some logic.

 

Then again it could and should have been 2-5 50 line procedures with comments.

 

Yeah, the 500 lines of code didn't have much in the way of comments. comments. There was a block at the top and everyonce and a while a commented like with some code word in it which looked like a way to indicate when a logic statement ended, which one it was (since they were so wrapped up in each other like spaghetti).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...