Hacker News new | past | comments | ask | show | jobs | submit login

I have a general system for representing metadata in source files. (I use YAML documents embedded in block comments).

Some of this metadata gives traceability information for requirements, tests etc.. while other metadata enables me to associate a maturity level with each file.

My build system understands this metadata and uses it to inform e.g. the minimum test coverage that it expects on a file-by-file basis.

The same metadata is used to ensure that all of the other components that a file references are at the same level of maturity or higher.

I also have metadata for each file (partly derived from location in the repository) that gives each file a number which defines it's position in a hierarchy of design elements.

The position in the hierarchy helps to indicate what the purpose of the file is. I use this to make a distinction between those core, foundational, stable design elements upon which other design elements may build, and those more peripheral, ephemeral and 'agile' design elements which can be quickly tailored to meet the needs of a client or partner.

This means that a (hopefully stable) core API component can be prevented from relying upon a (perhaps less stable) bespoke customer-specific component. It also means that there's more freedom in changing and adapting peripheral designs as you can have confidence that it's stability is not something that is going to be relied upon.




Thanks for the detailed description. That's a really sophisticated system with several cool features. * minimum test coverage on a file-by-file basis * various levels maturity

"It also means that there's more freedom in changing and adapting peripheral designs as you can have confidence that it's stability is not something that is going to be relied upon." That's a big advantage, indeed.

I also like the concept of storing this metadata next to the code in structured comments.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: