views:

130

answers:

3

So - highly hypothetical question and more like discussion about your coding style and practice you use daily.

I will take as example: CodeGear RAD Studio 2009 (sorry to all D7 fans, but Unicode rulles ).

I have capability to expand/collapse functions/procedures/records and few other complex data structures, but what if code is lengthy?

What makes the task and its acomplishment efficient - the time required to add comments ( its req actually ) and expand/collapse necessary area or use OMT offered possibilities?

To give example input from myself - I have small app, about 1,5k lines and I do not use Modeling. Is it smart enough or do I lose a lot of time if I need to find some simple references or (event) calls?

P.S. Good morining for those @ ~ GTM .. GTM + 4 living ...

+1  A: 

If I understand your question correctly, you want to know what is more efficient:

  1. Use comments and expandable sections.
  2. Use moddeling techniques.

I think it depends on personal style. Modeling can be great, but has dangers of spending too much time creating nice pictures.

We have a large app 500k+ lines. We do not use collapsable sections because we keep our file size acceptable and we have a good file organisation structure. We sometimes use modeling if complex parts are added (class diagrams and state diagrams). And we use lots of comment to explain difficult parts.

Gamecat
Yes, u got the idea. Ok, thanks for your info ;)Anbody else, please?!
HX_unbanned
+3  A: 

If I understand your question correctly, it is a bout finding your way into code (yours or someone elses').

I use Model Maker Code Explorer for browsing through source code (and for refactoring existing code, and creating new code). At EUR 99, it is dead cheap for what it does.

It usually gives me a perfect overview of what I need, and has a nice 'search' interface as well. If I need more complex searches, I usually use the GExperts (grep) search function: it is blazingly fast, and with good naming of your identifiers, it is usually a breeze to find stuff.

Jeroen Pluimers
Hmmm, thank you very much for your info, mate! The prob is that I have not official emplojee for now, so 99 euro is reasonable money ... :)But - I will check your links for sure!
HX_unbanned
I second on Model Maker and GExpert. Although I still use the command line grep.
Gamecat
+1  A: 

If you have Delphi 2009 you can use also the Delphi Class Explorer (in the View menu) in order to see your classes. It seems a little bit cryptic but only for the first 5 minutes. After this you will get used with it.

Also you can use CnPack a very impressive package in order to help you manage your project. Basically, in the IDE appears a new menu called 'CnPack' which has a bunch of wizards to help you find the way out in the source. Some examples:

  • Uses Cleaner
  • Procedure List (it gives you the incremental search capability for your procedures - very neat)
  • Bookmark Browser

etc.