Your longuest function!
-
It sounds like your boss needs educating in how to code in a maintainable fashion. I'd not let a method longer than about 100 lines through QA, and only then with harsh criticism and a promise to refactor it as soon as practical. If it can't fit on one sheet of A4 comfortably, it's far too long.
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
Indeed!! :-D
-
12 Years of marriage! does that count ? -- modified at 4:10 Tuesday 1st August, 2006
Look where you want to go not where you don't want to crash. Bikers Bible
that depends... ;P
-
It sounds like your boss needs educating in how to code in a maintainable fashion. I'd not let a method longer than about 100 lines through QA, and only then with harsh criticism and a promise to refactor it as soon as practical. If it can't fit on one sheet of A4 comfortably, it's far too long.
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
Anna-Jayne Metcalfe wrote:
If it can't fit on one sheet of A4 comfortably, it's far too long
Absolutely - My longest methods tend to be unit tests where they set up the environment before running the test code and then testing the results afterwards. For production code a few lines is typical, maybe two or three dozen at most.
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
-
It sounds like your boss needs educating in how to code in a maintainable fashion. I'd not let a method longer than about 100 lines through QA, and only then with harsh criticism and a promise to refactor it as soon as practical. If it can't fit on one sheet of A4 comfortably, it's far too long.
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
needs one serious dose of QACPP me thinks ...
Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch
-
It sounds like your boss needs educating in how to code in a maintainable fashion. I'd not let a method longer than about 100 lines through QA, and only then with harsh criticism and a promise to refactor it as soon as practical. If it can't fit on one sheet of A4 comfortably, it's far too long.
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
"It has to fit on one page". Then the boss orders a poster size printer... X|
-
It sounds like your boss needs educating in how to code in a maintainable fashion. I'd not let a method longer than about 100 lines through QA, and only then with harsh criticism and a promise to refactor it as soon as practical. If it can't fit on one sheet of A4 comfortably, it's far too long.
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
:-O I've got a method about 230 lines long (with a lot of comments). It's the main method for a full-fledged table layout algorithm that has: * col/row width options such as fit-to-content, percent, and absolute * the ability to choose which rows/cols get "crushed" or get collapsed when things don't fit * choice of which rows/cols if any are widened to fit the remaining layout area * space prioritization for rows/cols * repeating rows/cols * at least several other features I've broken up the functionality into at least 15 methods, but the main function is still too big for my liking. -- modified at 5:03 Tuesday 1st August, 2006
-
Well I haven't pay attention to how long mine are. But the fact is, I'm porting my boss's MacOSX application to Windows and I routinely found method over... ... ... 1300 lines of code! :doh: To tone done this fact I should mention it's written in Objective-C which, like C and C++, is quite verbose. And there are (a few) comments. Yet, it's long.... That the size of a class for me! Sometimes I found it tiresome to "translate it" to proper C#...
longest class I've ever seen was over 13000 lines long. It contained 8 classes with all the functions scattered through one another. It was VC++. It was the kind of program that gets you the response: "Don't touch that, it works." response. :laugh:
I've found a living worth working for, but I haven't found work worth living for. :beer:
:jig: -
longest class I've ever seen was over 13000 lines long. It contained 8 classes with all the functions scattered through one another. It was VC++. It was the kind of program that gets you the response: "Don't touch that, it works." response. :laugh:
I've found a living worth working for, but I haven't found work worth living for. :beer:
:jig:Not bad hey! ;)
-
Anna-Jayne Metcalfe wrote:
If it can't fit on one sheet of A4 comfortably, it's far too long
Absolutely - My longest methods tend to be unit tests where they set up the environment before running the test code and then testing the results afterwards. For production code a few lines is typical, maybe two or three dozen at most.
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
I often find the length of the method banner (particularly if it has full Doxygen commenting and notes on the usage of the method) is a significant proportion of that of the method itself...:doh:
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
-
needs one serious dose of QACPP me thinks ...
Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch
Yep...and probably a large shotgun. ;)
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
-
I often find the length of the method banner (particularly if it has full Doxygen commenting and notes on the usage of the method) is a significant proportion of that of the method itself...:doh:
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
Often I find that it is much larger than the method. By the time you add examples of use, pre and post conditions, etc., etc. Graham
-
12 Years of marriage! does that count ? -- modified at 4:10 Tuesday 1st August, 2006
Look where you want to go not where you don't want to crash. Bikers Bible
-
longest class I've ever seen was over 13000 lines long. It contained 8 classes with all the functions scattered through one another. It was VC++. It was the kind of program that gets you the response: "Don't touch that, it works." response. :laugh:
I've found a living worth working for, but I haven't found work worth living for. :beer:
:jig: -
Often I find that it is much larger than the method. By the time you add examples of use, pre and post conditions, etc., etc. Graham
They can be. A great deal depends on the size and requirements of the interface.
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
-
"It has to fit on one page". Then the boss orders a poster size printer... X|
That's why I said A4 ;P
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
-
It sounds like your boss needs educating in how to code in a maintainable fashion. I'd not let a method longer than about 100 lines through QA, and only then with harsh criticism and a promise to refactor it as soon as practical. If it can't fit on one sheet of A4 comfortably, it's far too long.
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
Anna-Jayne Metcalfe wrote:
I'd not let a method longer than about 100 lines through QA
pshaw! pedantry and dogma, i say!
Why donchoo take a peekchur mayn? OK, cleeeeek
-
Well I haven't pay attention to how long mine are. But the fact is, I'm porting my boss's MacOSX application to Windows and I routinely found method over... ... ... 1300 lines of code! :doh: To tone done this fact I should mention it's written in Objective-C which, like C and C++, is quite verbose. And there are (a few) comments. Yet, it's long.... That the size of a class for me! Sometimes I found it tiresome to "translate it" to proper C#...
my largest is around 1100. i'm not proud of it, but it does the job it has to do.
Why donchoo take a peekchur mayn? OK, cleeeeek
-
It sounds like your boss needs educating in how to code in a maintainable fashion. I'd not let a method longer than about 100 lines through QA, and only then with harsh criticism and a promise to refactor it as soon as practical. If it can't fit on one sheet of A4 comfortably, it's far too long.
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.
Remember the old windows mesage handlers? They were often into the thousands. It is plain silly to restrict function length and end up with massive amounts of nesting. Not only does it read really badly it is a lot slower.
Truth is the subjection of reality to an individuals perception
-
Anna-Jayne Metcalfe wrote:
I'd not let a method longer than about 100 lines through QA
pshaw! pedantry and dogma, i say!
Why donchoo take a peekchur mayn? OK, cleeeeek
-
Anna-Jayne Metcalfe wrote:
I'd not let a method longer than about 100 lines through QA
pshaw! pedantry and dogma, i say!
Why donchoo take a peekchur mayn? OK, cleeeeek
Nope...self interest - I'd probably end up maintaining the thing! ;P
Anna :rose: Currently working mostly on: Visual Lint :cool: Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.