Preferences

Yes, precisely, that's when all that cleverness will come back to bite you hard.

"Which line was that again? Oh... "

Pics up the phone, dials.

"Honey, I won't be home in time for dinner."


Yup. This is why I have a pretty hard set of rules about introducing code generation and DSL's into a team project:

0. Code generators are to be used hand-in-hand with the coding process.

1. Code generation must happen pre-build, using tooling supplied or documented thoroughly in the project repo.

2. Code generator code and its most recently generated output are checked in alongside the rest of the project.

3. "No humans allowed" inside generated code areas/files.

4. Direct and intermediate output (if applicable) from code generators must be human readable. Proper code formatting is strongly advised.

5. This does not apply to lightweight templates, generics, and other first-class language features. It _does_ apply to DSL implementations and heavyweight template designs that are not already provided by a 3rd party library. Even then, please consider the above path instead.

The above, while restrictive, flattens the project ecosystem down to human-readable and fungible parts. If the worst happens, generated code can still be hotfixed/hacked back into service, without having to fuss with generator internals.

I can guarantee that if you start looking at random, you will find the right line within the 43 guesses

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal