Use Microsoft Bing AI language large model to assist in improving the efficiency of writing code, reading code, and solving bugs

Table of contents

1 How to use Bing AI

2 Bing AI usage examples

2.1 If you don’t understand the code, you can ask Bing AI

2.2 When you are not sure whether your program understands it correctly, you can ask Bing AI

2.3 If there is a bug in program compilation, you can ask Bing AI


1 How to use Bing AI

To use Bing AI, you must use Microsoft's Edge browser, open the Edge browser, and then open Bing.

Bing (bing.com)

Then click Chat in the upper left corner to enter Bing 

 Then you can ask questions

 Sometimes when we encounter problems, we go to Google to search for answers, but some questions may be better if we ask Bing AI. Bing AI combines large language models and bing search, but this does not mean that every time we encounter a problem, we leave it to Bing. AI, sometimes other methods may be better, and sometimes Bing AI may be better. We can use Bing AI as one of the tools or methods, which can be combined with our other methods or tools to improve our writing and reading of code. , and the efficiency of solving bugs. Here is a brief example of how I use Bing AI.

2 Bing AI usage examples

2.1 If you don’t understand the code, you can ask Bing AI

 For example, when I read the code related to the i2c driver in the Linux kernel source code, it is as shown in the following blog: Detailed explanation of the I2C driver framework of the Linux kernel ------ This should be the most time-consuming of my more than 600 blogs so far. A blog_Chen Hongwei's blog-CSDN blog

The previous questions were all solved. For the last question, I looked at the source code according to my understanding and entered a misunderstanding. I asked Bing AI directly.

 Then I understood.

2.2 When you are not sure whether your program understands it correctly, you can ask Bing AI

For example, take me reading the Linux kernel source code as an example. If I am not sure whether the function call relationship I got below is correct, I can ask Bing AI to confirm it.

i2c_add_driver(&at24_driver)

    i2c_register_driver(THIS_MODULE, driver)

        driver_register(&driver->driver)

             bus_add_driver(drv)

                  klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers) puts the driver into klist_driver

                  driver_attach(drv)

                      bus_for_each_dev(drv->bus, NULL, drv, __driver_attach);

                         __driver_attach(struct device *dev, void *data)

                             driver_match_device(drv, dev);

                                 drv->bus->match ? drv->bus->match(dev, drv) : 1; 

                              driver_probe_device(drv, dev);

                                  really_probe(dev, drv);

                                      dev->bus->probe(dev); or drv->probe(dev)   
——————————————
Copyright statement: This article is an original article by CSDN blogger “Chen Hongwei”. Comply with the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement when reprinting.
Original link: https://blog.csdn.net/u013171226/article/details/131761869

Then I asked Bing AI

this is his answer

2.3 If there is a bug in program compilation, you can ask Bing AI

When I compile onnxruntime, as shown in the following blog:

Ubuntu cross-compilation (armv7_32-bit) onnx source code_cpu version_onnxruntime cross-compilation_Chen Hongwei's blog-CSDN blog

Several errors occurred when compiling the same C++ code after the GCC version was upgraded to 11.3_Chen Hongwei's Blog-CSDN Blog

I didn't encounter bugs the first time, but after I upgraded gcc, I found a lot of weird errors. I asked Bing AI directly and got the following results.

Guess you like

Origin blog.csdn.net/u013171226/article/details/132077427