DevChatIntelligent Programming Assistant – Usage Review

Written in front: The blogger is a “little mountain pig” who has devoted himself to training after practical development experience. His nickname is taken from “Peng Peng” in the cartoon “The Lion King”. He always treats the surrounding people with an optimistic and positive attitude. thing. My technical route has been from Java full-stack engineer to the field of big data development and data mining. Now I have finally achieved some success. I would like to share with you what I have learned in the past, hoping to be helpful to you on your learning journey. At the same time, the blogger also wants to create a complete technical library through this attempt. Any exceptions, errors, and precautions related to the technical points of the article will be listed at the end. Everyone is welcome to provide materials through various methods.

  • Please criticize and point out any errors in the article and make sure to correct them in time.
  • If you have any questions you want to discuss and learn from, please contact me: [email protected].
  • The style of published articles varies from column to column, and they are all self-contained. Please correct me for any shortcomings.

[DevChat] Intelligent Programming Assistant – Usage Review

Keywords in this article: DevChat, large model, intelligent assistant, VS plug-in

Which #AI programming assistant is the best? DevChat is “really” easy to use#

Article directory

  • 【DevChat】Intelligent Programming Assistant – Usage Review
    • 1. DevChat
      • 1. Product introduction
      • 2. Product advantages
      • 3. Free quota
      • 4. Usage steps
    • 2. Use evaluation
      • 1. Concept explanation evaluation
      • 2. Programming syntax evaluation
      • 3. Solution evaluation
      • 4. Error correction evaluation
      • 5. Continuous dialogue evaluation
    • 3. Techniques & Conclusion

1. DevChat

1. Product introduction

  • Official website link: https://meri.co/bfo

DevChat is a plug-in that can be used directly in VSCode, and there is a free usage quota for the first registration. The important thing is that it supports GPT-4. And it can be said to be very cheap in terms of price. After all, the genuine ChatGPT costs 20 US dollars per month.

It is still very valuable for conversational interactive assistants. After all, in addition to being used in programming, it can also be used in other aspects.

2. Product advantages

Advantages Description
Efficient code writing and debugging

td>

DevChat can automatically complete code completion, syntax checking, code formatting and other functions. It can also perform code debugging and error troubleshooting, which greatly improves development efficiency and quality.
Powerful contextual control DevChat allows developers to precisely control the contextual information embedded in prompts, avoiding over-guessing what users need in prompts. content, developers can communicate exactly what they need without introducing unnecessary distractions.
The interface is embedded in the IDE DevChat embeds the chat interface directly into the IDE, allowing AI to be at your fingertips, making it convenient for developers to communicate and collaborate at any time.
Supports a variety of large models DevChat supports various mainstream large model calls, including the OpenAI large model, which has powerful natural language processing capabilities and cooperates with The switching of multiple language models can better understand and deal with developers’ problems and needs.

3. Free quota

When you use it for the first time, you can use your email to register, and you will receive a credit of about 0.3 US dollars. If you bind WeChat, you will receive an additional US$1:

The purchase method is to pay as you go, and it will not expire. It is very suitable for small partners in China.

4. Usage steps

  • User registration


After entering your nickname and email address, click Register, and you will receive a verification code in your email address:

It is recommended that you log in to your account once to receive the WeChat bound quota.

  • Plug-in installation

You can click VS Code Download on the official website to install directly:

Click Install -> Continue, and then follow the browser prompts to open VSCode:

Click Install and wait for the installation to complete:

  • API Key settings

You can see the configuration steps from the first email:

Press P / Ctrl + Shift + P or F1 in Visual Studio Code to open the Command Palette. Next, type “devchat access key” and enter the above access key. Don’t forget to install Python 3.8 + and Git to use DevChat.

First use the shortcut keys to open the command window, and then enter devchat access key [Requires Python 3.8 or above and Git to be installed]:

  • Switch model

After the configuration is completed, you can see the DevChat icon [which can be dragged to the right for easy use]. Click the lower right corner to open it each time:

Click on the model list to switch to the model you need:

2. Usage evaluation

From the editor’s own experience, the following issues are generally involved in programming:

  • Concept explanation questions, including new technologies, software usage scenarios and usage
  • Programming syntax issues, using a certain language to implement specific functions
  • Solution-type problems, by describing an application scenario, perform architectural design or provide solutions
  • For error modification issues, a repair version will be provided based on the error message or error code.
  • Continuous dialogue questions, cognitive performance on contextual understanding and connection

1. Concept explanation and evaluation

For a brand new technology, it usually takes us a long time to review the information. But in most cases, time is tight and tasks are heavy. We can quickly understand it directly through the Chat assistant.

  • question

If I want to develop React, what environment configurations need to be prepared, how should the basic project structure be designed, what issues should I consider about future expansion of functional modules, and what issues need attention.

  • result



2. Programming syntax evaluation

For basic classic programming problems, I believe there is no need to test them anymore. Let’s directly test the actual tasks that may be encountered in actual development.

  • question

Use Java’s SpringBoot framework to implement a REST-style server interface. Take the Blog entity class as an example, which has basic attributes such as ID, title, and content. Examples of addition, deletion, modification, and query calls are given.

  • result


@RestController
@RequestMapping("/api/blogs")
public class BlogController {<!-- -->

    @Autowired
    BlogRepository blogRepository;

    @GetMapping
    public Iterable<Blog> getAllBlogs() {<!-- -->
        return blogRepository.findAll();
    }

    @PostMapping
    public Blog createBlog(@RequestBody Blog blog) {<!-- -->
        return blogRepository.save(blog);
    }

    @GetMapping("/{id}")
    public Blog getBlog(@PathVariable Integer id) {<!-- -->
        return blogRepository.findById(id).orElseThrow(RuntimeException::new);
    }

    @PutMapping("/{id}")
    public Blog updateBlog(@PathVariable Integer id, @RequestBody Blog updatedBlog) {<!-- -->
        return blogRepository.findById(id).map(blog -> {<!-- -->
            blog.setTitle(updatedBlog.getTitle());
            blog.setContent(updatedBlog.getContent());
            return blogRepository.save(blog);
        }).orElseThrow(RuntimeException::new);
    }

    @DeleteMapping("/{id}")
    public void deleteBlog(@PathVariable Integer id) {<!-- -->
        if (blogRepository.existsById(id)){<!-- -->
            blogRepository.deleteById(id);
        } else {<!-- -->
            throw new RuntimeException();
        }
    }
}


3. Solution evaluation

For some more responsible scenarios, multiple components or frameworks may need to be used, and there are multiple options. At this time, we can describe the application scenarios to refer to feasible solutions.

  • question

If I want to process the data stored in Kafka, the structure is json, perform real-time data calculation, refresh frequency is 30 seconds or minutes, perform statistical analysis on a certain attribute, persist the results, and finally display them in a visual way , what solutions are there, what components will be used, and more than two feasible solutions are given.

  • result

4. Error correction evaluation

Errors and bug modifications are very common in programming. Generally, the entire code can be thrown in after desensitization, or the semi-finished product can be improved into a complete function. Use an error code and see how it performs without pointing out the error.

  • question
public class Main {<!-- -->
    public static long fibonacci(int n) {<!-- -->
        return fibonacci(n - 1) + fibonacci(n - 2);
    }

    public static void main(String[] args) {<!-- -->
        int n = 10;
        System.out.println(fibonacci(n));
    }
}

Code execution is not as expected.

  • result

5. Continuous dialogue evaluation

Many times it takes multiple rounds of dialogue to solve the problem, so understanding the context is very important. Of course, this also requires us to make some effective question prompts, describe the problem clearly, and try to prevent irrelevant questions from appearing in the conversation. This can usually achieve good results.

  • question
    • Implement binary search using Python
    • How are the time complexity and space complexity of this algorithm calculated?
  • result


3. Skills & amp; Conclusion

In the process of using the DevChat plug-in, I also discovered a convenient function, that is, when we write code, we can directly select the code and send it to DevChat. Then enter instructions to help us optimize or troubleshoot. Even the time of copying and pasting is saved. The operation is also very simple. Just select and click right-click, and then click Add to DevChat< again. /strong>That’s it:

At this time, you can find an attachment icon in the chat window. Click to preview the code to be sent:

Since the editor is abroad, I have been able to use ChatGPT normally. During the evaluation process, I also compared the performance of the same problem under ChatGPT. It can be said that they are basically the same, and I feel that the pricing is very affordable. Partners can really experience it more in person. This tool has been continuously updated for half a year since its release, and all aspects are being continuously optimized. You really can pay more attention to it!

syntaxbug.com © 2021 All Rights Reserved.