Development Process – Should Code or Documentation Be Written First for a New File Format?

development-process

When creating a new file format for an application, you can write the code or the documentation first.

When writing the documentation first, you have a better idea of what you should implement.

However, you might need to change a lot of the documentation you have written afterwards when writing the code, because you may discover certain things aren't very efficient to implement that way.

So: When creating a new file format, what should you write first: The code or the documentation?

Best Answer

You are confusing documentation with specification.

Specification is the process (usually collaborative) through which the definition of what the format should do and how a hypothetical application should handle it, render it, or parse it.

It's a design process like the one W3C does when creating the HTML or CSS specifications way before browsers implement it.

Or course the product of this process can be understood as "documentation", but it's not the documentation of an application.

If you are creating a new file format, discuss and design the specification.

Then code the application that uses that file format ( or have others code it ).

But to create a new file format you don't have to write a single line of code. The specification may never be implemented, yet it exists as an specification.

Obviously when an specification does get implemented, it is revised and extended with the feedback of implementers.

Related Topic