About

I'm Mike Pope. I live in the Seattle area. I've been a technical writer and editor for over 35 years. I'm interested in software, language, music, movies, books, motorcycles, travel, and ... well, lots of stuff.

Read more ...

Blog Search


(Supports AND)

Feed

Subscribe to the RSS feed for this blog.

See this post for info on full versus truncated feeds.

Quote

It's always been incredibly challenging for me to put pen to page, because writing, at its heart, is a solitary pursuit, designed to make people depressoids, drug addicts, misanthropes, and antisocial weirdos (see every successful writer ever except Judy Blume).

— Mindy Kaling



Navigation





<April 2025>
SMTWTFS
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Categories

  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  

Contact Me

Email me

Blog Statistics

Dates
First entry - 6/27/2003
Most recent entry - 9/4/2024

Totals
Posts - 2655
Comments - 2678
Hits - 2,734,192

Averages
Entries/day - 0.33
Comments/entry - 1.01
Hits/day - 344

Updated every 30 minutes. Last: 3:00 AM Pacific


  01:05 PM

Occasionally (or frequently, depending on the exact context in which you work), the idea will be floated that the way to do API documentation is for the actual developers to include comments in the code, and then to extract these. A number of tools exist to faciliate this, including Javadoc, Doc-o-matic, GhostDoc, and Sandcastle. (Wikipedia has a long list of such tools.)



The idea is appealing in a number of ways, among them:
  1. The developer developed the code, so they understand it best.
  2. When an API changes, it's easier to change comments in source code than to track down and update some document somewhere.
  3. That's one less technical writer you need to hire.
In my experience, tho, there's little guarantee that you'll end up with decent documentation. Here's a list of reasons why:
  • Most developers would rather code then write. This is all the more true, I think, when the writing consists of revising existing docs (comments) for an update.

  • Is it cost-effective to have developers writing documentation at coder rates? Maybe, maybe not.

  • Many developers are not strong writers, mechanically speaking -- not just spelling and grammar, but being able to articulate what it is they need to say.[1]

  • Many developers (or many that I work with, anyway) are not native speakers of English (assuming the target documentation is supposed to be in English).

  • Developers might not understand what the reader actually needs to know -- after all, it's generally obvious to the developer.

  • Developers are often focused on details like syntax or parameter definitions, not on the reasons why a piece of code exists or why the user might need to use it.

  • Developers often have a hard time grasping that the reader does not have the same knowledge that the developer does (cf The Rise and Fall of Homo Logicus).
You occasionally encounter an attitude among some developers that they have to write the docs because no technical writer could possibly understand their code. This is horse poop.

As a side issue, there's also the larger issue that API docs is to understanding a product as a dictionary is to understanding a language. Raymond Chen:
There's more to documentation than dry function descriptions, people! The function description is a reference; you go there when you already know what's going on and you just need to fine-tune a detail. The real learning happens in the overviews and articles. If you want to learn how to operate your radio, you don't read the schematic first.
I should add that I don't think that XML code comments are not useful. They can be part of the info (among many sources) that a tech writer uses to create docs. In individual instances where the various issues raised above are not issues, using developer-generated documentation for APIs (when used with additional material) will work just fine.

A final note: XML code comments can become the initial drafts that are fed into a community-supported doc effort. That can work. A limitation here, tho, is that improvements made by the community tend not to go back into the doc comments.


[1] I'll note for the record that there are many developers (I work with some) who write at least as well as anyone whose job title is "technical writer."

[categories]  

[4] |