Introducing Tabnine’s Onboarding Agent

Posted on March 28th, 2024

Developer efficiency is paramount in the ever-evolving landscape of software development. Every minute that developers can save in ramping up to a new project leads to increased productivity, faster delivery times, and more cost savings for the organization. 

What is the Onboarding Agent?

Today we’re thrilled to introduce the Onboarding Agent for Tabnine Chat, a new product capability that helps developers onramp to a new project faster. For developers who are new to an organization or existing developers who are new to a project, the Onboarding Agent provides a comprehensive overview of key project elements, including runnable scripts, dependencies, and overall structure to help them get up to speed effortlessly.

The Onboarding Agent is now available for all Chat users in Tabnine SaaS and is compatible with all IDEs supporting Tabnine AI coding assistant.

The problem it solves

Traditionally, onboarding to a new project has been a time-consuming and often cumbersome process. Developers face the challenge of navigating complex codebases and documentation, often needing to reach out to more experienced colleagues or consult training materials for guidance. Not only does this slow down task completion, but it places a significant burden on experienced team members who must allocate time to assist new teammates.

The Onboarding Agent addresses these challenges head-on by giving developers instant access to essential project information. By offering a high-level summary of key elements and suggesting follow-up questions, it empowers users to dive deeper into relevant details tailored to their current task.

How it works

The Onboarding Agent is seamlessly integrated into Tabnine Chat as a built-in command, allowing users to access it with a simple command (/onboarding) or when starting a new conversation. When triggered, the agent returns a concise summary of the project’s key aspects, enabling developers to quickly grasp its structure and functionalities.

However, the true magic lies in its interactive capabilities. Rather than inundating users with an avalanche of information, the Onboarding Agent acts as a knowledgeable guide, presenting essential details while offering pathways for further exploration. By suggesting follow-up questions tailored to the user’s context and the task at hand, the agent empowers developers to chart their own course through the project’s intricacies.

This adaptive approach ensures that developers can delve deeper into areas of the project that are most pertinent to their immediate objectives. Whether it’s understanding specific functionalities, unraveling complex dependencies, or grasping the project’s overarching architecture, the Onboarding Agent provides the roadmap for a targeted and efficient onboarding experience.

Benefits for developers and organizations

Tabnine’s Onboarding Agent offers tangible benefits for both developers and organizations. For developers, it accelerates the onboarding process and enables them to become productive members of a team in a fraction of the time. For organizations, the Onboarding Agent streamlines the onboarding process, minimizing the disruption caused by new team members joining or developers switching projects. By fostering a culture of efficiency and knowledge sharing, organizations can optimize their development workflows and drive greater innovation.

The Onboarding Agent is available for all Chat users in Tabnine SaaS and is compatible with all IDEs that support Tabnine Chat. Check out our Docs to learn more. 

If you’re not yet a customer, you can sign up for a free 90-day trial for Tabnine Pro.

Learn more about the Onboarding agent

Key takeaways and Tabnine FAQs from Nvidia GTC

Posted on March 27th, 2024

Last week we sponsored Nvidia GTC, joining about 30,000 developers, business leaders, and AI researchers in San Jose, CA for one of the premiere AI conferences. 

Tabnine’s booth in the Generative AI section of the exhibit hall received a steady stream of attendees who stopped by to see a demo of Tabnine in action, and to scoop up stickers, T-shirts, and custom Tabnine key caps. It was great to connect with long-time Tabnine users, as well as introduce Tabnine to developers learning about our AI tools for the first time. 

Visitors to our booth could also opt in to trade a scan of their badge for a donation to charity, with $3 going to their choice of CodeNation, the local Computer History Museum, or Women Who Code — ultimately raising $1,000 for these charities.

Among all the great conversations we had during the conference, a few questions came up repeatedly. So we thought it would be a good idea to share the most common questions, along with our answers.

Q: What’s the size of your model?

This was the first time I was asked this question, but it makes sense given the conference audience that there’d be an interest in the number of parameters in our large language model (LLM). 

Tabnine actually uses three models. The first is a CPU-optimized model consisting of 2 billion parameters that runs on the local machine for code completion. The other two models run on a Tabnine server. One model consisting of roughly 10 billion parameters provides enhanced code completion capabilities, while the other, with close to 20 billion parameters, supports Tabnine Chat. You can learn more about our models on our Code Privacy page.

In summary, the size of the model does matter, but only so much as it allows the model to be more flexible. (write McBeth as a Star Trek episode OR create an image of Julius Caesar crossing the Rubicon). When you know the data (fully permissive open source) and the use case, then the size of the model makes far less difference than the quality of the data and the security of the model. 

Q: My organization has restrictions on AI tool usage. Can Tabnine work with us?

As we say, Tabnine is the AI coding assistant that you control, and we work with companies with varying AI restrictions. We focus on three P’s: privacy, personalization, and protection. When handling compliance concerns, we focus on privacy and protection. We have a zero code retention policy that ensures your codebase remains private and is never used to train our models. Any code passed to our servers is held only in memory and deleted once a response is returned. For those requiring extra privacy, Tabnine can also be installed on-premises behind a firewall. Tabnine protects you with strict license compliance. We’ve trained our own models exclusively using permissively licensed open source repositories. You can work with our Sales team to figure out what works best for your organization. Learn more at our online Trust Center.

Q: Will Tabnine work with my IDE?

The integrated development environment (IDE) a developer chooses to work in can be a deeply personal choice and a lack of support could be a deal breaker. Tabnine works with all of the most popular IDEs. During the conference, we talked about VS Code, Visual Studio, the JetBrains family of IDEs, and even NeoVim. You can learn more about our supported IDEs in our documentation. 

Q: How much does Tabnine cost?

The Basic version of Tabnine is free and provides basic AI code completions from a local LLM. For individual developers and small teams, we recommend Tabnine Pro, which provides enhanced code completion and access to Tabnine Chat, allowing you to generate code, tests, documentation, and more. Pro includes a 90-day free trial and then it’s $12 per user per month when billed annually. 

Enterprise engineering teams get the full capability of Tabnine and can deploy anywhere for just $39 per user per month. You can learn more on our Plans & Pricing page.

Q: How does Tabnine compare with GitHub Copilot?

This was by far the most asked question all week. 

GitHub is owned by Microsoft and they’ve put a lot of effort into awareness. You’d be hard-pressed to find a developer unfamiliar with Copilot. One difference that tends to surprise people is that Tabnine predates Copilot. We released the first AI coding assistant back in 2018 and helped create the market. Aside from that, a developer might not notice the other differences because we’re so alike on the surface. The main difference between Tabnine and Copilot is our commitment to ensuring our customers’ privacy and our commitment to license compliance. 

We both help accelerate code development using a combination of code completion and AI chat. Where we differ lies in our approach. Whereas Copilot uses an OpenAI LLM, we trained our own models using only permissively licensed open source repositories because it ensures that our customers never introduce IP liabilities. We also don’t store any of your data or code, nor train our models using your codebase. Most uniquely, we give our customers the option of deploying Tabnine in their own environment (including our chat models): in secure SaaS, VPC, on-premises, or completely air-gapped deployments. We also offer our enterprise customers the option to use a private custom model trained on their codebase. If you’re part of an organization with a high focus on security and privacy, our solution was built with you in mind. We’re focused on bringing AI assistance to the entire software development life cycle while keeping our customers’ code and data private, secure, and compliant.

We look forward to answering your questions at our future events. Speaking of which: if you’re planning to attend Google Cloud Next or Atlassian Teams, look for our booth and come have an in-person chat. You can also join us for a webinar on April 18 to learn how to combine Tabnine’s code generation with CircleCI’s CI/CD automation to speed up software delivery. And as always, feel free to reach out to us on LinkedIn or X.

8 code documentation tools you must know about

Posted on March 20th, 2024

What are code documentation tools? 

Code documentation tools enable developers to generate and maintain documentation. They’re an indispensable part of the software development process, providing clear explanations of a codebase and its functionality. These tools are designed to streamline the process of documenting code, saving time, reducing errors, and enhancing the maintainability of software projects.

Good code documentation outlines what the code does, how it does it, and why it was programmed in a particular way. Documenting large codebases can be a challenging task, and code documentation tools help by standardizing and automating many parts of the process.

Key features of code documentation tools 

  • Syntax highlighting: Code documentation tools often provide syntax highlighting, which is a form of secondary notation that uses color to convey information about the code. It enhances the readability and context of the code, making it easier to understand.
    1. Automatically generating docs from comments: This feature allows developers to generate documentation from comments in their code with minimal effort. It analyzes the code and extracts information such as class definitions, variable names, function signatures, and comments, which are then organized into a structured document.
    2. Support for multiple languages: Many code documentation tools offer support for multiple programming languages. This can be useful for teams using multiple technologies and frameworks. 
  • Custom templates and themes: The aesthetics of documentation can play a significant role in its readability and comprehension. Some code documentation tools offer a variety of templates and themes that developers can use to customize the look and feel of their documentation, improving navigation and user experience.
  1. Version control integration: Most code documentation tools offer integration with popular version control systems such as Git. Version control integration allows developers to keep their documentation in sync with their code. Every time a change is made to the code, the documentation is automatically updated to reflect the change. 
  2. Generative AI: Modern generative AI systems use large language models (LLMs) to generate human-like text. It can read your code and generate understandable and useful documentation without any manual intervention. This is a game-changer in the world of code documentation.

Notable code documentation tools 

1. Tabnine

Tabnine is the AI coding assistant tailored to you and your teams, and that works within the IDEs you already use. Tabnine eliminates mundane tasks so you can focus on the things on more interesting and more valuable work.  Beyond code generation, Tabnine also helps developers by answering coding questions, explaining syntax and structure, and can even be used to teach new languages. Tabnine can automatically generate documentation for selected pieces of code, saving time for developers and improving the maintainability of the code in the future.

Tabnine integrates with your IDE. As you type in your IDE, Tabnine analyzes the code and comments, predicting the most likely next steps and offering them as suggestions for you to accept or reject.

Tabnine utilizes an LLM trained on reputable open source code with permissive licenses, StackOverflow Q&A, and even your entire codebase (Enterprise feature). This means it generates more relevant, higher quality, and more secure code than other tools on the market. 

The Tabnine in IDE Chat allows developers to communicate with a chat agent in natural language and get assistance with various coding tasks, such as:

  • Generate new code 
  • Generating unit tests 
  • Getting the most relevant answer to your code
  • Mention and reference code from your workspace
  • Explain code
  • Extending code with new functionality
  • Refactoring code
  • Documenting code

Onboarding Agent for Tabnine Chat
Tabnine Onboarding Agent helps developers onramp to a new project faster. For developers who are new to an organization or existing developers who are new to a project, the Onboarding Agent provides a comprehensive overview of key project elements, including runnable scripts, dependencies, and overall structure to help them get up to speed effortlessly.


2. Nuclino

Nuclino is a collaborative workspace that allows you to create, share, and organize code documentation with ease. 

Nuclino lets you invite your team members to collaborate on a document, and any changes they make will be immediately visible to everyone. It has an intuitive interface with a minimal learning curve. 

Source: Nuclino

Nuclino lets you create and organize your documents visually and easily link related documents together for easy navigation. Lastly, it offers a powerful full-text search function that allows developers to quickly find the information they need.

 

3. Document360

Document360 is another excellent tool for code documentation. It’s a knowledge base platform that can manage the full process of creating, managing, and sharing code documentation.

Source: Document360

Document360 provides an editor that supports Markdown, which is a straightforward and efficient way of writing code documentation. It also offers a rich text editor. All documents have a full version history, meaning you can easily track changes made to your code documentation, which is a crucial feature when you’re working with a team.

In addition, Document360 provides a robust search function, allowing developers to find the information you need. It searches both the content of your documents and their metadata.

 

4. Confluence

Confluence is a collaboration tool developed by Atlassian. It’s designed to help teams work together more efficiently and is often used for code documentation.

Source: Atlassian

Confluence is often used as part of a DevOps toolset, and integrates with other Atlassian products like JIRA, which can be a significant advantage if these tools are already part of your workflow.

Confluence also offers a wide range of templates that can help you get started with your code documentation. It also supports Wiki Markup, a text-based format that’s similar to Markdown. Another key feature is the use of labels, which can help you organize your code documentation in a way that makes sense to you.

 

5. GitBook

GitBook is a documentation tool that’s been designed with developers in mind. GitBook features a Markdown editor, which is useful for code documentation. It also supports the use of diagrams, which can be a great way to visually represent complex concepts or processes.

Source: GitBook

An important feature of GitBook is its versioning capabilities, which let you track changes made to your code documentation. It also integrates seamlessly with GitHub, GitLab, and other development tools so you can sync your documentation with your code, ensuring that they remain consistent with each other.

 

6. Apiary

Apiary is a code documentation tool that’s specifically designed for API documentation. It has a powerful editor that supports both Markdown and API Blueprint, a high-level API description language.

Source: Apiary

A unique feature of Apiary is interactive documentation. It allows you to interact with an API directly from your documentation, which can be a great way to demonstrate how your API works. Apiary also provides collaboration features — you can invite your team members to collaborate on your documentation, and their changes are immediately visible.

 

7. Scribe

Scribe makes it easy to document code by generating helpful, human-readable documentation automatically from comments in your codebase. You only need to write your comments in a specific format, and Scribe will do the rest. Scribe supports a variety of languages, including PHP, Python, and Java.

Source: Scribe

Like Apiary, Scribe lets you generate interactive documentation. Users can not only read your documentation but also try out your API directly from the generated documentation.

 

8. Read the Docs

Read the Docs is another popular choice for code documentation. This tool is particularly well-suited for teams working on open source projects, thanks to its integration with version control systems like Git, Mercurial, and Subversion.

Source: Read The Docs

Read the Docs is more than a documentation generator — it’s a complete platform that hosts your documentation, making it accessible for anyone on the internet. It also supports multiple versions of your documentation, allowing users to switch between different versions of your project effortlessly.

An important feature of Read the Docs is its support for Sphinx and reStructuredText. These tools allow you to create complex, professional-looking documentation. In addition, it supports standard Markdown format.

Automate code documentation with Tabnine

Given the challenges of traditional code documentation, recent advances in generative AI can be a big help to development teams. Tabnine is an AI coding assistant that can predict and generate code completions in real time, and can also automatically generate relevant, context-sensitive documentation. 

Large development teams can’t function effectively unless everyone commits to writing thorough documentation, the thing is most developers would rather be writing code than documenting it. Tabnine makes generating documentation easy. Simply highlight the code you want to document, and then ask Tabnine through your chat window to create documentation. With local and global context awareness enabled Tabnine will generate documentation that’s in alignment with your coding standards and formatting.

Learn more how to use Tabnine AI to analyze, create, and improve your code across every stage of development:

 

Try Tabnine for free today or contact us to learn how we can help accelerate your software development.

Tabnine Chat is now generally available

Posted on March 13th, 2024

We’re excited to announce that Tabnine Chat — our code-centric chat application that allows you to interact with Tabnine using natural language — is now generally available for all users.

Tabnine Chat complements our code completions to enable you to simplify and accelerate numerous aspects of the software development lifecycle.

It’s integrated with all the major IDEs — such as VS Code, JetBrains, Eclipse, and Visual Studio — and provides AI assistance right inside of the IDE. Whether you’re generating code snippets, writing tests, documenting your code, or debugging pesky bugs, Tabnine Chat has got your back.

Chat is built on Tabnine’s ethos and offers zero data retention: we don’t store your data or share it with third parties. It uses a proprietary LLM that’s custom-built for software development and trained on permissively licensed code. This ensures suggestions from Chat won’t match proprietary code or pose any legal risks.

From beta to brilliance

Tabnine Chat has undergone significant enhancements in the past few months thanks to the invaluable feedback from tens of thousands of developers worldwide. Some of the key improvements include:

Highly personalized suggestions

Benefit from code suggestions tailored to your specific coding style with context through local code awareness and connection to your software repository for global code awareness.

Advanced interaction model

Explore a host of advanced features like Code Lens, quick actions, customized quick actions, Diff view and diff insert, mentions to code elements in your workspace all designed to make your coding experience more intuitive and efficient.

Wide IDE support

Whether you’re using VS Code, JetBrains, Eclipse, Visual Studio 2022, or Neovim, Tabnine Chat seamlessly integrates with your preferred IDE, ensuring a consistent and powerful coding experience across platforms.

Private installations

For Tabnine Enterprise customers seeking an extra layer of control, Tabnine Chat can be deployed in a private installation, on VPC, or on-premises, offering a seamless integration with your existing infrastructure.

What can you do with Tabnine Chat?

Tabnine AI coding assistant can help every developer with various coding tasks:

Plan

Ask Tabnine for guidance in exploring and planning solutions. Get standard solutions, steps to solve a problem, or references from your workspace. It’s perfect for general coding questions or understanding your project’s current state.

Create

Generate code step by step based on natural language specifications. Specify input, output, and logic. Tabnine aligns results with your project’s existing code.

Test

Request Tabnine to write tests for specific functions or code. Tabnine returns test cases, implementation, and assertions and suggests tests that align with the testing framework and structure already in use in your project.

Document

Enhance code readability with Tabnine’s documentation capabilities. Create formal documentation for classes, functions, comments, and inline documentation.

Explain

Quickly understand code logic. Ask Tabnine to explain specific code snippets, which is especially useful for legacy code or unfamiliar languages.

Maintain

Get Tabnine’s help in tasks related to maintaining code. Whether fixing bugs, adding functionality, or refactoring, collaborate incrementally for efficient results.

Empower your coding journey: download Tabnine Chat today and redefine the way you approach software development.

How can you get access to Tabnine Chat?

Tabnine Chat is available for all Tabnine Pro and Tabnine Enterprise users (in secure SaaS deployment and private installations). If you’re not yet a customer, you can install the Tabnine plugin or extension and sign up for Tabnine Pro today — it’s free for 90 days. Then check out our Docs to learn how to get the most out of Tabnine Chat.

AI code generation: How it works and 9 tools you should know

Posted on March 10th, 2024

What is AI code generation? 

AI code generation is a technology that is changing the way we approach programming. It involves the use of artificial intelligence (AI) to write or generate code. Modern code generation tools are based on large language models (LLMs) like GPT-4 or PaLM 2, trained on massive code datasets, which can understand nuanced instructions and generate human-like code in any programming language.

Code generation tools can write code much faster than a human programmer, and are more versatile because they can learn any technology or framework represented in their training dataset. They can carry out tasks like debugging, code optimization, coding of new functions or modules, and writing code documentation.

AI code generation is revolutionizing the way we code, and is already improving the productivity of millions of developers worldwide. 

Applications of AI code generation 

Here are some of the important applications of AI code generation:

  • Automated code writing: AI code generation tools can significantly speed up the coding process, leaving programmers more time to focus on higher-level tasks. Automatic code writing is particularly useful for repetitive tasks or those where code needs to be adapted or repurposed.
  • Bug detection and fixing: By analyzing the code, AI can identify potential errors and suggest fixes. This speeds up the debugging process and allows developers to cover more ground when testing their solutions.
  • Code optimization: AI can analyze the code and suggest ways to make it more efficient. This could involve reducing the number of lines of code, improving the performance of the code, or even suggesting alternative approaches that could result in better results.
  • Assisting in learning and understanding code: Modern coding assistants provide a chat interface that allows developers to “talk to their code.” Students, novice developers, or those learning new technologies can ask questions, and the coding assistant can provide examples and explanations.
  • Generating code documentation: AI code generation tools can analyze existing code and generate comments or even detailed descriptions of how the code works. This can save time for developers, help expand the coverage of existing code documentation and update it more frequently.

Learn more in our detailed guide to:

Benefits of AI code generation 

Increasing efficiency and productivity

By reducing the need for manual coding, and ensuring less time is spent on mundane, repetitive tasks, such as writing boilerplate code, AI code generation allows programmers to complete tasks faster and focus on more complex tasks. This can dramatically improve productivity and reduce time-to-market for software products.

Reducing errors

Human programmers, despite their best efforts, can make mistakes, which can lead to bugs and potential security vulnerabilities. AI code generation can help identify coding errors and dynamically suggest best practices, which can improve coding quality and also help upskill developers on issues like performance optimization and secure coding.

Learn more in our detailed guide to AI security issues (coming soon)

Facilitating learning and skill acquisition for new programmers

AI code generation also opens up new learning opportunities for beginner programmers. By observing code, examples, and explanations generated by AI, new programmers can learn best practices, understand coding patterns, and gain a better understanding of the programming language. In the same way, AI code generation can help professionals learn new technologies and frameworks, and onboard faster when starting work on existing, complex codebases.

Learn more in our detailed guide to AI code review


9 notable AI code generation tools

 

1. Tabnine

Tabnine is the AI coding assistant that helps development teams of every size use AI to accelerate and simplify the software development process without sacrificing privacy, security, or compliance. Tabnine boosts engineering velocity, code quality, and developer happiness by automating the coding workflow through AI tools customized to your team. Tabnine supports more than one million developers across companies in every industry. 

Unlike generic coding assistants, Tabnine is the AI that you control:

It’s private. You choose where and how to deploy Tabnine (SaaS, VPC, or on-premises) to maximize control over your intellectual property. Rest easy knowing that Tabnine never stores or shares your company’s code.  

It’s personalized. Tabnine delivers an optimized experience for each development team. It’s context-aware and can be tuned to recommend based on your standards. You can also create a bespoke model trained on your codebases.

It’s protected. Tabnine is built with enterprise-grade security and compliance at its core. It’s trained exclusively on open source code with permissive licenses, ensuring that our customers are never exposed to legal liability.

Try Tabnine for free today or contact us to learn how we can help accelerate your software development.

 

2. GitHub Copilot

GitHub Copilot is another AI-powered code generation tool developed by GitHub in collaboration with OpenAI. It generates suggestions for whole lines or blocks of code, saving developers the time and effort of writing routine code. It draws on the vast number of public repositories on GitHub to learn patterns and generate accurate code suggestions. 

GitHub Copilot works directly in your IDE, making it easy to use. It supports all popular programming languages and frameworks. 

It is important to realize that because Copilot was trained on a very wide dataset of public code repositories, it can sometimes generate code that is insecure or contains security vulnerabilities. You also need to ensure that the generated code does not violate any copyrights, licenses, or legal agreements. 

In addition, because Copilot is a cloud-based service, you should consider potential data privacy and confidentiality concerns when using the tool. The same considerations apply to other tools on our list.


3. Replit GhostWriter 

Replit GhostWriter offers real-time code completion as developers write, saving time normally spent on generating boilerplate code or troubleshooting syntax issues. 

GhostWriter integrates with the Replit online code editor, allowing programmers to compose, execute, and debug their code without switching platforms. Additional features of the solution include automatic code refactoring and generating comments from existing code.

4. Code Llama 

Meta’s Code Llama is an advanced language model, specifically designed to create and discuss code using text prompts. Code Llama is an extended version of Llama 2, Meta’s second-generation Large Language Model (LLM) with between 7-70 billion parameters and a context length of 4,096 tokens. A unique capability of the Llama model is its fill-in-the-middle (FIM) capability, enabling it to integrate code into pre-existing code blocks.

Code Llama can generate both code and descriptive language about the code, based on prompts in both natural language and code. It can also perform completion and debugging and supports programming languages including Python, C++, Java, PHP, Typescript (Javascript), C#, and Bash.


5. CodeT5

CodeT5 is an AI code generation tool designed to generate code from natural language descriptions. It can convert problem statements into code: You provide a description of the problem you want to solve, and CodeT5 generates the corresponding code. CodeT5 supports multiple programming languages and integrates with various IDEs.


6. AI2SQL

AI2SQL is an AI code generation tool that simplifies the process of writing complex SQL queries, making database management easier for both technical and non-technical users.

The tool uses natural language processing (NLP) to understand user queries, converting them into SQL commands. This means you can simply ask AI2SQL what you need to do with a database, and it will deliver the most appropriate query. This saves time and effort and also reduces the risk of SQL syntax errors.


7. Durable 

Durable takes a different approach to other AI code generation tools. It converts graphical UI sketches into ready-to-use code. Durable’s technology can interpret human-drawn sketches, translate them into natural language requirements, and then use generative AI to create working code. Developers can scribble an application diagram and have it translated into HTML and CSS. This allows for fast prototyping and rapid design iterations.


8. Mintlify

Mintlify is a unique AI code generation tool that focuses on creating responsive web designs. It uses AI to translate design files into HTML and CSS code, significantly reducing the time it takes to turn a design concept into a live website. 

Mintlify closely analyzes design files, ensuring that the generated code accurately represents every element of your design. This can save hours of manual coding and tweaking. The tool supports a range of design file formats, including Sketch, Figma, and Adobe XD.

9. Cody

Sourcegraph’s Cody is yet another AI-driven tool for code generation. Cody can perform auto-completion tasks ranging from single lines of code to entire functions, and can be used with multiple coding languages, configuration files, or even documentation. It supports all coding languages, but works especially well with Python, Go, JavaScript, and TypeScript.

Cody is designed to be context-aware. It can generate answers to queries that require understanding multiple files or even entire repositories. It can generate personalized recommendations based on a company’s proprietary APIs and idioms.

 

The future of AI for code is here

There are minor differences in features and capabilities between the AI code generation tools we reviewed, but in the end, all of them are able to generate human-like code and improve developer productivity. However, most of these tools were trained on a wide dataset of public code repositories, which include code that is not secure or uses non-permissive open source licenses. This means you must carefully review code generated by these tools for security and licensing issues. 

In addition, tools offered as a cloud service raise important concerns about the privacy and confidentiality of your code. Leakage of your proprietary code is a possibility and you should carefully examine each provider’s security and compliance measures.

Luckily, there are AI code generation tools without any of these concerns. Tabnine stands out of the crowd with the highest standards of privacy and security. Unlike other AI coding tools, Tabnine places special emphasis on code privacy, intellectual property protection, and open-source compliance. With a dedicated mission to bring AI to every facet of software development, Tabnine ensures seamless integration while prioritizing the privacy and security of user code:

Code privacy

Tabnine’s AI models can be isolated, with no external connectivity and no data retention, ensuring that user code remains completely private and secure. 

Intellectual property protection

Tabnine never stores user code and exclusively trains its generative AI on open-source code with permissive licenses, mitigating the risk of intellectual property litigation. 

Open source compliance:

Tabnine ensures complete security by not training its AI models on code with non-permissive licenses, providing full transparency regarding the code used for training. In contrast, Copilot’s training on non-permissive open-source licenses, including GPL licenses with Copyleft clauses, could expose companies to legal risks. Although a filter is available to remove problematic code from suggestions, it may not always be foolproof, leaving the legal risk unresolved.

Get a 90-day free trial of Tabnine Pro today or talk to a product expert.

Documentation as code: Principles, workflow, and challenges

Posted on March 7th, 2024

What is documentation as code?

Documentation as code (DaC) is a development philosophy that treats software documentation with the same respect and attention as software code. Just like code, documentation is written in plain text, stored in version control systems, and subject to the same rigorous review and testing processes.

DaC leverages the same tools and workflows that developers use for writing and maintaining software code. The goal is to improve the quality, accuracy, and usability of documentation by adopting the principles of modern software development. In essence, it’s about bringing the power of version control, automated testing, and continuous integration to the realm of software documentation.

This is part of a series of articles about code documentation.

Core principles of documentation-as-code tools 

Treating documentation with the same rigor as code

Documentation as code places documentation at the same level of importance as the code itself. This means that documentation should be written, reviewed, updated, and maintained with the same intensity and commitment as the software code. Just like code, documentation errors can lead to misinformation, confusion, and ultimately, lower product quality.

Storing documentation in version control

One of the key principles of documentation as code is the storage of documentation in version control systems, just like code. This allows for tracking changes over time, easy collaboration among team members, and the ability to revert to previous versions of the documentation if needed. Storing documentation in version control also ensures that the documentation always reflects the current state of the project.

Automation of documentation generation and deployment

Automation is a cornerstone of modern software development, and documentation should be no exception. By automating the process of documentation generation and deployment, teams can ensure that the documentation is always up-to-date and available for users. This not only reduces the manual effort required to maintain the documentation, but also ensures that users always have access to the latest information.

Peer review processes for documentation updates

Just like code, updates to the documentation should be subject to peer review. This ensures that the documentation is accurate, consistent, and easy to understand. It also helps to catch errors and inconsistencies before they make their way into the final product.

Learn more in our detailed guide to code documentation tools (coming soon).

Benefits of documentation as code 

Here are the key benefits of DaC for development organizations:

Improved consistency and accuracy

By treating documentation with the same rigor as code, teams can ensure that their documentation is consistent and accurate. This means that users can trust the documentation to provide reliable and up-to-date information about the software.

Collaboration and iterative improvement

DaC promotes collaboration among team members. By storing documentation in version control systems, teams can easily collaborate on the creation and maintenance of documentation. This fosters an environment of iterative improvement, where the documentation is continuously updated and refined based on feedback and changes in the software.

Flexibility in documentation formats and platforms

One of the key benefits of DaC is its flexibility in terms of documentation formats and platforms. Because the documentation is written in plain text, it can easily be converted into various formats such as HTML, PDF, or Markdown. This also allows for easy integration with various documentation platforms.

Integration with CI/CD pipelines

DaC fits seamlessly into modern CI/CD pipelines. With automation in place, documentation can be generated and deployed automatically as part of the software release process. This ensures that the documentation is always in sync with the latest version of the software.

Process and workflow of DaC 

Here are the main stages of the DaC workflow:

Plain text authoring

DaC starts with transitioning documentation to a simple, plain text format. This way, you can use any text editor to create or modify the documentation. Plain text is universal and doesn’t require any specific software to read or write, making it accessible to everyone.

Plain text files can be easily version controlled, diffed, and merged. They’re also platform independent and can be opened on any operating system without worrying about compatibility issues.

Using markup languages like Markdown or reStructuredText is beneficial. These languages allow you to format your text, making it more readable and organized. They also support conversion to other formats like HTML or PDF, allowing you to publish your documentation in various formats.

Source control

The use of source control systems like Git for documentation provides numerous benefits including versioning, collaboration, and traceability.

Version control allows you to track changes, maintain multiple versions, and even revert changes if necessary. This is particularly useful when you are working with a team of developers, as it allows everyone to work on the documentation simultaneously without any conflicts.

Moreover, traceability is another critical benefit that source control provides. With it, you can link your documentation to your code, making it easier to understand the relationship and dependencies between them.

Publishing

Once your documentation is written and versioned, it needs to be published so that it can be accessed by your users. This can be done through various channels like a dedicated documentation website, GitHub wiki, or even directly from your source code repository.

Publishing your documentation is not just about making it accessible, but also about making it easy to navigate and search. A well-structured documentation site allows your users to find the information they need quickly and easily. It also provides a platform for feedback, enabling you to continuously improve your documentation based on your users’ needs and experiences.

Automation

The final stage in the workflow of documentation as code is automation. Automation involves using tools to automatically generate, update, and publish your documentation. This not only saves you time and effort but also ensures consistency and accuracy.

Automation can be achieved through various tools and frameworks like Jekyll, Sphinx, or MkDocs. These tools integrate with your source control and can automatically generate your documentation every time you commit changes to your repository.

Best practices in documentation as code 

Here are a few best practices that can help you make the most of DaC workflows.

Maintaining documentation modularity

Modularity involves breaking down your documentation into smaller, self-contained units. This makes it easier to write, maintain, and navigate your documentation.

Modularity also aids in collaboration. Different team members can work on different modules without stepping on each other’s toes. It also makes it easier to track changes and understand the impact of a change in one module on the rest of the documentation.

Continuous integration of documentation

Continuous integration (CI) of documentation involves integrating your documentation with your CI pipeline, ensuring that it is always up-to-date with your code.

CI of documentation helps prevent outdated or inaccurate documentation. It ensures that your documentation is always in sync with your code, providing your users with the most accurate and current information.

Frequent updates and reviews

Just like code, documentation needs to be continually updated and reviewed to ensure accuracy and relevance. Regularly updating your documentation ensures that it reflects the current state of your code. Regular reviews, on the other hand, help catch errors, inconsistencies, and areas of improvement.

Challenges of traditional code documentation 

While DaC practices can be very beneficial, the documentation as code pattern does not solve the major problem of code documentation — it takes time. Even if documentation is stored in plain text files and efficiently managed, someone still needs to write it. Let’s review some of the key challenges of code documentation, which are not alleviated by DaC workflows.

Code documentation uses valuable development resources

The first challenge that many developers encounter with traditional code documentation is the significant amount of time and resources it consumes. In most cases, code documentation is a manual process that requires developers to pause their coding activities and dedicate substantial time to write, structure, and review their code documentation.

This process is not only time-consuming but also diverts attention away from the core development activities. It’s like asking a chef to stop cooking and start documenting each ingredient, cooking step, and the rationale behind their culinary choices. This would waste time chefs could use on their creative work.

Code documentation must be frequently updated

As the codebase evolves, changes must be reflected in the documentation. However, with the rapid pace of software development, keeping documentation up-to-date can be a daunting task.

As development teams implement new features, fix bugs, and refactor code, the associated documentation must be updated accordingly. This constant need for updates can quickly turn into a documentation nightmare, either wasting resources or leading to outdated or incorrect information that can mislead stakeholders.

Code documentation is rarely comprehensive

Finally, traditional code documentation is often incomplete or lacks depth. This issue arises because, in the rush of agile development pipelines, documentation is often deprioritized or hastily written. As a result, crucial details might be omitted, and entire components might lack documentation, leading to a lack of clarity and understanding for anyone trying to comprehend the codebase.

Moreover, not all developers are good at or enjoy writing extensive documentation. Sometimes, developers might write a brief, cryptic explanation that makes sense to them but may be difficult for others to understand. Consequently, the code documentation fails to serve its purpose of enhancing code readability and maintainability.

Automating code documentation with Tabnine

Given the challenges of traditional code documentation, recent advances in generative AI can be a big help to development teams. Tabnine is the AI coding assistant that helps development teams of every size use AI to accelerate and simplify the software development process without sacrificing privacy, security, or compliance. Tabnine boosts engineering velocity, code quality, and developer happiness by automating the coding workflow through AI tools customized to your team. Tabnine supports more than one million developers across companies in every industry. 

Unlike generic coding assistants, Tabnine is the AI that you control:

It’s private. You choose where and how to deploy Tabnine (SaaS, VPC, or on-premises) to maximize control over your intellectual property. Rest easy knowing that Tabnine never stores or shares your company’s code.  

It’s personalized. Tabnine delivers an optimized experience for each development team. It’s context-aware and delivers precise and personalized recommendations for code generation, code explanations, and guidance, and for test and documentation generation.

It’s protected. Tabnine is built with enterprise-grade security and compliance at its core. It’s trained exclusively on open source code with permissive licenses, ensuring that our customers are never exposed to legal liability.

The Tabnine in IDE Chat allows developers to communicate with a chat agent in natural language and get assistance with various coding tasks, such as:

  • Generate new code 
  • Generating unit tests 
  • Getting the most relevant answer to your code
  • Mention and reference code from your workspace
  • Explain code
  • Extending code with new functionality
  • Refactoring code
  • Documenting code

Onboarding Agent for Tabnine Chat
Tabnine Onboarding Agent helps developers onramp to a new project faster. For developers who are new to an organization or existing developers who are new to a project, the Onboarding Agent provides a comprehensive overview of key project elements, including runnable scripts, dependencies, and overall structure to help them get up to speed effortlessly.

Here are a few examples showing how Tabnine can be used to generate code documentation:

Large development teams can’t function effectively unless everyone commits to writing thorough documentation, the thing is most developers would rather be writing code than documenting it. Tabnine makes generating documentation easy. Simply highlight the code you want to document, and then ask Tabnine through your chat window to create documentation. With local and global context awareness enabled Tabnine will generate documentation that’s in alignment with your coding standards and formatting.

 

 

Try Tabnine for free today or contact us to learn how we can help accelerate your software development.