Slashdot Mirror


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.

96 comments

  1. Salvation by Anonymous Coward · · Score: 0

    Now we can all do just like google! It's all I've ever wanted!

    1. Re:Salvation by Anonymous Coward · · Score: 1

      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!

    2. Re: Salvation by Anonymous Coward · · Score: 0

      Is this why there are holes in their documentation every that even PRs fix but they refuse to merge? Is this why their page on testing angular is like reading and endless scroll of BS and it's all on one page instead of subdivided by topic? Oh this must by why Google's documentation sucks!

  2. Good engineers write good documentation by sjbe · · Score: 5, Insightful

    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.

    1. Re: Good engineers write good documentation by Entrope · · Score: 1, Interesting

      If you're spending more time on documentation than on design or implementation, you're either doing safety-critical work, or you're doing it wrong. 95% of software should use design elements that are familiar to the users in a way that makes it easy to discover how to do what they want.

      There will always be uncommon tasks or unusual users such that some documentation is necessary (and that needs to be clear and effective), but end-user documentation should never be that big a chunk of the development effort. If it is, you're designing something that is too hard to use.

    2. Re:Good engineers write good documentation by Anonymous Coward · · Score: 0

      Good engineers write good documentation

      I'd opine it's more "ENGINEERS write good documentation."

      Fakers, poseurs, and the incompetent claim documentation not necessary.

    3. Re:Good engineers write good documentation by TheRaven64 · · Score: 4, Insightful

      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.

      This idea was the core of Knuth's Literate Programming model, where the code was embedded in the documentation and could be extracted and turned into something to feed into a compiler. The closest thing in widespread use is Doxygen, which is pretty poor in comparison to WEB, but a lot better than nothing.

      --
      I am TheRaven on Soylent News
    4. Re: Good engineers write good documentation by Anonymous Coward · · Score: 0

      From the style guide: "This particular guide is specifically for Google-related developer documentation, and for any other project that wants to use it."

      This is not about end-user documentation.

    5. Re:Good engineers write good documentation by Anonymous Coward · · Score: 0

      The closest thing in widespread use is Doxygen, which is pretty poor in comparison to WEB, but a lot better than nothing.

      And then you run into projects that think "documentation" autogenerated in five formats, consisting of nothing but uncommented headers fished out of the source through doxygen, is useful. Nobody could possibly need anything more, not what the code does, not what the arguments mean, not how to use it, not what it assumes and needs, not what it enables, not how it all fits together. Nope, nothing of the sort. Just the headers fed through doxygen. Arguably, that's worse than nothing.

      I'm looking at you, Keith Packard and friends. The isc bind bunch too, for that matter.

    6. Re:Good engineers write good documentation by TheRaven64 · · Score: 2

      I'm looking at you, Keith Packard and friends.

      I've often wondered how much all of the X-replacement projects are addressing actual limitations in X11 and how many are simply unable to navigate the terse and undocumented X.org code.

      --
      I am TheRaven on Soylent News
    7. Re: Good engineers write good documentation by Anonymous Coward · · Score: 0

      In that case, the original comment is even dumber than suggested, because it is idiotic to spend more time telling somebody what to do than it takes to actually do the work.

    8. Re: Good engineers write good documentation by Entrope · · Score: 1

      When you're running an open source development effort, the developers you're trying to enlist are the target "end users" of your efforts.

    9. Re: Good engineers write good documentation by Anonymous Coward · · Score: 3, Interesting

      The problem I have with documentation is that it rarely maps onto the running state of the system. Granted I look at more technical docs than user docs but every aspect of the system gets skewed by hacking, retrofitting or just plain political struggle. Today's design is tomorrow's change of leadership.

      Not even the code forms a consistent model, the tech docs don't mirror that code and the user docs look like they're talking about a different project entirely. The difference is that the code is a product and does something (sometimes) "useful".

      And that's why programmers don't like docs.

      And yes, working inside Google teaches you some things. One lesson is to look for the word "deprecated" and check timestamps on any Google Doc. Much of their technology runs on tribal knowledge because it changes daily.

    10. Re: Good engineers write good documentation by sjbe · · Score: 4, Insightful

      If you're spending more time on documentation than on design or implementation, you're either doing safety-critical work, or you're doing it wrong.

      You have that backwards and you seem confused about my point. If something is documented properly then actually implementing it will generally take a minority of the time. Design and documentation go hand in hand - one can not exist without the other. Code can be a form of documentation but the most reliable software out there spends a LOT of time on documentation that is not code. This has nothing inherently to do with safety. Most software "engineering" is in reality badly lacking in process and the results show it. I'm not talking about writing the user manual (though that's important too) but rather the actual documentation that goes with making a product.

      95% of software should use design elements that are familiar to the users in a way that makes it easy to discover how to do what they want.

      Two points. A) Not all engineering is software. Stop looking at documentation through such a narrow lens. B) You completely missed my point. I'm not talking about the design of the solution or end users. I'm talking about documentation written by engineers primarily for other engineers or other individuals tasked with carrying out the solution. Furthermore if you do want to talk about user documentation, most of that sucks too. The notion that you can do non-trivial tasks without having substantial proper documentation is just absurd. Yes good design minimizes the need for it but to pretend that you can dispense with all documentation because you have delusions that your design is so elegant it doesn't need it.

    11. Re: Good engineers write good documentation by Entrope · · Score: 1

      I stand by my comment. Look at any of the studies discussing work breakdowns in serious software engineering projects: the amount that can be fairly called documentation will be less than the amount of other design work (thinking, analysis, experimentation, etc.) plus implementation, to say nothing about requirements development or verification or the other odds and ends of a development cycle. You wrote that "doing it right" meant that documentation takes a majority of the time, and that is simply wrong.

    12. Re: Good engineers write good documentation by Gr8Apes · · Score: 1

      Depends upon what you're telling them to do. Take the Beagle 2 for instance, they didn't do enough documentation telling people what to do.

      --
      The cesspool just got a check and balance.
    13. Re:Good engineers write good documentation by Kjella · · Score: 1

      Good documentation in a well documented system is very valuable. Even a little outdated, false or misleading documentation is poison to that value because you just can't rely on it. And a few good pages in a pile of shit is almost worthless. If you're on a team with stupid, lazy or poor programmers or contractors / consultants / outsource staff that don't care much for long time maintainability or you've inherited a big codebase then most likely some or all of them has taken the easy way out. And you probably haven't got management buy-in to really enforce anything and you don't want to be the documentation nazi either.

      Computer engineering is not like any other kind of engineering that it's cool to just improvise as we go along. A colleague of mine describes our job as re-engineering the airplane while it's in the air. I don't write much documentation because I don't read much documentation, most of it is dog poop and it's usually more efficient to just dive into the code and figure out WTF it's really doing. And very often there's a long TODO-list of things that ought to be done, where I seem to make the most people happy - both users, other developers and my boss - by whack-a-mole'ing as many as possible as quickly as possible.

      Very often if you get a lot of questions about something it's because it's stupidly built and what it really needs is either a refactoring of the code or redesign of the UI or both. It's extremely rare that I end up thinking this is how it should be or has to be, they only need a better explanation of it. As in, I find the solution to 90% of the issues is to write more code or better code. Documenting a convoluted mess sometimes only makes it a documented, convoluted mess. That said, I try to cover every error path and throw useful error messages. The worst I get are things that just silently fail or corrupt or just give gibberish in return. There's enough coders who can't even do that.

      --
      Live today, because you never know what tomorrow brings
    14. Re:Good engineers write good documentation by Puff_Of_Hot_Air · · Score: 1
      There are times for documentation and times for no documentation. As so many on slashdot are fond of pointing out "Software Developers are not Engineers". Having been an engineer that changed careers 15 years back, I know that to be very true (although the implied superiority in this statement is unwarranted). Creating an API that is intended to be consumed outside of your direct team? Document that sucker.

      All that code inside, implementing that API? Waste of time. Good commenting + unit tests will be better than any word doco. In-fact, providing a little stripped to the bones demo app, implementing each api call (with a little comment around each piece), that is built as part of your project, is better than a pdf any day of the week.

      Generally though, documentation is all about who you are communicating with. Co-located team members? Waste of time. Distributed geo-location teams? Make sure the boundaries are very well documented. Selling something to be consumed externally? Document, provide examples, provide demos. Mostly it's just common sense.

    15. Re:Good engineers write good documentation by BronsCon · · Score: 1

      Very often if you get a lot of questions about something it's because it's stupidly built and what it really needs is either a refactoring of the code or redesign of the UI or both.

      And knowing how to do that often requires knowing why the application does what it does in the first place; that's something you can often only glean from documentation as whoever came up with the spec or wrote the damned thing in the first place is no longer with the company.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    16. Re: Good engineers write good documentation by Anonymous Coward · · Score: 0

      Add to that, the "agile" way is coding first and documenting only the missing pieces after that. This allows for experiments, A-B testing, ongoing user/customer inputs and even sensible scope decreases/increases. If you are using 14 days until someone sees any results, you are 13 days too late to receive useful feedback and missing valuable changes in course.

      Look at recent open source projects with online documentation autogenerated from code. It's describing a solution, but during development / testing, the solution is far from completed yet, so it is with design and architecture too.

      Of course, human beings love to overcomplicate things and spend too much time on useless features that noone actually wants or needs.. The danger is: I think it'd be cool to do this, instead of, which alternatives would be best for the end user here, here, and here? The latter requires much more thinking, prototyping and release candidate testing, but may overall result in less "work" (not necessarily in time. Deadlines are evil).

    17. Re: Good engineers write good documentation by Puff_Of_Hot_Air · · Score: 1
      I notice in a previous post you have written, that your day job is running a manufacturing plant. Well my day job is leading the technical group (development group) for the software products that you more than likely use to help you run your plant. I know what engineering is, because I used to be one, many of my friends are engineers, and my users are engineers.

      So here's the thing. I'm not going to tell you how to do your job, but I think you may be making a mistake in your assumptions here. Software development is fundamentally different from the traditional engineering with which you would be familiar. I know this because I have done both.

      If something is documented properly then actually implementing it will generally take a minority of the time.

      Completely false. I have worked in both heavy and light documentation environments. Heavy waterfall style process as well as agile. The implementation is always the longest leg.

      Code can be a form of documentation but the most reliable software out there spends a LOT of time on documentation that is not code.

      Do you count the code you use to help run your plant? If you use PLCs or SCADA, have you thought about the companies that make that software? Chances are that I know, work with, or am the person who wrote that code. The kind of process that you are familiar with that happens inside your plant does not happen with the software on which you run your software! And it's not going to be consistent across the board from the one company either. What's required for the PLC, documentation wise, is very different from what is required in the SCADA.

      The notion that you can do non-trivial tasks without having substantial proper documentation is just absurd.

      My experience would suggest otherwise, its a funny old world.

    18. Re:Good engineers write good documentation by Cesare+Ferrari · · Score: 1

      I can imagine lots of situations where what you say is correct, but i've also come across (and mainly work) in situations where this would be totally over the top, and wasted effort.

      As an example, i've written tonnes of software that is only ever used once - you know the stuff, the 'load this dataset into the database' type task which is basically a bit of scripting, takes an hour or two, is run once, and is then thrown away. It might not even make it into source control. How about those ad-hoc queries you produce to answer a management query - 'what sort of data rates have we had to deal with historically' or whatever.

      How about your bash profile? You got any documentation for it? Those helper scripts to wrap some confusing build/test cycle commands that you need?

      So I would be careful with any catch-all thinking about documentation, certainly in the software field. I've dealt with various supplied APIs from external suppliers with excellent documentation, and i'm currently working with one with horrendous documentation, and I know which i'd rather have!

    19. Re:Good engineers write good documentation by Anonymous Coward · · Score: 0

      For the latter, at least one, I gather. How many "acceleration architectures" have they come up with, only to abandon the newest crock for a newer crock, finally giving in to even worse hubris and trying their hand at a complete redesign?

      There is (or at least used to be, can't be arsed to find it right this minute) some nicely snarky comments on the Xorg "architecture" from that shop offering a commercial X windows implementation for Unix. X-the-protocol is a bit clunky, but if your implementation is positively byzantine, that's gonna sting worse.

    20. Re:Good engineers write good documentation by JohnFen · · Score: 1

      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.

      And for themselves in the future. When you have to revisit code you wrote five years ago, it is effectively no different than if someone else wrote the code.

      I've heard a lot of programmers make the claim that good code should be self documenting and while there is truth to that

      There is truth to it, but the truth is limited. Well-written code tends to be self-documenting in the local sense -- you can look at a file and understand what is being done in that file. It does not tend to be self-documenting in the big-picture sense, and is not self-documenting at all when it comes to the "why": why was this engineering decision made the way it was? What was the tradeoff here? What were the risk assumption? Etc. Those questions can become crucial to have answers to, and the answers are often opaque even in the best-written code.

      On the other hand, there is something worse than no documentation: misleading documentation.

      Good engineers write good documentation.

      This is 100% correct. If you write stellar code but terrible (or no) documentation, you are not being a good engineer. You are being a code jockey.

    21. Re: Good engineers write good documentation by JohnFen · · Score: 1

      The majority of documentation is not for the end user, it's for engineers working on the code.

    22. Re: Good engineers write good documentation by JohnFen · · Score: 1

      This allows for experiments, A-B testing, ongoing user/customer inputs and even sensible scope decreases/increases.

      You aren't recording the results of those experiments, testing, and conversations? If not, then you're wasting your time and effort doing those things at all. If so, then you're creating documentation.

    23. Re:Good engineers write good documentation by JohnFen · · Score: 1

      Computer engineering is not like any other kind of engineering that it's cool to just improvise as we go along. A colleague of mine describes our job as re-engineering the airplane while it's in the air.

      This is often the case, but not because there's anything special about software engineering as opposed to other engineering (there isn't).

      It's that way because too many software engineers have absolutely awful engineering habits, and topping the list is the documentation problem. Your colleague's comment highlights this problem -- if that's the way your job goes, then your engineering process is broken.

    24. Re:Good engineers write good documentation by JohnFen · · Score: 1

      Good commenting + unit tests will be better than any word doco.

      Perhaps we're having a language problem here. In my view, good comments (which are unbelievably rare, in my experience) and unit tests are a form of documentation.

      But neither of those are sufficient by themselves, because they're very close-up views. You also need documentation that is from a greater distance. Again, though, this doesn't have to be in form of word documents. Meeting notes, memos, email exchanges, etc. -- all of that is documentation.

    25. Re: Good engineers write good documentation by Anonymous Coward · · Score: 0

      >> I only pointed out that it is different, and explained why developers should spend most of their time on things besides documentation.

      I really think it depends on the nature of the software. If it's an API, then I think the developer should definitely be the one who invests a major fraction of their time (a third to half) writing documentation, because, in this case, the developer is the one who knows all aspects of the actual implementation, including intended uses and limitations; nobody else is as qualified.

      But, there's another reason why I think the developer should invest a major fraction of their time to writing documentation: a final check of the sanity of the software. If the developer finds it really difficult to explain how a feature should be used in plain words, then perhaps the developer will realize that the implementation is flawed (e.g., has ambiguities, lacks simplicity, or has unreasonable limitations). Some people believe that developers *using* their own software (i.e., the "eat your own dog food"/"use your own product" principle) is sufficient, because if the developer has to suffer the flaws of their work they will attempt to improve it -- and while I think this is a great and necessary practice, I think that only if the developer also *writes detailed documentation* will the product have a high assurance of being well-received.

      Note that the documentation delivered to users should probably generally be written by someone who has a suitable "skill set and attitude" (as you put it). Finding the best way to explain ideas with words and diagrams, based on an accurate understanding of the intellectual and emotional aspects of the intended audience, is important -- and I think many developers lack the ability or interest to excel in that task. However, I think most of the raw material for the final documentation should be created by the developer -- and the role of the final documentation writer should mostly be to refine the writing, fill in any obvious and unambiguous gaps (with supplementary explanation and diagrams), and ensure stylistic consistency with other documents and with the principles of the organization.

    26. Re: Good engineers write good documentation by Kielistic · · Score: 1

      If something is documented properly then actually implementing it will generally take a minority of the time.

      The waterfall delusion. That can just as easily lead to things taking longer and work being of poorer quality as the developer tries to mold reality to the "design".

    27. Re: Good engineers write good documentation by Anonymous Coward · · Score: 0

      I think the best software engineers write good documentation that no one needs to read.

      That has always been my goal: to write excellent documentation if people need it, but to write the program in such a way that no one does.

  3. Step one by Anonymous Coward · · Score: 0

    Step one: make sure your docs are at least a major release behind your software.

  4. "Word choice" by Anonymous Coward · · Score: 1

    "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

    1. Re:"Word choice" by Anonymous Coward · · Score: 0

      Agree

      +1

    2. Re:"Word choice" by Anonymous Coward · · Score: 0

      continued here
      http://www.vidarholen.net/contents/wordcount/

    3. Re: "Word choice" by Anonymous Coward · · Score: 0

      That's why I stick with the 2.6 kernel.

    4. Re: "Word choice" by Anonymous Coward · · Score: 0

      I don't get what it is with the word police. Diversity, voice, tone, openness, flexibility, fluffy fucking bunnies shitting rainbows.

      This is what happens when your leadership is made up of hippies. They've outgrown their roles and spend their lives painting unicorns in the sky. Where I grew up language like this got you beat up and left in a puddle of blood and teeth.

    5. Re:"Word choice" by Anonymous Coward · · Score: 0

      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/con... [vidarholen.net]

      I once had a coworker who would name global variables with coarse language, in the hope that it would discourage anyone else from messing with them.

  5. Is grey text compulsory too? by Anonymous Coward · · Score: 0

    LOL. How about grey text on a white background. Or grey text on a grey background - it's SO original! But it's the law! (Apparently, judging from just about every website and even PC programs nowadays...)
    It was Google that invented 'Material Design', which translates to 'Atrociously bad user interface design', but they are 'the law' and have to be blindly copied by so-called 'designers', apparently.

    1. Re:Is grey text compulsory too? by spacepimp · · Score: 1

      Please stop wasting pixels with this gibberish.

  6. Step two by Anonymous Coward · · Score: 0

    Step two: Give up writing halfway with a note that you got bored and you may continue "later". Now half the ToC points into limbo. Never ever update anything afterwards. Not now, not next week, not ten years down the road. (*cough* a certain popular irc client *cough*)

  7. Automated tool? by Anonymous Coward · · Score: 0

    Seems to me that this documentation document is itself so long that it would benefit from having a tool that helps 'enforce' the policy like Grammarly or something.

  8. Documentation aspect. by Anonymous Coward · · Score: 0

    >> Unfortunately, many developers aren't very interested in documentation aspect, so it often gets neglected.

    What is "documentation aspect"? Is this a compound noun? Is it ironic that a post about documentation uses a sentence that does not conform with the rules of the language in which it is written?

    1. Re:Documentation aspect. by Entrope · · Score: 1

      BetaNews is exercising a new paradigm: aspect-oriented reporting.

    2. Re: Documentation aspect. by Anonymous Coward · · Score: 0

      sniffs the author had ESL, but let go out because CI/CD.

    3. Re:Documentation aspect. by Hognoxious · · Score: 1

      Dropping article. Annoys shit out of me.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  9. Documentation is part of design and implementation by mveloso · · Score: 4, Insightful

    "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.

  10. Re:Documentation is part of design and implementat by Entrope · · Score: 1

    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.

  11. Google Documentation by coofercat · · Score: 3, Interesting

    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 ;-)

    1. Re:Google Documentation by Graydyn+Young · · Score: 1

      For a REST API these days documentation has gotten very easy due to the Open API standard. For most major frameworks you don't even need to write any sort of definitions, you just put annotations in your code. Then run it through Swagger UI (or similar) and it generates standardized, informative, and even interactive documentation. It's really beautiful.

    2. Re:Google Documentation by Anonymous Coward · · Score: 0

      I briefly read some of this style guide, and couldn't go on. They write, "Don't try to write exactly the way you speak." Huh? I don't give a crap how you write. I don't care if you call me a dumbass the whole way through. I would prefer no racial slurs, but I don't care if you start all sentences with "when I grew up in New Jersey . . .". Just have some GOOD documentation, and I won't give a crap about your style. At worst, you can always edit the style later. The substance, the ACTUAL DOCUMENTATION, is actually what we need. This styling crap is way down on the list of priorities.

  12. Serial Comma? by Comboman · · Score: 4, Funny

    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.
  13. Re:Documentation is part of design and implementat by mveloso · · Score: 5, Insightful

    "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."

  14. Re: Documentation is part of design and implementa by Entrope · · Score: 1

    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.

  15. "B-but code is self-documenting" drooled the idiot by Anonymous Coward · · Score: 0

    "Code is self-documenting"

    No, it's not.

  16. Gender-neutral language by Anonymous Coward · · Score: 0

    No section on gender-neutral language. That offends me.

    1. Re:Gender-neutral language by peppepz · · Score: 1
    2. Re: Gender-neutral language by Anonymous Coward · · Score: 0

      Just read this section. This has *zero* to do with documentation of APIs or tech stuff, and is instead a primer on the use of English.

      And, +1 to whomever said that Google product end user docs are awful. They've actually got a lot of hubris telling the world how to write docs.

      But, as they're living in the Google bubble, and have hired the smartest coders, maybe they need this as constructing an English sentence wasn't important.

    3. Re:Gender-neutral language by Anonymous Coward · · Score: 0

      "They need to work in groups. They who have vaginas."

      Wow! That does sound a lot better. Thanks Google!

  17. Bin it by Anonymous Coward · · Score: 0

    I personally wouldn't look to Google for style tips. They may be good at a number of things, but style is not one of them. Kudos to them for trying, though.

  18. Google's external documentation is awful by peppepz · · Score: 3, Insightful
    ...so I think they have very little to teach in that respect.

    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.

    1. Re:Google's external documentation is awful by Graydyn+Young · · Score: 1
      Oh, my personal favourite Android documentation is for View's onDraw method:

      void onDraw (Canvas canvas)
      Implement this to do your drawing.

      And big surprise, no mention in the style guide of updating documentation when something becomes deprecated.

    2. Re:Google's external documentation is awful by Anonymous Coward · · Score: 0

      The red flag for google should be that there are books and books on their api's, and each one sucks more than the next. I don't want to read books and books. I just want reasonable documentation on how to use these api's. wtf do I care about styling for?

  19. Spaces! by zifn4b · · Score: 1

    It's official. Google published it and they are always right. Spaces are better than tabs! :P

    --
    We'll make great pets
    1. Re:Spaces! by cdreimer · · Score: 1

      I heard that Google uses two spaces rather four spaces for Python code.

    2. Re:Spaces! by Anonymous Coward · · Score: 0

      You lying pig Christopher Dale Reimer! You told me you closed that creimer account because you loved me and wanted to take all the time needed to take care of me! I don't ever want to hear about you creimer.

      You promised that you would quit wasting time on Slashdot. You have shown me that you have closed your creimer account but today, I find out about that cdreimer account and the fact that you didn't close your creimer account but got run off by trolls instead.

      I also found posts where you talk about me and that is disgusting. You are a sneaky SOB. I wish you stay alone for another 48 years.

      signed:
      "Your girlfriend who drives a Subaru Forester that you met at the church over the week-end"

    3. Re:Spaces! by Anonymous Coward · · Score: 0

      Notice about Christopher Dale Reimer:

      I am Nancy Guerrero and I am Director of Special Education for the Santa Clara County Office of Education. We use Chris' (a.k.a. creimer,cdreimer) picture in our document because he is the hardest case we have ever had to handle:
      http://www.sccoe.org/depts/stu...

      Our artists were inspired by the low carb diet that Christopher follows scrupulously for the small lunch box and by the picture linked below for the rest. I am sure that you will notice the similarities such as the bump on the side of his chest and more:
      https://www.cdreimer.com/slash...

      Please be easy on Christopher although, I am aware that some of our staff handling Chris post joke comments here and obvoiusly, the Santa Clara County Office of Education disapprove that behavior vehemently:
      https://school.discoveryeducat...

      But it isn't Chris' fault if he is the way he is. We do the best we can do with him and he is partially integrated into society. We try to cure his abnormal need for attention but he is kind of stubborn and won't listen to anybody.

      Thank You dear users,
      -Nancy Guerrero

  20. Oh boy by Anonymous Coward · · Score: 0

    I can't wait to see what wisdom comes from the place that disallows unsigned ints!

  21. Sentence case? by Anonymous Coward · · Score: 0

    It's nice to see that the Anglophone world is moving away from Capitalizing Every Single Word. But why is the document that prescribes sentence case for document titles named "Google Developer Documentation Style Guide"?

  22. Google has documentation? by Chris+Mattern · · Score: 1

    In fact, does anybody have user documentation any more? At least, any that's slightly useful?

  23. Punctuation Usage? Really? by Oxygen99 · · Score: 1

    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
    1. Re:Punctuation Usage? Really? by cdreimer · · Score: 2

      The style guide notes that documentation will probably be read by people who speak English as a second language and/or translated into a foreign language. It make sense to simplify the usage of English to make reading and translating easier for non-English speakers. Documentation isn't literature.

    2. Re:Punctuation Usage? Really? by Anonymous Coward · · Score: 0

      You are just lying pig Christopher Dale Reimer! You told me you closed that creimer account because you loved me and wanted to take all the time needed to take care of me! I don't ever want to hear about you creimer.

      You promised that you would quit wasting time on Slashdot. You have shown me that you have closed your creimer account but today, I find out about that cdreimer account and the fact that you didn't close your creimer account but got run off by trolls instead.

      I also found posts where you talk about me and that is disgusting. You are a sneaky SOB. I wish you stay alone for another 48 years.

      signed:
      "Your girlfriend who drives a Subaru Forester that you met at the church over the week-end"

    3. Re:Punctuation Usage? Really? by Anonymous Coward · · Score: 0

      Christopher Dale Reimer:

      I am Nancy Guerrero and I am Director of Special Education for the Santa Clara County Office of Education. We use Chris' (a.k.a. creimer,cdreimer) picture in our document because he is the hardest case we have ever had to handle:
      http://www.sccoe.org/depts/stu...

      Our artists were inspired by the low carb diet that Christopher follows scrupulously for the small lunch box and by the picture linked below for the rest. I am sure that you will notice the similarities such as the bump on the side of his chest and more:
      https://www.cdreimer.com/slash...

      Please be easy on Christopher although, I am aware that some of our staff handling Chris post joke comments here and obvoiusly, the Santa Clara County Office of Education disapprove that behavior vehemently:
      https://school.discoveryeducat...

      But it isn't Chris' fault if he is the way he is. We do the best we can do with him and he is partially integrated into society. We try to cure his abnormal need for attention but he is kind of stubborn and won't listen to anybody.

      Thank You dear users,
      -Nancy Guerrero

    4. Re:Punctuation Usage? Really? by Anonymous Coward · · Score: 0

      Shut the fuck up.

  24. Re:Documentation is part of design and implementat by Anonymous Coward · · Score: 0

    The problem with the notion that documentation is inline with coding is that you create worthless documentation that way. Procedure-level isn't all that important. If your code is readable, most of the time you can see right away what it does. That kind of documentation and even more so instruction-level documentation is only necessary in particularly complex code. Often sorely missing though is design-level documentation that is up-to-date. How parts interact with each other is much more difficult to see from reading code. If you don't treat documentation as a separate task, you'll write lots of unneeded documentation and hardly any essential documentation.

  25. Documentation is hard... by cdreimer · · Score: 1

    As a layman programmer, I find it easier to write good code than to write good unit tests than to write good documentation.

    1. Re:Documentation is hard... by Anonymous Coward · · Score: 0

      I find your comment harder to read than a comment that was hard to read than a comment that was poorly written.

    2. Re:Documentation is hard... by Anonymous Coward · · Score: 0

      You are only a lying pig Christopher Dale Reimer! You told me you closed that creimer account because you loved me and wanted to take all the time needed to take care of me! I don't ever want to hear about you creimer.

      You promised that you would quit wasting time on Slashdot. You have shown me that you have closed your creimer account but today, I find out about that cdreimer account and the fact that you didn't close your creimer account but got run off by trolls instead.

      I also found posts where you talk about me and that is disgusting. You are a sneaky SOB. I wish you stay alone for another 48 years.

      signed:
      "Your girlfriend who drives a Subaru Forester that you met at the church over the week-end"

    3. Re:Documentation is hard... by Anonymous Coward · · Score: 0

      About Christopher Dale Reimer:

      I am Nancy Guerrero and I am Director of Special Education for the Santa Clara County Office of Education. We use Chris' (a.k.a. creimer,cdreimer) picture in our document because he is the hardest case we have ever had to handle:
      http://www.sccoe.org/depts/stu...

      Our artists were inspired by the low carb diet that Christopher follows scrupulously for the small lunch box and by the picture linked below for the rest. I am sure that you will notice the similarities such as the bump on the side of his chest and more:
      https://www.cdreimer.com/slash...

      Please be easy on Christopher although, I am aware that some of our staff handling Chris post joke comments here and obvoiusly, the Santa Clara County Office of Education disapprove that behavior vehemently:
      https://school.discoveryeducat...

      But it isn't Chris' fault if he is the way he is. We do the best we can do with him and he is partially integrated into society. We try to cure his abnormal need for attention but he is kind of stubborn and won't listen to anybody.

      Thank You dear users,
      -Nancy Guerrero

  26. Documentation is not needed by Anonymous Coward · · Score: 0

    Now that my company has converted to Agile Scrum, we have learned that documentation is waste. I read a lot of comments talking about "design", "implementation", and "documentation." Those are Waterful terminology and Waterful is bad! No good software was ever written that way.

    With Scrum, you don't need documentation. We demo every two weeks. If the customer says it looks good, we kick it out the door.

  27. Re:"B-but code is self-documenting" drooled the id by BronsCon · · Score: 1

    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.
  28. Re:Documentation is part of design and implementat by allcoolnameswheretak · · Score: 1

    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.

  29. Ugh, no thank you. by Anonymous Coward · · Score: 0

    Google's documentation is terrible.

    I know there are tons of fanboys who love everything Google does, but Google's documentation is simply bad. Sure, they have a lot of words, and it's formatted, but the content is virtually useless. They spend pages and pages describing basic computer science concepts, and they write something for every obscure parameter and function, but they completely omit the basic usage information that people read documentation to find!

    Try this experiment: Go read the Kubernetes documentation, and try to find a simple description of what you need to put into a YAML file in order to push a docker image to a cluster and expose it as an HTTP(S) service. You are not allowed to copy somebody else's configuration file, you have to generate it solely using the documentation.

    Go ahead, try to do it. You will fail.

    Google's documentation is written for the non-existent audience of people who are intimately familiar with how Google's internal systems work, but somehow lack a basic understanding of computer science fundamentals. It is not useful. It is simply bloviated words on a page.

  30. Re:Documentation is part of design and implementat by laurencetux · · Score: 1

    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?"

  31. Now we know why projects are abandoned by bongey · · Score: 1

    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?...

  32. The bigger issue by JohnFen · · Score: 2

    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.

    1. Re:The bigger issue by Anonymous Coward · · Score: 0

      Where I last worked the first step in our agile process was to document what it should be. Then the next sprint we made the thing. We were supposed to take a third step and revisit the documentation to ensure that it fit the implementation, though I'm not sure how well that worked out.

  33. Re:Documentation is part of design and implementat by JohnFen · · Score: 1

    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.

  34. Re:Documentation is part of design and implementat by JohnFen · · Score: 1

    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.

  35. Re:Documentation is part of design and implementat by Entrope · · Score: 1

    Don't take it up with me, take it up with your dictionary.

  36. Mistake in nomenclature by chthon · · Score: 1

    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.

  37. javadoc (etc) is NOT DOCUMENTATION by Anonymous Coward · · Score: 0

    a javadoc (or similar) dump of class methods, members, etc is NOT DOCUMENTATION and is not useful to tell you how to use something