Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Article: Why Code Readability Matters

  1. #21
    I don't know what "region definitions" are. Do you mean to use your home language (Spanish, French, German...) or what?
    No signature provided yet.

  2. #22
    Quote Originally Posted by Ñuño Martínez View Post
    I don't know what "region definitions" are. Do you mean to use your home language (Spanish, French, German...) or what?
    No Ñuño we are talking about this:
    http://docwiki.embarcadero.com/RADSt...kyo/en/Regions
    http://wiki.freepascal.org/IDE_Windo...7B.25Region.7D

  3. #23
    Oooh! I see. Thanks for the tips, SilverWarrior.

    I think I never used code folding. I know it exists but I never feel like I needed it. I'm not saying it isn't useful.
    No signature provided yet.

  4. #24
    Quote Originally Posted by Ñuño Martínez View Post
    I think I never used code folding. I know it exists but I never feel like I needed it. I'm not saying it isn't useful.
    Well if you use code folding features that Delphi offers you by default it basically boils down to just folding of type definitions, method implementations, and entire unit sections (uses section, interface section, implementation section, var and constant sections, etc.) you probably won't see many benefits. In fact in certain cases it might even hurt. For instance if you fold a method in implementation section it beings to look just like forward method declaration and could thus cause confusion since the only clue that code was folded is that minus sign at the beginning of the line. Some other coding tools at leas also add a vertical line to the line where code was folded to give more clear information that the code was folded.
    But if you start using regions and thus add yourself more code folding points you will learn that it could actually be useful in certain scenarios. Especially if you have a tendency of writing long method or what I call "a mile long nested if clauses". In such cases code folding can come very useful.
    In fact when I used code folding for the first time (with the help of regions) was to get heads and tails of some badly written code that I found on internet.

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •