Yesterday I was exploring the new Android SMS Retriever API, since it seemed to promise to make the user's phone verification a much more straight-forward and also permission-less process.
Soon I got disappointed since it requires to use a paid third-party service such as Twilio...
But at least I got to see something unusual, not everyday one comes across a code syntax error in an official Google documentation.
Can you spot it? (at the end of the second code snippet).
According to the footnote, the last update of that page was on July 7th, so two months and a week ago.
So have I been the first one to notice this? Or maybe just the first one to raise the voice about it? I have also been nice enough to report it to Google.
I came across the above tweet which announces this API to the world, it includes a link to the docs and as you can see, 118 people re-tweeted it and 190 liked it...
Did any of this people bother to open the link and have a look to the docs?
And I guess fire up Android Studio to play a little with the API is way too much to ask... I am starting to think that there is a significant proportion of posers among the so-called Android devs...
Anyway, as I said at the beginning, everybody makes mistakes, and actually this is a small one, and it is so obvious that I do not think it would block anyone trying to use the API for the first time.
But I think API docs with few code snippets are not enough to engage devs.
I do not understand why Google (or any other company trying to seduce a community of devs to use their tools) does not make available the source code (through Github ideally) of an example/PoC simple app which uses and highlights the main features of the new API.
IMHO, this should be done for every non-trivial API.
To see complete and working code helps a lot.
This is actually what I did myself in a previous post.
If you are given the complete example code, you can compile it locally, you can run the unit tests and also some use cases.
All of this is incredibly valuable and saves a lot of time to the users-to-be of the API.
Tools
Probably Google uses their own internal tool to write and publish their documentation (some kind of customized and more advance Google Docs).
I use Confluence and I am quite happy with it, you can tell is by Altassian, I really like their products, they seem to be made by developers for developers, not like many other corporate tools (SharePoint or ServiceNow, just to name a couple).
In Confluence you can insert a properly-formatted snippets of code, however, it would be nice if you could actually select the programming language of the snippet (e.g., Java or C/C#, etc...), so the editor would perform a basic code syntax check.
Actually, the technology behind it is not new, the Web IDEs used in most coding challenge sites such as Codility do that and much more.
But until some doc-writing tool provides that functionality or someone invents the "unit tests for docs", I guess we will keep seeing these type of errors in documentation from time to time.
Soon I got disappointed since it requires to use a paid third-party service such as Twilio...
But at least I got to see something unusual, not everyday one comes across a code syntax error in an official Google documentation.
Can you spot it? (at the end of the second code snippet).
According to the footnote, the last update of that page was on July 7th, so two months and a week ago.
So have I been the first one to notice this? Or maybe just the first one to raise the voice about it? I have also been nice enough to report it to Google.
I came across the above tweet which announces this API to the world, it includes a link to the docs and as you can see, 118 people re-tweeted it and 190 liked it...
Did any of this people bother to open the link and have a look to the docs?
And I guess fire up Android Studio to play a little with the API is way too much to ask... I am starting to think that there is a significant proportion of posers among the so-called Android devs...
Anyway, as I said at the beginning, everybody makes mistakes, and actually this is a small one, and it is so obvious that I do not think it would block anyone trying to use the API for the first time.
But I think API docs with few code snippets are not enough to engage devs.
I do not understand why Google (or any other company trying to seduce a community of devs to use their tools) does not make available the source code (through Github ideally) of an example/PoC simple app which uses and highlights the main features of the new API.
IMHO, this should be done for every non-trivial API.
To see complete and working code helps a lot.
This is actually what I did myself in a previous post.
If you are given the complete example code, you can compile it locally, you can run the unit tests and also some use cases.
All of this is incredibly valuable and saves a lot of time to the users-to-be of the API.
Tools
Probably Google uses their own internal tool to write and publish their documentation (some kind of customized and more advance Google Docs).
I use Confluence and I am quite happy with it, you can tell is by Altassian, I really like their products, they seem to be made by developers for developers, not like many other corporate tools (SharePoint or ServiceNow, just to name a couple).
In Confluence you can insert a properly-formatted snippets of code, however, it would be nice if you could actually select the programming language of the snippet (e.g., Java or C/C#, etc...), so the editor would perform a basic code syntax check.
Actually, the technology behind it is not new, the Web IDEs used in most coding challenge sites such as Codility do that and much more.
But until some doc-writing tool provides that functionality or someone invents the "unit tests for docs", I guess we will keep seeing these type of errors in documentation from time to time.
Comments
Post a Comment