Github Copilot helped me understand my own code

Back

I've been using Github Copilot for a few months now, and it's been a great experience. Not only can it help you write code faster and more efficiently, but it can also help you understand your own code.

A while back I started working on a new API Framework for Imba and Nodejs, this was before I was given access to Github Copilot. I was able to get most of the functionality working, but the code wasn't as clean as it should have been.

When I finally got access to Github Copilot, I started using it to write code for some of the missing features in my Framework.

One morning, I found myself trying to re-write the "not so clean" code for the caching feature in my Framework but I couldn't understand my code at first. So, I asked Github Copilot to explain the code:

# what does the code above do?

Github Copilot replied:

# it checks if the file exists, if not it creates the directory and the file
# if the file exists it checks if the file is the same as the config object
# if not it overwrites the file with the config object

TL;DR

Github Copilot can help you understand your own code or other people's code, all you have to do, is just ask.


You can find the source code of my Framework here.

© Donald Pakkies.
github