Limit of Programming
-
i wonder if there's a Daily WTF article in it...
definitely .. its kinda reading the software of someone that is afraid of functions, I remember once reading DBaseII code that was one function with 6000 lines in it ...
Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch
-
So, today I managed to reach there ;P This[^] is what I am talking about. I reached this milestone today and am advised by the Microsoft guy to break my module into further smaller modules to avoid getting this problem again. Being at a late stage of a release, I simply can't do it. Thanks to another guy who advised another workaround related to 'String Pooling' due to which I am back on track. But I was just wondering if 65K limit is enough for big commercial apps.
"Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"
Aamir Butt wrote:
ut I was just wondering if 65K limit is enough for big commercial apps.
65K. What the hell are you writing! I hesitate to say bad design without knowing what problem your application was built to solve, but it sounds very badly designed to me.
Michael CP Blog [^] Development Blog [^]
-
definitely .. its kinda reading the software of someone that is afraid of functions, I remember once reading DBaseII code that was one function with 6000 lines in it ...
Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch
i've seen SQL stored-procs with 6000 lines. i completely refused to work on that part of the application.
-
i've seen SQL stored-procs with 6000 lines. i completely refused to work on that part of the application.
must have made you popular at work ...
Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch
-
"The limit for the number of fields in a class on the CLR is 65536." I'm sorry, I don't think I'll ever hit that limit.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
So, today I managed to reach there ;P This[^] is what I am talking about. I reached this milestone today and am advised by the Microsoft guy to break my module into further smaller modules to avoid getting this problem again. Being at a late stage of a release, I simply can't do it. Thanks to another guy who advised another workaround related to 'String Pooling' due to which I am back on track. But I was just wondering if 65K limit is enough for big commercial apps.
"Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"
65 thousand some globals? Dear Lord.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: And in this corner, the Party of Allah The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
So, today I managed to reach there ;P This[^] is what I am talking about. I reached this milestone today and am advised by the Microsoft guy to break my module into further smaller modules to avoid getting this problem again. Being at a late stage of a release, I simply can't do it. Thanks to another guy who advised another workaround related to 'String Pooling' due to which I am back on track. But I was just wondering if 65K limit is enough for big commercial apps.
"Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"
Aamir Butt wrote:
But I was just wondering if 65K limit is enough for big commercial apps.
What does your application do? I have never run into this issue, and I push the memory limit to 1.8+gb, I push every limit I possibly can, but I guess I never pushed that one. Yes you should break your module into further smaller modules, not just because of some microsoft limit. 1) Efficiency. Chances are if you have modules that large, you are brute-forcing the machine. I have been accused of the same, and sometimes it is true. I did brute-force one map, I am currently rewriting it to be about 50 times more efficient. 2) Cache use. I guess this goes into efficiency, but you are talking about efficiency related to specific application of hardware. Instruction and memory cache operations will increase your speed two-fold, if you aren't breaking your functions at least to fit into the caches then you are your applications' own worst enemies. 3) maintenance. Other people would put this first, and there is a good reason to do so. If you want your application to last, you want to write it to last multiple releases. You will do rewrites, or at least you better if you want it to last multiple major releases, but you want to at least write something solid enough that you can make modifications: bug fixes and improvements. If your goal is to write code that will never be changed, ever, you're in the wrong business.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
must have made you popular at work ...
Regards Ray "Je Suis Mort De Rire" Blogging @ Keratoconus Watch
i'm pretty sure it had no effect
-
So, today I managed to reach there ;P This[^] is what I am talking about. I reached this milestone today and am advised by the Microsoft guy to break my module into further smaller modules to avoid getting this problem again. Being at a late stage of a release, I simply can't do it. Thanks to another guy who advised another workaround related to 'String Pooling' due to which I am back on track. But I was just wondering if 65K limit is enough for big commercial apps.
"Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"
Aamir Butt wrote:
But I was just wondering if 65K limit is enough for big commercial apps.
Dude. Yes. Oh god yes. In fact, the limit should be a lot less than that to stop people getting anywhere near that level of insanity. There is *no* way you can mantain it with 65536 members. p.s. I don't envy your job :)
regards, Paul Watson Ireland FeedHenry needs you
eh, stop bugging me about it, give it a couple of days, see what happens.
-
i've seen SQL stored-procs with 6000 lines. i completely refused to work on that part of the application.
-
"The limit for the number of fields in a class on the CLR is 65536." I'm sorry, I don't think I'll ever hit that limit.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
It is possible to reach the limit of you are using C++\CLI and don't partition your projects correctly or use header's incorrectly. That's one of the main reasons I don't like C++\CLI: adds too much junk to the metadata.
-
So, today I managed to reach there ;P This[^] is what I am talking about. I reached this milestone today and am advised by the Microsoft guy to break my module into further smaller modules to avoid getting this problem again. Being at a late stage of a release, I simply can't do it. Thanks to another guy who advised another workaround related to 'String Pooling' due to which I am back on track. But I was just wondering if 65K limit is enough for big commercial apps.
"Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"
-
So, today I managed to reach there ;P This[^] is what I am talking about. I reached this milestone today and am advised by the Microsoft guy to break my module into further smaller modules to avoid getting this problem again. Being at a late stage of a release, I simply can't do it. Thanks to another guy who advised another workaround related to 'String Pooling' due to which I am back on track. But I was just wondering if 65K limit is enough for big commercial apps.
"Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"
-
Aamir Butt wrote:
ut I was just wondering if 65K limit is enough for big commercial apps.
65K. What the hell are you writing! I hesitate to say bad design without knowing what problem your application was built to solve, but it sounds very badly designed to me.
Michael CP Blog [^] Development Blog [^]
Michael P Butler wrote:
without knowing what problem your application was built to solve
I am curious too. I have some huge classes and large number of globals as I try to fix some design issues of the past. But my software does so many things it sometimes surprises me how bloated it is. But the core is solid which was how I survived even with some bad designs on some of the objects. That large of number of members and the application had better bring world peace!
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
Instead of throwing a run-time exception, Microsoft should have put that limit as a compile-time constraint.
Best, Jun
Jun Du wrote:
Microsoft should have put that limit as a compile-time constraint.
Which would just get abused. /globalLimit=4294967295 ;P Marc
Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer -
So, today I managed to reach there ;P This[^] is what I am talking about. I reached this milestone today and am advised by the Microsoft guy to break my module into further smaller modules to avoid getting this problem again. Being at a late stage of a release, I simply can't do it. Thanks to another guy who advised another workaround related to 'String Pooling' due to which I am back on track. But I was just wondering if 65K limit is enough for big commercial apps.
"Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"
I've worked at a company that hit a similar limit in VB6 for a medical app. Let's just say, the app was a pile of crap to begin with. No offense man, but it's time to refactor if it won't compile and/or run.
Jeremy Falcon
-
It is good to know the limit! Considering people are delivering software in gigabyte (on DVD) now, that doesn't seem to be a big number.
Best, Jun
Jun Du wrote:
Considering people are delivering software in gigabyte (on DVD) now
err... four DVD's for full distribution... five if you want the experimental voice system. I live on the edge... :->
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
So, today I managed to reach there ;P This[^] is what I am talking about. I reached this milestone today and am advised by the Microsoft guy to break my module into further smaller modules to avoid getting this problem again. Being at a late stage of a release, I simply can't do it. Thanks to another guy who advised another workaround related to 'String Pooling' due to which I am back on track. But I was just wondering if 65K limit is enough for big commercial apps.
"Some people believe football is a matter of life and death. I'm very disappointed with that attitude. I can assure you it is much, much more important than that. -- Bill Shankly"
We get this issue in our assembler crap code. A developer the other day had code that wouldn't assemble correctly because the program crossed the 64K limit. So now a 2 day fix turns into 1 week rewrite of a block of code. Really frustrating writing for old systems. [Misunderstood your problem. Mine is a memory size issue.] -- modified at 11:10 Thursday 17th August, 2006
BW
If you're not part of the solution, you're part of the precipitate.
-- Steven Wright -
65 thousand some globals? Dear Lord.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: And in this corner, the Party of Allah The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
As I read it, the globals referred to are primarily a consequence of the way the C++/CLI build process - it seems that each literal string (for example) generates such a FieldRVA entry: "The limit for the number of fields in a class on the CLR is 65536. The <Module> class is the name for the container of all global variables and functions. The VC2005 compiler generates more global names in metadata than the VC2003 release (part of this is to support initialization on managed code paths)." If I read the MSDN forum posts correctly, this issue can hit any large-ish mixed-mode assembly - even if the code does not include a single global method or piece of data! :~
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've seen SQL stored-procs with 6000 lines. i completely refused to work on that part of the application.
Chris Losinger wrote:
i've seen SQL stored-procs with 6000 lines.
:omg: Geeze, and I thought I was bad with a 50 line stored procedure :->
That's no moon, it's a space station. - Obi-wan Kenobi