How To Use GitHub Copilot (with Python Examples)

preview_player
Показать описание
In this video, we'll be taking a look at GitHub copilot - which I think is potentially the most impressive software developer tool to be released in the past year.

We'll look at what GitHub co-pilot is, how you can use it, and then see some real examples using it Python for general programming, for data science and even for making a game.

00:00 What is GitHub Copilot?
02:02 Using GitHub Copilot with Python
05:57 Solving Leetcode
10:13 Visualizing stock market data
15:27 Building a Tetris game
23:21 Concerns about GitHub Copilot
25:14 Verdict

#github #copilot #python
Рекомендации по теме
Комментарии
Автор

I'm just starting with Copilot but I'm finding it very useful. I'm a recently retired programmer (40+ years experience) but I tend to do things 'my way'. Suggestions from Copilot often do things in ways I wouldn't normally do myself. Sometimes better, sometimes worse, but a chance to break out of the rut. Copilot is also great for whipping up a quick test routine to exercise code you've written - which means you're more likely to do it.

karlfimm
Автор

Many job descriptions require the developer to know multiple programming languages, frameworks, APIs, and other features. It takes a lot of time to study and understand all of these software technologies to even get your foot into the door for these jobs. Many positions require you to know a lot of details. For example, different web frameworks might require to achieve the same feature with different codes, they have different ways of approaching the fundamentally same functionality. For embedded systems developers, there are multiple different assembly languages, some with Intel syntax, others with ATT syntax, and also having different registers, and different ways for dealing with digital and analog input/output. Incredible details to master! When studying programming, you have to know the fundamentals, the key concepts. Yet at some point you have studied the concepts of programming, and the algorithms, and data structures ... you reach a point where all that you have to learn are more details about the code itself. You eventually reach a point where more studying will not give you any more in depth understanding, but it is only details that you have to memorize. So automatic programming tools such as GitHub Copilot would be very good for programmers, freeing the programmers from bothering themselves with all the details. It is required of a programmer to know the fundamentals of the programming discipline, and how the systems work, be it web development, embedded development, or phone apps development. But the details can be taken by the Copilot autoprogramming tool. It isn't humanly possible to study and absorb all the information in a reasonable amount of time. So we take care to study only the fundamentals, the main and supporting concepts, but leaving the details to the machine. It's like the principle of abstraction in programming. Like how high level languages and compilers free the programmers from having to hand code every feature in assembly languages. How general purpose logic units free programmers from implementing the algorithms in hardware logic gates, enabling the discipline of programming software to be used at all. So Copilot is the natural continuation of encapsulating low level details into the machine, enabling programmers to be more productive, at least theoretically. If compilers and general purpose logic units did this to the computer programming, Copilot and related autoprograming tools are doing this to what I call "metaprogramming", the process of programming itself, and learning programming. The Matrix movie teaches us, "never have a human do the job which should be done by the machine".

konstantinrebrov
Автор

My ear blown away from how hard this man hit his enter key

mintifu
Автор

I remember when the argument was using an IDE for typing code was cheating. Only use a plain text editor like notepad or vi they said. The tool doesn't do the job it helps you do the job.

Websitedr
Автор

Thanks for the examples.

It is making me a little lazier, for sure. I will be sad if it ever goes away. But I also have learned a lot of things that no one would have taught me; or I probably wouldn't have figured out on my own. Analyzing what it feeds me, and figuring out how it works is such a fun adventure every time.

DouglasFish
Автор

I rarely write comments, but I love the relaxing beat, the explanation, color of the video, and the examples. Thank you so much for this video it is really well polished.

christophertreadwell
Автор

I don't get why some devs are against this!
When you think about it, everybody uses stack overflow time to time when they are stuck!
GitHub copilot is simply saving you time that you would have spent googling the same things anyway! So, let not be hypocrites here!

The only use case where this might be really really bad, is if you're new to coding and still need to grasp important fundamental concepts of computer programming.
Because you need to be at least able to read and 100% understand the codes that GitHub copilot generate, otherwise you're just shooting yourself in the foot!

chris
Автор

I have struggled to use Copilot usefully. I usually try to use it via a comment prompt - like "filter a list foo for items where status is 'done'" and it doesn't output anything or it outputs too much unrelated code (even with such a simple prompt). However Chat-GPT is incredibly good at doing this. So I was watching this video to try and figure out how to employ it better, but I didn't see anything different from how I use it. I try to comment all my code to give it more context, and that helps a little.

RiderfBuffalo
Автор

This was a really helpful introduction to Copilot. Thanks!

kylerrasnick
Автор

I found useful to provide the contexts of what I intend to do to copilot by writing comments before trying to write any codes. So, I usually write comments, hit enter, then at the next line, copilot provides a code snippet sometimes the whole chunk, the other times, line by line. Then, I tweak the logic and refine coding style. I iterate this process repeatedly. It's definitely not perfect but I type a lot less nowadays to get the job done with the same level quality that I've been practicing for writing codes. It's definitely a great "assistance."

bgwg
Автор

As a Finance guy that has been using and learning Python on the side for the past 5 years. I have to say that using ChatGPT has made me use Python a lot more and has made me learn a lot quicker about the types of code I can use.

Shiffo
Автор

I haven't used it yet, but your video sure made a point towards me trying it! Thank you! ;)

JokerPW
Автор

It's very useful tools for me, I am a student of someone University, It really give me many greate recommend which will enhance my programing skill.

annacheng
Автор

Very cool and useful video! I am a novice in the programming game, this video shows me how copilot could help me broaden my skills .... sorta like a tutor who is available whenever I need it. Thanks for sharing. Flo

fsaforosaforo
Автор

Thank you for your video and the examples you have provided within!

davidkovar
Автор

Awesome! Thanks for sharing your insights!

Apple
Автор

It's a good trade-off, to have time for design and strategy

nkristianschmidt
Автор

I think it should be part of development as more time is spent in trivial tasks

ArchanaRaghupathy
Автор

Thank for the video. It was funny to hear "let's do a real problem, leetcode", kk.

cloudzeroexpert
Автор

This is a very good video indeed. Thanks

simonmescal