Please note that this post is by no means endorsed by my employer, it is a personal reflection on a strategic move I have participated in, in my line of work as a professional software developer.
The above paragraph, which I felt I a need to write as a part of this blog post, is very aligned with the actual post topic in itself, please read on.
The place where I work have for a long time published specifications on some of the offered services. Either this was done using our CMS or using PDF artefacts from a Wordprocessor.
Both processes where tedious and held several issues:
- Content in CMS
- Hard to edit longer documents with figures and cross references
- Version control was not obvious
- Drafts compared to published documents was not used
- Wordprocesser artefacts
- Version control practically non-existing or external
- Document control based on files shares, folders and naming conventions
- Manual publication proces
There was probably several other issues I have happily forgotten, like PDF meta-data removal etc.
After having done a lot of open source work in Markdown and on Github and in conjunction with releases of some open source demo clients for our services, I proposed that we published the accompanying public specifications on Github.
This proved to be a very clever move.
It did require some consideration on our side and it was quite a new move to us. Yes we had published specifications for public availability for long a time, but putting these in a public repository was still a new move for us. But the concerns hastily evaporated and the proces became natural and incredibly productive compared to the old processes.
At the time of writing we have 6 open sourced specifications and 3 clients accompanying these and a repository with XSD files supplementing one of the specifications.
Not all of the specifications are finished, but they are out there, so if somebody wants to see what is going on, they are most welcome. We have only received a single pull-request and that is completely okay. We do not want somebody to write our specifications, that is our job, but corrections to sample code, clarifications and of course spelling corrections are most welcome.
Here are some of the pros I have observed:
- Using Git and Markdown
- Version control is built-in
- Markdown is quite powerful and easy to edit
- Syntax highlighting of code samples (bash, XML, JSON, text etc.)
- The flow resembles a development flow and the toolchain is somewhat the same
- Tagging of versions and complete history is available
- An engaging proces supporting pull-requests (oh well)
- Branching for new editions and proposals for change requests
Currently one of the specification has 4 branches, when evaluation and review is finalized, will be merged onto the master, which can be tagged as the authoritative specification – and this proces is so easy to grasp and complete since it is same proces we use for source code.
One last benefit I really enjoy, one which I think is a bit underestimated is – the contract.
When we publish a public specification, we aim at to be informative, useful, correct, exact, educational, clear and to the point.
This works quite well and since often I find that we refer to the public specifications when discussing topics related to our services and since the quality of these sometime outshine our internal specifications, I often find myself thinking that we should publish much more, much much more.
So revisiting the opening paragraf – ever so often we are afraid and publishing API’s become a side-project. Do not be afraid to publish your specifications and documentation, do not be afraid to use an existing platform and toolchain, the pros outweigh the cons and you will quickly forget all about the old way of doing things and you will find yourself more productive and in the end getting your specifications published will be easier than ever.
Whether you are publishing a website or a PDF document, the information is public, the proces is actually the most important aspects and Github and Markdown REALLY leverage this.
The discussion on how far you can go and how much you can publish is a huge topic and should perhaps be another blog post.