RE: Homesite 4.0 - CodeSweeper

by "Mario Figueiredo" <marfig(at)ebonet.net>

 Date:  Thu, 17 Dec 1998 16:16:35 -0000
 To:  <hwg-software(at)hwg.org>
 In-Reply-To:  icx
  todo: View Thread, Original
>Mario...
>
>What CodeSweeper configurations do you
>recommend to set as a defaults???

Boy! That's hard :)

It pretty much depends on each one preferences. Nevertheless I found some
tweaking that IMO makes CS more productive. But before I continue let me say
that CS intentions are only to make the code readable, not to validate or
correct it. In fact a lousy configuration of CS not only can make FP98 seem
like a programmer's paradise, but also render your code useless.

Another thing. When we choose to configure CS it opens a dialog box where we
are presented with all the options for configuration (All the work will be
done here). On the top of this dialog box there is a dropdown listbox that
enables you to choose from various templates. One of this templates it's
called appropriately "My CodeSweeper (Use for testing)". I guess we all know
what this means; i.e. Even Allaire knows how powerful this utility can be,
and since you can't undo a CS pass over your code, it's best to not change
the default template, but instead use this one for testing purposes. Once
done, you can always rename it more appropriately.

Yet another thing. All CS templates go on a folder named 'codesweepers'
inside the 'extensions' directory. This enables one to distribute CS
templates to everyone who wants them. Since Marjolein (see
http://hshelp.com/index.html) is doing a *great* job helping HomeSite users,
and since I'm on the process of creating a more IMHO useful template for CS,
I will soon apply my template to his approval and most probably make it
available on his site. No! I didn't talked with him about this yet.

Ok. Now for some tips:
- Change the TABLE tag definition so that it adds a line before the start
tag and after the end tag. The default configuration doesn't do this and
when used on spaghetti code this enables you to separate tables from the
rest of the code.
- *Do not* uncheck 'Trim white spaces between tags'. Let it be checked and
for each individual tag specify whether or not you want to trim white spaces
in 'Do not trim white spaces around this tag'. This permits not only line
breaks, but also it's the true fundamental formatting for spaghetti code.
- Do any of you remember a recent thread about XML using only lowercase
tags? Now, do you see that option that enables to choose between 'Preserve',
'All lower case' and 'All upper case' on format tag names? Isn't this
beautiful?? You can actually code XML and when wanting to modify or update
you code, run CodeSweeper for making the tag names more readable. :)
- ...

The rest come with time :)

Regards,
Mario Figueiredo

HWG: hwg-software mailing list archives, maintained by Webmasters @ IWA