Old code challenge - Today's longest function
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
bryce wrote: I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long anyone beat that ? :wtf: And I thought our code was bad! The best I can manage so far today (it's still only 8am here...) is 881 lines
Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
you can't really measure a function since you can include all your code inline in the main() function so you can't really say how much a function has lines + diff people have diff. styles like:
int add(int i, int j) { return i + j; }
ORint add(int i, int j) { int temp = 0; temp = i + j; return temp; }
see the first function does everything that the second one does but has 3x's less lines... see what i mean?:-D IM PROUD TO BE A GMAIL; -
you can't really measure a function since you can include all your code inline in the main() function so you can't really say how much a function has lines + diff people have diff. styles like:
int add(int i, int j) { return i + j; }
ORint add(int i, int j) { int temp = 0; temp = i + j; return temp; }
see the first function does everything that the second one does but has 3x's less lines... see what i mean?:-D IM PROUD TO BE A GMAIL;lets see function start void Optimize() //line 100 in the editor function closing brace "}" found on line 1809 pretty straight forward maths to me its only a bit of fun anyway Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
lets see function start void Optimize() //line 100 in the editor function closing brace "}" found on line 1809 pretty straight forward maths to me its only a bit of fun anyway Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
read my last post again anyways, it must be a pain to debug or 'optimize' your function lol ;P IM PROUD TO BE A GMAIL;
:rolleyes: yeah i'm not going to even bother ;) madness, total madess Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
:rolleyes: yeah i'm not going to even bother ;) madness, total madess Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
oh well in good spirit i checked out one of my functions and one of them has a little bit over 10 lines, i converted to .net :rolleyes:, but i remember i used to do graphics programming alot with dx and c++, ( not managed) and i had one function, still have it, that it initializes the mode, sorry, off topic anyways it had about 200 lines, still looking for other functions, i know i had longer ones ;P, damn now im addicted:-D IM PROUD TO BE A GMAIL;
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
read my last post again anyways, it must be a pain to debug or 'optimize' your function lol ;P IM PROUD TO BE A GMAIL;
-
Heh I got one here thats 14819 lines its written in C for an embedded system can you believe and is absolutely full of #ifdefs which makes it a nightmare to try and understand
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
Wow - I was recently asked to work on some code and the first thing I insisted on was the right to refactor an 800 line function before adding to it. 1709 has got to be some sort of record. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
stop being cheeky lauren ;) Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
Wow - I was recently asked to work on some code and the first thing I insisted on was the right to refactor an 800 line function before adding to it. 1709 has got to be some sort of record. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
i can post if if you like, but i think paul has a bigger one with his post ;) Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
stop being cheeky lauren ;) Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
i can post if if you like, but i think paul has a bigger one with his post ;) Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
I probably do, but finding it may be difficult. I will have to find a function analyzer to see.... I've only got a decade's worth of code in one project. A header function documentation extraction (similar to doxygen) overran a 4 inch binder last year. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? uhhh... If I remove the header comment from DrawCallback() it is 1710 lines, it is the most important function I am currently using too. (and has 2 gotos) X| It calls another function (yes it actually calls functions too) that is 786 lines long. (and it has 3 gotos) X| Networking thread is 1386 lines AppProcessing has to have been rewritten (I just don't remember doing it) as it is a measly 732 lines long. (and neither have gotos) that's from a quick 3 minute perusal. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
May I check back tomorrow @ work? I have a few (!) files containing basically gargantous switch statements of copypasted code. I know that for one, the whole file is >3.5K lines. Duno the actual funciton though.
we are here to help each other get through this thing, whatever it is Vonnegut jr.
boost your code || Fold With Us! || sighist | doxygen -
The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
Publitor, making Pubmed easy. http://www.sohocode.com/publitorOur kids book :The Snot Goblin
:wtf: I have this strange urge to indulge in a bit of knife throwing practice when I see code like that!! ;) Anna :rose: Riverblade Ltd - Software Consultancy Services 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.