Categories
Community Tips

Top Tips to Successfully Write API Documentation

Whether it be a sound system or PC, you’d expect any recently purchased tech to come with an instruction manual for setup, installation, and operation, right? Well, the same goes for APIs. If your development team builds an API, you must write API documentation to guide development teams and end-users through setup and operation.

If you need a quick refresher, an application programming interface (API) is a software intermediary that enables communication between two different pieces of software. 

API documentation is the set of instructions describing how developers can set up, integrate, and use this software to meet specific needs. It should include code samples, functional details, API call examples, and more. 

For third-party apps, 38% of developers cited documentation and sample code as the second most important characteristic of a high-quality API, preceded only by security.

Third Party APIs
Image sourced from Developer Nation

So, how do you write API documentation successfully? Here’s everything you need to know.

Who needs to write API documentation?

Traditionally, the software developers who build the API are responsible for writing API documentation. And it makes sense — the creators of the API have intricate knowledge of how the API works. However, this has its downsides.

Writing is an underrated software development skill that many developers fail to hone. Consequently, they may struggle to write clearly and concisely, leaving the API document full of technical jargon that’s difficult for non-developers to comprehend. Plus, because software developers are so busy developing the API, documentation may be rushed or left until the last minute. 

Instead of burdening developers, many businesses are turning to technical writers. 

With a background spanning both content writing and technical expertise, technical writers understand how to adapt complex technical subjects into easily understandable formats. Using the information supplied by developers, they can write clear, accessible, and engaging API documentation.

For software developers, this is a huge benefit. Rather than waste time writing lengthy documents, they can gear their focus towards API development in alignment with your wider enterprise transformation roadmap. Faster builds, better APIs, and accelerated time-to-value.

But what exactly goes into an API document? Let’s take a look.

What does API documentation include?

Of course, what you include will vary depending on the data engineering platform you use, the type of API that you’re creating, and the use case of the API. But regardless, there are several key pieces of information that every API document needs.

Examples for each API call, parameter, and response

An API document needs to show examples of every API request, response, and parameter. This enables developers to visualize how the API works and understand how to interact with it.

Code samples for popular languages

Code samples give developers a headstart when they’re first using your API. They can copy and paste this code, alter it to meet their specific needs, and refer back to it if they want to utilize a particular feature or remember an endpoint function.

Ideally, you should  add code samples for every language that your API supports. At minimum, you need to include the most popular languages – the top three to date being JavaScript, Java, and Python.

Programming Languages in Q1 2023

Image sourced from Developer Nation

Details of API requests with error message samples

APIs should be configured to display error messages as needed. Your API documentation therefore must include examples of the different types of error messages, alongside an explanation of what they mean and how to resolve the issue.

Top tips to successfully write API documentation

How do you write API documentation that’s accessible to junior and senior developers alike? Here are some of our top tips.

Maintain a consistent style and tone

All good pieces of writing — from novels to technical documents — must maintain a consistent, coherent style and tone. Why? Because if your style and tone are all over the place, readers won’t trust you. They might question your credibility and authority, or become confused and disengaged with your content.

Generally, the tone of API documentation needs to align with its purpose — to inform and educate the reader. So, the tone should be factual and relatively formal to establish authority and credibility. That said, don’t overdo it. A laid-back, approachable tone helps you build a relationship with your reader and provides clarity to your communications.

Remember, consistency is key. Identify your style and tone and aim to maintain it throughout your documentation.

Prioritize clarity over technical jargon

API documentation should be the first point of call for end-user queries. Users should be able to refer to it before they get into contact with your IT helpdesk team or virtual agents. (What is a virtual agent? It’s software that provides an interactive, automated service to end users who have questions relating to your product). 

For this reason, API documentation needs to be clear and accessible for both beginner coders and seasoned developers. 

Prioritize simple, plain language over technical jargon. Avoid fluffy, long-winded descriptions in favor of to-the-point explanations. And use short, easily digestible sentences to improve document clarity.

Organize content with clear headings

Another way to improve clarity is to organize your content with clear headings. Readers should be able to quickly jump to the section of the document that they need without having to trawl through mountains of text.

hands on keyboard

The easier it is for users to navigate your document, the faster they get the answers to their questions – and the more likely they are to continue using your API.

Offer step-by-step guides for a quick start

Quickstart guides teach users how to use your API straight away by providing step-by-step instructions for common scenarios and functions. 

Start by identifying the most common use cases for the API. From there, walk users through how to use your API to complete specific tasks, providing code samples for each scenario.

Implement effective versioning strategies

The accuracy of your API documentation is heavily dependent on your versioning strategy. If you make a change without documenting it — even if it’s a minor update — your end user can experience significant issues.

Create an effective versioning strategy by implementing the following actions:

  • Automate the process using an API documentation tool that can read source code changes and update documentation in response.
  • Communicate in advance when updates are going to happen.
  • Allow for backward compatibility so that users can still use old versions of your API.
coding

Proofread and double-check for typos

While the odd typo might feel like no big deal, spelling mistakes and grammar errors can ruin the reader experience. It can make your documentation difficult to understand, resulting in misunderstandings that reduce the quality of your document. It may even turn users off your business completely.

After writing your documentation, perform a thorough proofread. As a best practice, get someone other than the person who wrote the document to do the proofreading, as even the most experienced writers can fall victim to typo blindness.

Emphasize the use of security measures

As well as communicating the security skills and measures that developers can utilize to reduce the risk of data breaches, you also need to practice what you preach. In your API documentation, assure end users that you prioritize data privacy by emphasizing security measures such as:

  • Authentication and authorization
  • Access controls
  • SSL/TLS encryptions and signatures
  • API gateways
  • Vulnerability testing
  • Regular security updates and patching
  • Activity monitoring 
  • Remote access controls — click here to learn more about implementing secure remote PC access. 

Encourage user feedback and contributions

Your API documentation shouldn’t be a static document. That is, it should be regularly maintained to ensure that it’s consistently meeting the needs of your end users. 

Encouraging users to provide feedback and contributions can help you do this. It can bring to light information in your documentation that might be missing, inaccurate, or difficult to understand.

Feedback can be collected in a variety of ways — email surveys, website forms, phone calls, and so on. But you don’t even need to ask for feedback and contributions directly.  Using AI virtual assistant technology, you can discover the sentiment around your document, identify frequently asked questions, and illuminate potential contributions. 

For example, if lots of users are contacting your virtual assistant to ask what a specific error message means, it may be that you need to tweak this section in your API document to make it clearer for your readers. Or, it might be that you’ve missed the error message completely and need to add it in. 

Overall, it’s a reliable way to gather actionable feedback without pestering end users for contributions.

In Conclusion…

If your API doesn’t come with comprehensive documentation, nobody will be able to use it to its full potential. Even if your API is created for internal use only, poor documentation can cause significant issues for developers who rely on your API to perform critical operations.

To avoid misunderstandings, confusion, and churn, write API documentation that follows the best practices laid out above. Clarity and consistency are key, as is using quickstart guides and specific examples to walk users through the common use cases for your API.

Jenna Bunnell – Director, Field & Strategic Events, Dialpad

Jenna Bunnell is the Director for Field and Strategic Events at Dialpad, an AI-incorporated cloud-hosted unified communications system that provides valuable call details for business owners and sales representatives. She is driven and passionate about communicating a brand’s design sensibility and visualizing how content can be presented in creative and comprehensive ways. Here is her LinkedIn.
Categories
Community Tips

The ABCs of Technical Writing


As developers, we have either had to write or read a technical article or documentation. What do you look for when you write/read an article? Is it the length of the article? Is the balance between theory and examples? In this blog, we will find out what makes a good article and how to write an effective one.

What is Technical Writing?

Before we dive right into tips and tricks for writing an influential article, let us understand what technical writing means and why we need it. To go by definition, technical writing is the practice of conveying complex technical information in a clear, precise, and understandable manner, often to inform, instruct, or guide an audience. Whether you are an individual developer or a professional technical writer, the goal is the same – Education.

Technical Writing Must-Haves

Now that the goal is defined, the next step is to work on actionable points to develop the concept for the article.

Here are some points that we should consider while writing the outline:

  • Clarity: Avoid jargon and overly complex language.
  • Conciseness: Avoid unnecessary filler content and get the information your readers need. Use bullet points, headings, and other formatting techniques to make content scannable.
  • Visual aids: Visuals, such as diagrams, charts, and screenshots, can help clarify complex concepts and make your documentation more engaging.
  • Accuracy: Ensure all technical information is accurate and up-to-date.
  • Consistency: Maintain terminology, formatting, and style consistency throughout your documentation.
  • Organization: Add a logical flow. Organize information in a way that guides the reader through the document effortlessly.

Tips to Write Better

Using the above must-haves, you should write an outline. Once that task is completed, writing the content is next.

Here’s some tips to make your content better:

  • Purposeful writing: Define a specific goal in mind while you start writing
  • Use of simple language: The purpose of a technical article is to explain a concept to the readers; using complex language will only push developers away. 

Things to have in your article:

-Using simple sentence structure  

-Using directives

-Breaking paragraph after every thought

  • Defining your target audience: Defining your target audience helps you decide the level of content. For example, if your target audience is beginners, it is better to write an introductory article with a simple example to follow.
  • Adding frequent checkpoints: To ensure you have your reader’s attention till the end, add checkpoints. For tutorials, you can use screenshots in between, and for leadership blogs, you can use questions/ discussions in between
  • Avoiding too many links: Adding links can help readers with more context, but you should avoid using too many. Instead, have a resources section with all the necessary links.

Using simple examples: Examples that do not require complex setups and are easy to follow

Resources

To perfect the article, we should always look up articles or docs that work well and are liked by the developer community.

Here’s a list of my favorite documentation:

  • Vercel: The developer journey in Vercel docs is very well-defined
  • Appwrite: Maintains consistency and caters to all levels of developers.
  • MongoDb: Uses the right amount of visuals and is very concise.

Categories
Community

Language Communities – An update

The choice of programming language can greatly influence the roles, projects, and general opportunities that a developer has. Languages are a classic subject of debate and represent the foundation of some of the strongest developer communities. Tracking language use is not just for developers however; languages and their communities matter to toolmakers too, as they want to ensure they provide the most useful SDKs.

It can be challenging to accurately assess how widely a programming language is used. The indices available from sources like Tiobe, Redmonk, GitHub’s Octoverse report, and Stack Overflow’s annual developer survey are great, but offer mostly relative comparisons between languages, providing no sense of the absolute size of each community.

The estimates here look at software developers using each programming language; across the globe and across all kinds of programmers. They are based on two pieces of data. First, is SlashData’s  independent estimate of the global number of software developers, which was published for the first time in 2017. SlashData estimates that, as of Q3 2023, there are 38.9 million active software developers in the world. Second, is the Developer Nation large-scale, low-bias surveys, which reach tens of thousands of developers every six months. In these surveys, SlashData has consistently asked developers about their use of programming languages across 13 areas of development. This gives a rich and reliable source of information about who uses each language and in which context.

Over the past six months, SlashData’s methodology has specifically been redesigned for estimating the overall usage of each programming language across all areas of development. This was done so, in order to correct for imbalances introduced by development areas contributing more or less than they should to the overall usage of each language. In this chapter, we have retroactively applied our more robust methodology to our historical data as well. Hence, here you are presented with updated language community estimates from the last two years using improved estimation methods. 

“JavaScript widens its community size lead”

JavaScript continues to take the top spot for programming languages for the sixth year, with roughly 22.5M active developers worldwide. The language’s dominance is unlikely to be challenged in the near future, as its continued growth in recent years has led to a lead of 5M or more developers ahead of the next closest languages, Java and Python. An important factor in its projected continued popularity – JavaScript’s large community is not dependent on any one software sector. More than half of developers across all software sectors in any capacity – either as a professional, hobbyist, or student – report using JavaScript. Even in sectors where it is not a popular language, for example, IoT devices, we still observe that one in five developers use it.

“22.5M Developers worldwide use Javascript as it continues to be the most popular programming language”

Java and Python remain close to one another in second and third place, with 17.5M and 16.8M developers, respectively. Following a gap of roughly 8M, come C++ and C#; each with around 10.3M and 10.2M developers, respectively, to round out the top five languages. On the opposite end of the spectrum, Lua (1.6M) and Ruby (2.3M) have the fewest users among the language communities we trace. In the latter half of this chapter, we examine select user trends and provide analysis of various community dynamics.

“Dart and Rust grew at an average annual rate of more than 30% in 2023”

JavaScript’s dominance appears as though it will continue as its growth over the past year has outpaced its closest competitors, Java and Python. The 10% annual growth in the number of JavaScript users is noteworthy, considering the communities’ already substantial size. It is, however, below the year-over-year growth of the global developer community as a whole – which, between Q3 2022 and Q3 2023, we estimate to be 16%.

As anticipated, we observe the most dynamism in the smaller language communities. Dart and Rust grew at a rate considerably faster than the overall developer community in the last 12 months. Dart was the fastest-growing language community in 2023. It expanded its community by roughly 33% over the past year. Its popularity is partly due to its association with the Flutter framework, which enables developers to target multiple platforms – mobile, desktop, web, and embedded – with their apps from a single codebase. While Dart is still somewhat of a “niche” community, it is currently estimated that it has just under 3M global users.

Rust, on the other hand, has enjoyed slightly more mainstream acclaim compared to Dart and over the past year has grown by just under a million users to around 3.5M. This growth amounts to a 31% increase from 12 months ago. However, with many large software companies using Rust for its safety features and performance, among other reasons, its continued future growth is all but certain. 

Finally, while the annual growth rate of Swift, 21%, is below that of Rust and Dart, the consistency it has shown in attracting new users is one of the factors that make the language community noteworthy. As we approach the 10-year anniversary of the language, its speed and ties to Apple – its creator – suggest that the in-demand language will continue to grow into the future. Swift’s growth, however, is linked to Objective-C’s stagnation as it now serves as the go-to iOS language. 

In 2022 and 2023, Objective-C’s community growth has been below that of the growth of the developer community worldwide. Hence, while Apple continues to support the language, with no updates planned from Apple’s side, we do not anticipate a growth in users in the coming years.  

Objective-C, however, was by no means the only language community that has not experienced growth in 2023. We estimate that Ruby, Lua, and C all have retained communities that are relatively consistent in size over this past year.