I have a few code files that are rather large in length. The one I have open right now is approaching 750 lines and is growing quickly. I'd rather not split the class among multiple files, doing that just makes me nuts (even when VS puts the control declarations in the separate file makes me nuts, I wish I could turn that off), having to move between tabs to compare code (yeah I know you can split the screen but that makes me even crazier).
I was wondering if anyone had any tricks to make it easier to find methods or regions in the code file without searching forever. Either colour schemes or anything!
I'm one of those code writers that people seem to hate looking through my source, just because I LOVE space. I always put my brackets on a line of their own, my "get set"s used to take 8 lines, now they just take 4, but that's still a lot for some people.
I also had a bad experience once of reviewing code that I had written back in 2008-2009 and practically documented nothing, except for obvious things, and even then the comments were useless, like before a confirmation message box I'd put "Make sure the user isn't an idiot!"
I've gotten into the habit of documenting the purpose of methods (XML Comments) and parameters etc.. but only comment unobvious things inside my methods. But I'm worried that I'm not documenting enough, because what's obvious now, might not be later.
Anyway, are there any suggestions or ideas for:
- Easier code reading using fonts, backgrounds etc... in the code editor so when I am visually scanning a code file I know if I moved from one region to the next or something.
- What should be commented on, what should not be commented on?
- I know I asked before and it seemed that many people did the same as me, but how do you organize your methods? Alphabetically? Logical order (what logic?)? Just the order you wrote them (your nuts in my opinion if you do that)? Do you use regions? If you use regions, what do you group by and do you have subregions?
I'm just soliciting ideas and suggestions, I know there really is no "Standard" it's just whatever works for you, but when I'm working in the code files, I alphabetise my methods and organize them into regions, but obviously what I am doing doesn't work well enough so I just wanted to see what other people did.
Ideas and maybe even skeleton code files would be cool. Screen shot colour schemes would be nice too if you feel ambitious! :)
I appreciate ahead of time anyone who wants to share their tricks for working quickly in their code files.