Main image of article Five A.I. Platforms for Software Developers

It’s been a good year for artificial intelligence (A.I.). Platforms such as ChatGPT and Midsommar have generated lots of buzz for their ability to write text, generate code, and create images from a simple prompt.

Although there’s been a lot of chatter (and handwringing) over the societal impact of chatbots’ ability to write code, especially with regard to developer jobs, it seems unlikely these platforms will replace human developers and engineers anytime soon. Instead, these tools can potentially speed up the development process, particularly when it comes to low-level coding and bug-squishing.

If you’re a developer interested in A.I., here are five tools to play around with:

PrivateGPT

This is an open-source project that allows you to train an A.I. on your documents with the guarantee that nothing will ever leave your computer. This is an important feature, as other A.I. platforms will use your input to train their respective datasets. For example, ChatGPT's FAQ says that it will use your conversations to improve its A.I. language models and your chats may be reviewed by human A.I. trainers unless you disable training; Google’s Bard has something similar.

PrivateGPT is a Python project (3.10 or above) and requires some multi-GB downloads for the language model. You aren't restricted to the default GPT4All-J LLM; it can use other such as LlamaCpp.

You use the LangChain importer to import your data; my data was several thousand HTML files, which took an hour or so to import (it can also handle .doc, .docx, Outlook files, csv, epub, pdf, and so on). It responded to queries with a decent conversation but took a few minutes to respond each time (perhaps running it on a four-year-old laptop with a fairly low powered GPU was not the best idea). Full kudos to Visual Studio though which downloaded all the packages flawlessly. 

Visual Studio Intellicode

Visual Studio Intellicode uses A.I. to read your C# code (also XAML, C++, JavaScript and TypeScript and Visual Basic) and makes suggestions as you type. If you like what it's offering, just hit the tab key to accept it. The A.I. uses your code—including variable names and functions—to figure out what you need. Intellicode runs on your computer, keeping your private code private.

At times, it almost feels like mind-reading. For instance, if you've split a CSV string and assign the values to variables, it writes the assignments and correctly increments the array indices. If you're writing a lot of code, it will come up with correct suggestions between 10 percent and 25 percent of the time. It’s a great timesaver, especially with boilerplate code.

Intellicode is also available via an extension for Visual Studio Code, but the number of programming languages is currently only four (Java, JavaScript/TypeScript, Python and SQL).

Mintlify

A huge problem for developers is generating documentation from their source code and keeping it updated. Mintlify is a company that provides free and paid tools for doing this. Their Mintlify Writer is supplied as a free extension for Visual Studio Code and IntelliJ Idea. It uses A.I. to read TypeScript, JavaScript, Java, Kotlin and Python, then puts the generated documentation directly back into the source code as comments. Although it sends your code to their servers, it's encrypted both in transit and at rest and is never used for training.

I tried it out on their website and pasted in this Python code:

def run(args = None):

    import sys

    import doctest

    if args is not None:

        sys.argv = args

    return doctest.testmod(sys.modules.get(__name__))

   

if __name__ == '__main__':

    print "running..."

    import sys

    status = run()[0]

    if (status == 0): print "Done."

    sys.exit(status)

 

It correctly identified the text as Python and generated this:

The function runs doctests for the current module and returns the test results.

:param args: args is a list of command-line arguments that can be passed to the script. If args is None, the script will use the default command-line arguments. If args is not None, the script will use the arguments passed in the list

:return: The function `run()` is returning the results of running doctest on the module specified by `__name__`. Specifically, it returns a tuple containing the number of tests that were run and the number of tests that failed. The code then checks if the number of failed tests is zero and prints "Done." if so. Finally, the script exits with the status code of the doctest run.

I could see this as being really useful when needing to make sense of a new code base. The writer is free, but the Mintlify paid tools let you generate good-looking documentation for customers.

PolyCoder

This is somewhat similar to privateGPT, except it's purely for software, and the training data has been taken from thousands of GitHub repositories.  There's something like 249 GB of training data for 12 programming languages, ranging in size from 55 GB (taken from 10,749 repositories) for C down to 1.8 GB for Scala from 1497 repositories. That's 24.1 million files in total! The project page also includes a formal paper that you can download, explaining the process and comparing results to OpenAI's Codex.

GitHub Copilot

I wasn't going to include this because it costs $10 a month for individual developers, but it’s free if you're a verified student or maintain an open-source project. However, it does some clever stuff, and so it made the cut.

GitHub Copilot provides A.I. pair programming tools and uses the same 12 programming languages as PolyCoder. It's powered by Open AI Codex. You use it by putting comments in your code that it can pick up on; type in a function name and some comments and it will create the code.

Some of the cleverness includes creating dictionaries, but it's more useful writing unit tests. There's also a free extension to translate code from one programming language to another. According to GitHub, 1.2 million programmers used Copilot during its pre-release period, but I wonder how many are now paying.

Conclusion

There is some amazing stuff out there, but as always you need to check any code generated by A.I. You simply won’t know if the code is actually correct unless you go through it line-by-line. That being said, A.I. tools for developers will surely evolve in coming years. Who knows how far it will go?