Java Reference
In-Depth Information
If the editors in an environment are mixed, save code with a no-tabs
option. Most editors can save code with or without tabs. Some even con-
vert tabs to spaces in real time, as they are typed.
These small sacrifices can make it much easier for teams to interact. They also
make it easier to include code in technical documentation or published papers,
should the need arise.
Few subjects can invoke passion in a programmer like the choice of editor. I
mention them here not to state a preference, but to point out the role of the
editor in good programming hygiene and readability. I've used everything
from Emacs to Notepad. You can easily enforce many of the standards
described in this chapter by using a good editor. If you don't already have a
favorite, here are some factors to consider:
Some development environments have built-in editors. In some cases,
having a built-in editor is not as restrictive as it might otherwise seem,
because the environment helps to manage such tasks as search and
replace, class browsing, and hotlinking to related methods or classes.
Better editors can enforce standards such as brace placement and inden-
tation, usually with configuration files or parameters.
An editor should give clues about the structure of a program. Colors,
fonts, or other visual clues should make clear any comments, strings,
variables, or keywords. An editor should also help identify matching
braces or parentheses.
The handling of tabs and spaces is important.
The editor should be well integrated with the development environ-
ment. Useful features are the linking of a compiler error report with a
line of code, the launching of compilation from within the environ-
ment, and syntax checking.
My choice of development environment, VisualAge for Java, doesn't have a
pluggable editor, and many see that as a critical flaw. The editor in VisualAge
is also not nearly as robust or configurable as the best programming editors.
In future releases, it is my hope that this and other development environments
will open up as interfaces between key components of the environment are
exposed and formalized.
Search WWH ::

Custom Search