Innovation Open Source

Want to be a better programmer? Try Microsoft's 'code-writing', question-answering Stack Overflow Bot

The bot answers English language queries about programming, drawing upon the information in the millions of questions and answers available via Stack Overflow.

Video: What is the fastest growing programming language?

Microsoft has teamed up with Stack Overflow to create a bot that will answer your programming questions from inside the Visual Studio code editor.

The bot responds to English language queries about programming, retrieving what it deems to be the most relevant answers from the millions available via Stack Overflow.

Queries can relate to any of the broad sweep of languages and software development-related topics covered on Stack Overflow, and the bot is also able to offer up simple code snippets and parse text from screenshots.

In a demo of the bot at Microsoft's Ignite conference in Florida yesterday, the bot asked for an example of an input and the desired output. On being given 'Joseph Sirosh' as the input and 'Sirosh, J.' as the output, it took about five seconds to generate the pseudocode for rewriting names in this way. Another demo saw the bot extract text from a screenshot of an error message and pull up information about how to resolve it.

The 'code' snippet 'generated' by the bot during the Ignite demo.

Image: Microsoft

The Ignite demo showing the bot's ability to parse text from screenshots.

Image: Microsoft

"We want you to spend less time searching for answers and more time writing code," David Fullerton, CTO at Stack Overflow told the Ignite conference.

"We believe developers are writing the script for the future and our goal is to help you move faster and get more done."

However the bot will take a good deal of setting up. Rather than being available as an online demo, Microsoft has created a GitHub page with the necessary JavaScript code and instructions for setting the bot up.

SEE: Is it worth enrolling on a MooC if you want to become a software developer? (TechRepublic - PDF)

To try out the bot you'll need to be running Node.js v08.14 and will also need to set up an account with Microsoft's Azure cloud platform. The bot relies on various Azure services, including Bing Custom Search, LUIS, QnA Maker, and Text Analytics, each of which have to be set up using the instructions on the GitHub page.

Once installed, the bot can be set up to run in a side panel within Microsoft's Visual Studio IDE, working as a VS code extension. Again the necessary instructions are available on the GitHub page.

Fullerton says the bot is a demo of what is possible and he hopes other developers will build upon the sample code for the Stack Overflow Bot to create other AI assistants that draw upon the site's extensive repository of programming knowledge.

Stack Overflow recently released a salary calculator, which allows developers to find out a typical salary for their role.

Also see

Visit TechRepublic