当前位置:网站首页>Copilot - employee, your layoff notice has been delivered

Copilot - employee, your layoff notice has been delivered

2022-06-23 21:00:00 Four leaf flower

Experienced for a while Copilot, Let's talk about the feeling of using it .

What is? Copilot?

Copilot yes github A product based on AI Programming aids for , The popular expression is : Help you write code .

So when it was born , Many articles write :** Programmers are going to be laid off , Programmer development tools beat programmers ** That's what I'm saying . Is that really the case ? Let's take a look at what it provides :

  1. According to the code written , Autocomplete code This is the main function , According to the code written by the developer , Automatic completion of subsequent codes
  2. According to the notes written , Automatic incomplete code If the developer writes the comments first ,Copilot According to the semantics of annotations , Automatic code generation
  3. According to the code written , Generate test code automatically If the developer writes a login() Method , Write below test, Will automatically complete test_login() Related test code

The actual use

After reading the above several main function introductions , It feels really powerful . Don't talk much , Come and have a try .

Apply for the use of

because Copilot It's still in the testing phase , At present, you must apply to use . This is To apply for the address , After passing , I will inform you by email .Copilot Currently, the following three models are supported IDE, The corresponding warehouse address is :

Be careful , Required after installation github To login , Students who fail to pass the application will not be able to use it for the time being , So you must apply before using .

On

Because the author is Android Development , Here is to IDEA/AndroidStudio IDE,Java Examples of practical use of language , To illustrate the actual use .

Code hinting

Write TAG It will automatically prompt when , among The gray part is the code for the prompt

java Automatically generate code snippets .png
java Automatically add print fields .png

Comments are automatically prompted

When you write comments, you will automatically prompt , The first line is my comment , The second line is the prompt code :

java Comments automatically generate code .png

In addition to these , If the developer writes comments , Whether in Chinese or English , It will also automatically prompt the developer , So it's not just the code that it complements , It also contains comments, etc .

Too many examples , There are no more examples here . Overall, the experience is good , If the developer feels the prompt is wrong , You can use shortcut keys to switch between different prompts , And its hints are not static , As the number of uses increases , According to the usage habits of developers , Give different suggestions , Generally speaking, it conforms to AI The identity of the .

Other languages

Copilot At present, I am good at languages , except Java, It also includes Python、JavaScript、TypeScript、Ruby and Go, The others Not good at What about your language ?

Kotlin

kotlin Automatic code generation :

dart Auto write findview.png
kotlin Auto write adapter .png

Dart

dart Method parameter prompt .png
dart Automatic assignment .png
dart List Automatic conversion .png

in general , In other languages ,Copilot The tips are also excellent , You can use it safely and boldly .

principle

Copilot So strong , So how did it come true ? The official explanation is :

OpenAI Codex  Trained in open source and natural language , So it understands programming and human language .

GitHub Copilot  The Editor Extension sends your comments and code to  GitHub Copilot  service ,

 Then the service uses  OpenAI Codex  To compose and suggest individual rows and entire functions .

Let's be frank , It is based on the code written by the developer , A snippet of code written by the developer , Send to server , And then according to Github Open source code on , Give the best advice , Then return to the developer . The core of the principle is AI, as well as Github A lot of source code on Training data provided .

Safe hidden trouble

The above principle says ,Copilot Will send your code snippet to its server , Is there a potential safety hazard ? Let's take a look at its statement :

The developer's individual code snippets will not be shared with other users

https://docs.github.com/en/github/copilot/about-github-copilot-telemetry

Stored code snippets are encrypted , Including your url, Database address , Account password, etc :

https://docs.github.com/en/github/copilot/about-github-copilot-telemetry

Data access will be strictly restricted , Only the following members can access :

  1. stay GitHub Copilot Team or GitHub Designation of the work of the platform health team GitHub personnel ( Employees and contractors ) visit
  2. stay Azure Work on or with Azure Working together Microsoft personnel ( Employees and contractors ) and / or GitHub Copilot The team , as well as
  3. stay GitHub Copilot Working on OpenAI staff

https://docs.github.com/en/github/copilot/about-github-copilot-telemetry

in general , Data security is guaranteed . If you are in a sensitive position , Or in projects requiring less confidentiality , Better not to use , In this respect, it is best to align with the relevant policies of the developer company .

Last

Copilot In the process of experiencing , My strongest feeling is , It can intelligently help me prompt some template sample code , The template sample code is common IDE You can't do it .

I would like to call it The strongest code prompt tool , It can't replace developers to write code , It is a tool to help developers assist in programming .

and Copilot The original meaning of is also the meaning of the co pilot , As its description says :

You’re the pilot



With GitHub Copilot, you’re always in charge.
原网站

版权声明
本文为[Four leaf flower]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/12/202112281545012461.html