Wing Tips: AI Assisted Development in Wing Pro
Generative AI is astonishingly capable as a programmer's assistant. As long as you provide it with sufficient context and clear instructions, it can cleanly and correctly execute a wide variety of programming tasks. This Wing Tip introduces Wing Pro's AI assisted software development capabilities.
AI Code Suggestion
Here is an example where Wing Pro's AI code suggestion capability is used to write a missing method for an existing class. The AI knows what to add because it can see what precedes and follows the insertion point in the editor. It infers from that context what code you would like it to produce:

Shown above: Typing 'def get_full_name' followed by Ctrl-? to initiate AI suggestion mode. The suggested code is accepted by pressing Enter.
Writing New Code with AI
An even better way to write new code is to use Wing Pro's AI Coder to provide the AI with written instructions. For example, you might ask it to "add client and server classes that expose all the public methods of FileManager to a client process using sockets and JSON":

Shown above: Using the AI Coder tool to request implementation of client/server classes for remote access to an existing class.
The processing time shown in this example is changing for the better as generative AI advances.
Simpler and perhaps more common requests like "write documentation strings for these methods" and "create unit tests for class Person" of course also work. In general, Wing Pro's AI Coder can do any reasonably sized chunk of work for which you can clearly state instructions.
Used correctly, this capability will have a significant impact on your productivity as a programmer. Instead of typing out code manually, your role changes to one of directing an intelligent assistant capable of completing a wide range of programming tasks very quickly. You will still need to review and accept or reject the AI's work. Generative AI can't replace you, but it allows you to concentrate much more on higher-level design and much less on implementation details.
AI Transformation
AI Coder can also be used to request changes to existing code. For example, you might ask it to "convert this threaded implementation to run asynchronously instead":

Shown above: Running the highlighted request in the AI Coder to convert multithreaded code to run asynchronously instead.
Getting Started
To try out AI assisted development in Wing Pro, see the AI Quick Start and the rest of the AI Assisted Development documentation for details on setup, framing requests, and monitoring costs. It takes a bit of time to get started, but it is well worth the effort to incorporate generative AI into your tool chain.
That's it for now! Next time we'll take a look at AI Chat, which allows you to talk about code without directly making changes to it.
As always, please don't hesitate to email support@wingware.com if you run into problems or have any questions.
Share this article: