Google Publicly Releases Internal Developer Documentation Style Guide (betanews.com)
BrianFagioli shares a report from BetaNews: The documentation aspect of any project is very important, as it can help people to both understand it and track changes. Unfortunately, many developers aren't very interested in documentation aspect, so it often gets neglected. Luckily, if you want to maintain proper documentation and stay organized, today, Google is releasing its internal developer documentation style guide. This can quite literally guide your documentation, giving you a great starting point and keeping things consistent.
Jed Hartman, Technical Writer, Google says, "For some years now, our technical writers at Google have used an internal-only editorial style guide for most of our developer documentation. In order to better support external contributors to our open source projects, such as Kubernetes, AMP, or Dart, and to allow for more consistency across developer documentation, we're now making that style guide public. If you contribute documentation to projects like those, you now have direct access to useful guidance about voice, tone, word choice, and other style considerations. It can be useful for general issues, like reminders to use second person, present tense, active voice, and the serial comma; it can also be great for checking very specific issues, like whether to write 'app' or 'application' when you want to be consistent with the Google Developers style." You can access Google's style guide here.
Jed Hartman, Technical Writer, Google says, "For some years now, our technical writers at Google have used an internal-only editorial style guide for most of our developer documentation. In order to better support external contributors to our open source projects, such as Kubernetes, AMP, or Dart, and to allow for more consistency across developer documentation, we're now making that style guide public. If you contribute documentation to projects like those, you now have direct access to useful guidance about voice, tone, word choice, and other style considerations. It can be useful for general issues, like reminders to use second person, present tense, active voice, and the serial comma; it can also be great for checking very specific issues, like whether to write 'app' or 'application' when you want to be consistent with the Google Developers style." You can access Google's style guide here.
The documentation aspect of any project is very important, as it can help people to both understand it and track changes. Unfortunately, many developers aren't very interested in documentation aspect, so it often gets neglected.
That's putting it mildly. For any kind of engineer documentation is crucial and when you are Doing It Right actually accounts for the majority of the job. An engineer's job is to figure out a plan to solve a problem AND then to generate documentation informing/instructing other people in the clearest possible way what to do to execute that plan. The documentation actually accounts for the majority of the work in most cases and is every bit as important as the solution because if you cannot communicate your solution then it is useless. Far too many engineers do documentation really poorly, and I'm not just talking about programmers. When they can be bothered they tend to forget that the documentation isn't for themselves - it's so other people can readily understand their solution to a problem and execute that solution reliably. I receive product drawings all the time that are missing critical details, fail to convey expectations, are written in a confusing manner, or are obviously reminder notes rather than instructions. Engineering is a team sport and communication and documentation are how the team collaborates.
I've heard a lot of programmers make the claim that good code should be self documenting and while there is truth to that, most of the time it's just an excuse to blow off the humdrum work of doing proper documentation fully. Code should be clear but documentation needs to make it even more so. Expecting your solution to be obvious and complete in every detail is a false economy. You are saving your time at someone else's expense. Good engineers write good documentation. If your documentation sucks then you are bad at engineering no matter how elegant your technical solution might be.
"you now have direct access to useful guidance about voice, tone, word choice, and other style considerations"
Word choice? I'm guessing 'fucking' is ruled out then. Poor old linus excluded again.
Swear words are almost a staple of writing code as shown in this nice graph: https://www.vidarholen.net/contents/wordcount/old.html
Now we can all do just like google! It's all I've ever wanted!
What?
Strip-mine everyone's privacy and sell it off as many times as you can?
Why be merely evil when you can be so much worse!
"If you're spending more time on documentation than on design or implementation "
This is one of the problems: engineers see documentation as "something else." Documentation is part of your deliverable, not something extra that you're forced to write because some moron in another department can't figure it out.
Your documentation allows other people to (1) understand what your code was supposed to be doing, and (2) how what you were doing fits (or doesn't fit) in with the overall project's requirements, and (3) how they're supposed to use your code. That's at a minimum. Ideally it should explain why you did what you did.
Not providing documentation wastes other people's time. If you don't understand your stuff well enough to document it, you shouldn't be writing the code.
This is one of the problems: sloppy commenters like to read ideas into statements that contradict those ideas.
Creating documentation is sharply distinct from design and implementation. It requires a different skill set and attitude, although it must be done in harmony with the rest of the development effort. I did not suggest it was not important. I only pointed out that it is different, and explained why developers should spend most of their time on things besides documentation.
Something that works poorly will not work any better just because it comes with great documentation, and people tend to think that "lots of documentation" is automatically "good documentation"; see also the well-deserved comments in this thread about explanation-free Doxygen output.
BetaNews is exercising a new paradigm: aspect-oriented reporting.
Anything to promote documentation, is, in my opinion a good thing. I once documented a simple REST API - I looked for a good style guide, or even some good examples of what to document and in what detail - I really found nothing especially useful. Even finding good examples of documentation on other APIs was pretty hard.
That said, if you've ever read any Google documentation, you'll know that a lot of it is really pretty confusing. There's never a summary, it talks about lots of steps you probably should do, but not right now as you're just trying to get the thing to work and just want to learn it. In short, it's not especially productive. So in that sense, I'm not sure if this is a guide you should follow or not ;-)
I converted all my serial commas to USB long ago. If I need one I can always use a virtual serial comma.
Support Right To Repair Legislation.
"This is one of the problems: sloppy commenters like to read ideas into statements that contradict those ideas."
No.
"Creating documentation is sharply distinct from design and implementation"
Uh, no. We can agree to disagree, but documentation on your code in my company is a deliverable. Code with no associated documentation is rejected. Developers who refuse to write documentation aren't hired.
"Something that works poorly will not work any better just because it comes with great documentation"
No, but it will allow someone else to figure out how you fucked up because your thinking is wrong. It will help the next person change the code because they will understand what you were trying to do so they can take your design and run with it.
Code only tells you what, but for any code that's useful the "why" is more important than "what."
Again, I said documentation is distinct from those other things, not that it was optional. You're continuing to misread plain English. You recognize that someone might design or create a thing without documenting what they did. That means the documentation is distinct. We agree that the documentation still needs to be done.
Moreover, what they are publishing is merely a style guide, and has nothing to with the fact that “many developers aren’t very interested in documentation aspect”. It is only useful to make the documentation from third-party contributors look like the one that Google have written themselves. It won’t help with the technical quality of anyone’s else documentation.
Are you sure? https://developers.google.com/...
It's official. Google published it and they are always right. Spaces are better than tabs! :P
We'll make great pets
In fact, does anybody have user documentation any more? At least, any that's slightly useful?
It's a pretty sad state of affairs when a style guide aimed at adults has to include direction on correct punctuation. Is the standard of written English that low at Google? I suppose it could be aimed at non-English users but even so...
I had a dream, bright and carefree, but now there's doubt and gravity
As a layman programmer, I find it easier to write good code than to write good unit tests than to write good documentation.
Dropping article. Annoys shit out of me.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
It really depends what you mean by self-documenting. If you limit it to documenting what or how, it absolutely is. However, when you consider the more important why factor, you're right, that documentation also needs to exist; sometimes even more important is who and when, and you should be thankful if you find yourself still able to disagree with that.
APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
Please stop wasting pixels with this gibberish.
I usually start creating good documentation the moment my project manager is not pushing for other features to be implemented and tested ASAP because time and money and project budget and delivery!!!
Which is about 10% of the time.
another thing is sometimes the "other" person is you down the road
SlashDot Mini Poll:
Number of times y'all as a programmer has said "what was i drinking/smoking when i did this?"
The grammar nazis take over and Google spends all their time making sure 'that' is the correct place . .
Actual example you may want to read https://developers.google.com/...
The API picker lists the most common things you may want to do. (Bad)
The API picker lists the most common things that you may want to do.(Good)
College Humor video , Grammar is very important to Google https://www.youtube.com/watch?...
The bigger issue is just getting developers to write documentation in the first place. That's a situation that's gotten even worse with the rise of "agile" methodologies.
Creating documentation is sharply distinct from design and implementation.
I couldn't disagree more. Creating documentation is part of design and implementation, not something distinct from it.
I start creating documentation the moment that I'm being given specifications for the project. I call them "notes", but they're also critical documentation that is as important to the project as source code.
Don't take it up with me, take it up with your dictionary.
Especially in the software world, there is the notion that everything that is not programming is documentation. What is not recognised is that a whole lot of this documentation is plans: requirements are a plan, for testing you need a plan, architecture is a plan. Meeting notes and reports act as version control information on the plans, to record on how the plans changed, on what the ideas are behind the plans. Design of electric and electronic circuits, mechanical engineering, building all needs plans. Consider that in software engineering a real part of so called documentation are actually plans needed to provide a overview of what needs to be implemented.