Source code formatting and regions
-
Don't get me wrong :) I'm a big fan of the Linq. It works really well in my front end. But the performance penalty became very clear after i started to write my calculation program, which basically processes all the information in the database and writes the output to 3 or 4 tables. Currently it runs for 6 to 7 minutes with less input than some of our clients will supply it with in 5 minutes of usage :suss:
Harvey Saayman - South Africa Software Developer .Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111 -
Hi: Do you do source code formatting and/or arranging? What about regions, do you think they are good or evil? Why? I'm afraid I'm a bit of an obsessive compulsive as far as source code is concerned, I have my predefined regions and my code must comply with the Microsoft Style Guidelines, which makes programming quite a task! What tools are available to help me on my personal quest for formatting and arranging? Does anyone have more information (apart from whats available on the web site) on how to use NArrange? Regards, Martin.
Yes. Actually I only use regions in code that I intend to publish here, in an attempt to assist the reader. They have no affect when I'm writing code in Edit.
-
Sometimes, you cannot help but have your classes become rather lengthy, Regions are a boon then. Of course, like guns, they can be used for both good and evil.
Mustafa Ismail Mustafa wrote:
Sometimes, you cannot help but have your classes become rather lengthy
Why? Seriously, a long class is a strong indication of a sub-optimal design. if you design with the Single Responsibility Principle[^] in mind you will find that long classes tend not to occur in the first place!
Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"