My friend has written a function 831 lines long.
-
In my company i got the task to modify something in my friend Visual C code. Imagine my surprise when I saw a function 831 linel long!!! Do u know a longer function? Love is the law, love under will.
I have to maintain a project that has been converted from VB to MFC :suss: And most of its functions have way more than 831 lines :omg:
-
I worked with someone that did that. The page was at least 5000 lines. I also worked with someone that used multiple connection objects in an ASP page to run multiple queries. A new connection for every query, and there were quite a few queries. It was all connecting to the same database. Quite sad actually. Jason Gerard "This almost never matters, except quite often."
I took over a site from another company a couple of years ago. There were a few administration pages - just basic add, edit and delete. All of the variables were supposed to be page-level variables X| , and some mong had written a
Sub
to declare them all. Just:Sub DeclareVariables
Dim oConnection
Dim oRecordset
Dim oImSuchAStupidT*sser
...
End SubWorse than that was the update procedures: To add a record, they would open a recordset on the whole table, call
AddNew
, set the columns, and thenUpdate
. To edit a record, they would open a recordset on the whole table, move through each record until they found the one they wanted,Edit
, update the columns, thenUpdate
. To delete a record, they would open up a recordset on the whole table, move through each record until they found the one they wanted, and callDelete
. The pages were so similar, this had to be a standard template. And this company was (and still is) promoting their web-development services! :omg: :wtf: I had to laugh, after I'd stopped screaming. :-D
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
I took over a site from another company a couple of years ago. There were a few administration pages - just basic add, edit and delete. All of the variables were supposed to be page-level variables X| , and some mong had written a
Sub
to declare them all. Just:Sub DeclareVariables
Dim oConnection
Dim oRecordset
Dim oImSuchAStupidT*sser
...
End SubWorse than that was the update procedures: To add a record, they would open a recordset on the whole table, call
AddNew
, set the columns, and thenUpdate
. To edit a record, they would open a recordset on the whole table, move through each record until they found the one they wanted,Edit
, update the columns, thenUpdate
. To delete a record, they would open up a recordset on the whole table, move through each record until they found the one they wanted, and callDelete
. The pages were so similar, this had to be a standard template. And this company was (and still is) promoting their web-development services! :omg: :wtf: I had to laugh, after I'd stopped screaming. :-D
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Well, since we're trading horror stories of other peoples code. I worked with another fellow who, among other things, took 2 week to create a single ASP page with a form. The problem is, he used design time controls for everything and he named them intuitively a, b, c, aa, a1, etc... Needless to say, we had to rewrite it. It truly is amazing how other people code. Jason Gerard "This almost never matters, except quite often."