Skip to main content
added 106 characters in body; added 104 characters in body; added 164 characters in body
Source Link
Joonas Pulakka
  • 23.6k
  • 9
  • 67
  • 93

Code generated by a generator should never be maintained by hand. If it needs to be changed, then the generator and/or its settings must be tweaked and run again. Considering that, it doesn't matter if the resulting code is incomprehensible and undocumented as long as the generation mechanism itself is crystal clear. (Be sure to document the fact that the code is generated, and where the generator is and how it works.)

Analogy: while my computer's processor is always executing machine code, I don't need to know anything about it as long as I know how to create that machine code using high-level language and compiler. I've heard that GCC sometimes produces subpar machine code, but who cares, as long as it works perfectly. Database abstraction layers produce SQL to operate with the DB engine, but who cares what that SQL looks like, as long as the abstraction layer is clear and works?

When properly used, code generators can definitely save not only creation, but also maintenance cost.

Code generated by a generator should never be maintained by hand. If it needs to be changed, then the generator and/or its settings must be tweaked and run again. Considering that, it doesn't matter if the resulting code is incomprehensible and undocumented as long as the generation mechanism itself is crystal clear.

Analogy: while my computer's processor is always executing machine code, I don't need to know anything about it as long as I know how to create that machine code using high-level language and compiler.

When properly used, code generators can definitely save not only creation, but also maintenance cost.

Code generated by a generator should never be maintained by hand. If it needs to be changed, then the generator and/or its settings must be tweaked and run again. Considering that, it doesn't matter if the resulting code is incomprehensible and undocumented as long as the generation mechanism itself is crystal clear. (Be sure to document the fact that the code is generated, and where the generator is and how it works.)

Analogy: while my computer's processor is always executing machine code, I don't need to know anything about it as long as I know how to create that machine code using high-level language and compiler. I've heard that GCC sometimes produces subpar machine code, but who cares, as long as it works perfectly. Database abstraction layers produce SQL to operate with the DB engine, but who cares what that SQL looks like, as long as the abstraction layer is clear and works?

When properly used, code generators can definitely save not only creation, but also maintenance cost.

added 17 characters in body; deleted 1 characters in body; deleted 6 characters in body
Source Link
Joonas Pulakka
  • 23.6k
  • 9
  • 67
  • 93

Code generated by a generator should never be maintained by hand. If it needs to be changed, then the generator and/or its settings must be tweaked and run again. Considering that, it doesn't matter if the resulting code is incomprehensible and undocumented as long as the generation mechanism itself is crystal clear.

Analogy: while themy computer's processor is always executing machine code, I don't need to understandknow anything about it, as long as I know how to create that machine code using high-level language and compiler.

When properly used, code generators can definitely save not only creation, but also maintenance cost.

Code generated by a generator should never be maintained by hand. If it needs to be changed, then the generator and/or its settings must be tweaked and run again. Considering that, it doesn't matter if the resulting code is incomprehensible and undocumented as long as the generation mechanism itself is crystal clear.

Analogy: while the processor is executing machine code, I don't need to understand anything about it, as long as I know how to create that machine code using high-level language and compiler.

When properly used, code generators can definitely save not only creation, but also maintenance cost.

Code generated by a generator should never be maintained by hand. If it needs to be changed, then the generator and/or its settings must be tweaked and run again. Considering that, it doesn't matter if the resulting code is incomprehensible and undocumented as long as the generation mechanism itself is crystal clear.

Analogy: while my computer's processor is always executing machine code, I don't need to know anything about it as long as I know how to create that machine code using high-level language and compiler.

When properly used, code generators can definitely save not only creation, but also maintenance cost.

Source Link
Joonas Pulakka
  • 23.6k
  • 9
  • 67
  • 93

Code generated by a generator should never be maintained by hand. If it needs to be changed, then the generator and/or its settings must be tweaked and run again. Considering that, it doesn't matter if the resulting code is incomprehensible and undocumented as long as the generation mechanism itself is crystal clear.

Analogy: while the processor is executing machine code, I don't need to understand anything about it, as long as I know how to create that machine code using high-level language and compiler.

When properly used, code generators can definitely save not only creation, but also maintenance cost.