> Most autogenerated code is less programmer friendly than it could 
> be, it's purpose being to be easily created rather than read and
> maintained.

I call throwing out the baby with the bathwater.  The "unreadable" code
that is being spoken of, I presume, is basically UI stuff.   IMO, UI
code has a tendency towards being difficult to follow regardless of how
it was generated.  Anyway, that's only one type of IDE-generated code.
Probably the most useful code generation available to good editors is
code completion, and it's a big time and frustration saver, especially
for new programmers.  Beyond that, some examples of fully readable code
generation are File templates and Macros (Live templates in IDEA
parlance).

As an example, when I want to right a debug statement, I simply type:

        debug

and hit 'tab'.  IntelliJ then writes the following:

        if (log.isDebugEnabled()) {
                log.debug();
        }

I then type my log statement and hit enter.  Much faster than typing the
whole thing out or even cutting and pasting.

Here's the IntelliJ Live template if anyone is interested:

    if (log.isDebugEnabled()) {
        log.debug($VAR$);
    }$END$


That's one, overly simple, example of very readable IDE-generated code.

Just to finish this post, the biggest mistake I see being made wrt IDE's
is to become completely dependent on them.  For example, it's worthwhile
to have IDE independent build processes and unit testing.


- Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to