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?