Do developers need code samples in API documentation?

Although code samples have long been a staple in API documentation, I’m not sure users need them that much. Many developers now use AI tools that can generate the same basic code samples that are commonly provided in documentation. If these same developers pass in either the source files or reference documentation, AI tools can generate the code samples they need in the language they want, and better yet, tailored to their project and business context.

I’d Rather Be Writing Blog and API doc course

#AI #GenerativeAI #APIs #APIDocumentation #CodeSamples #Programming #SoftwareDevelopment #TechnicalWriting: "Providing code samples in documentation remains one of the most challenging aspects of API documentation. Even so, I’m optimistic about the helpfulness of AI tools to jump-start the process for tech writers. We can leverage code from test apps along with documentation, especially reference documentation, to provide starter code that engineers can then customize and adjust.

However, whether these basic code samples are helpful is another question. They might be mistaken for more valuable application code that would get into the deeper questions about how to design an application and handle the complexities of the developer’s specific business logic, along with questions about purpose, rationale, and design patterns."

https://idratherbewriting.com/ai/prompt-engineering-code-samples.html

Using AI to jump-start code samples

Stay updated with best practices for technical writers. Includes an API documentation course for technical writers and engineers learning how to document APIs. The course includes sections on what an API is, API reference documentation, OpenAPI specification and Swagger, docs-as-code publishing and workflows, conceptual topics, tutorials, API documentation jobs, and more.

I’d Rather Be Writing Blog and API doc course