After the last few months of hot takes over the new GitHub Copilot AI, I wanted to explain why I'm excited for it as a Python programmer.

GitHub Copilot is a new AI system created by OpenAI that writes code for you based on the programmer outlining their requirements. The aim is the AI will be able to turn your human sentences into fully-fledged lines of code.

You've seen the memes and jokes on how you spend very little time actually writing code.

None
Actual representation of time spent programming
None
Debugging the right way

Well maybe these memes may soon be redundant. There are many ways this AI solution could reduce the busy, grunt work of coding so you can focus on problem solving and optimising solutions. This isn't the same type of automation that has been predicted to replace labour workers. This is a productivity boost so you can work the normal 9–5 hours you were promised and avoid burnout from debugging late into the night.

The job is the same as before, which is to understand and then translate non-technical requirements into a technical solution. You're still telling it exactly what to do one step at a time by carefully choosing the most precise instructions in English for the machine to implement. If you are not clear or precise enough, both the AI and you will struggle to meet your end goal. As someone on Twitter put it — If your context/problem are unique, you will struggle with bugs in the current Copilot tech. And you will spend mental energy reviewing AI suggestions. You still need to be able to read, understand, deconstruct and execute code.

Autocomplete AI has been happening for some time now

This isn't the first autocomplete AI we've ever come across. Google and Kite have been working on autocomplete AI code for years. But GitHub Copilot isn't just an autocompletion tool, it tries to understand your requirements and turn them into code. We already have copywriting AI, hundreds of nocode options and have been translating human languages for decades. Translating programming languages isn't as far-fetched as it is an inevitable reality.

It's time we embraced this next step in AI coding and use it as a springboard into a future where we are even more productive when programming. This is an opportunity to make our jobs as programmers easier. We can stop writing repetitive boiler-plate code and focus our energies on scaling bigger and more sophisticated projects that require our human ingenuity.

Will this mean less skilled coders get into programming?

Just because the AI is writing the code, you still need to QA it and make sure it works. The art of coding isn't lost at all if anything your talent will be more important than ever. This type of technology removes some of the barriers of having to remember a lot of simple syntaxes and helps developers focus on the logic. This is something I personally find a pet peeve because memorising syntax isn't a reliable sign of competence as discussed in my course review for Datacamp. Even if that means Copilot AI is already good enough to complete Leetcode challenges and write answers to interview questions for you.

None

Picking Apart Stack Overflow; What Bugs Developers The Most?

And let's be honest, the promise of finding the code without ever leaving your IDE is pseudo code for "never have to visit StackOverflow again". We all use StackOverflow only now the solution is there without ever having to open the browser (potentially).

5 Benefits of GitHub Copilot for Python users

All programmers will benefit from Copilot but I feel there are the benefits Python users will appreciate the most.

Less time spent importing modules

None
How to use Python import

Particularly for Machine Learning projects, it all starts with importing a range of obscurely spelled modules from scikit-learn. Hopefully with such a tool we can type in "Run an Linear Regression model on this dataset", allowing us to focus on tuning the hyperparameters. It might feel cheap at first but scoring high on Kaggle will still require just as much fine tuning, feature engineering and creativity to maximise your pipeline.

Less time spent styling plot graphs

None
Headstart to Plotting Graphs using Matplotlib library

Am I the only one who thinks plot styling code looks ugly? Compared to more intuitive plot styling on Tableau, Excel and Google Sheet — seaborn and matplotlib can be painful to write. And the end result is still visually unattractive. It would be better for us to focus on how to present data than how to write code that presents data. Googling "how to add a trend line as a data point" is a waste of time when working on your Exploratory Data Analysis stage of your Data Science project.

Quicker Data Preprocessing

Data preprocessing is a significant part of Data Science. Cleaning data is an absolute grind and cannot be skipped if you want your models and math to work their magic on your dataset. Being able to clean your data is more about being methodological with attention to detail rather than creative and knowledgeable, making it a key candidate for Ai automation. We should really leave the feature scaling, outlier management and filling in the missing values to the machines.

Better documentation

None

As programming becomes more open sourced than ever before we need consistently good documentation. The reason why bad documentation in programming still exists is because it is a skill that takes valuable time and energy away from writing code. Maybe this will start a revolution of making really good documentation so that autocompletion tools like copilot are able to fill in the necessary bits.

Up to this point, there's not enough incentive to write good documentation all the time. Not every programmer is looking to monetise their documentation via Medium articles or is working on a personal open source project. The reality is programmers have very limited time to complete tasks for their internal stakeholders and clients and documentation isn't something they are being paid or assessed for. There's just not enough incentivisation.

By asking GitHub Copilot to generate code based on human language instructions we are training ourselves and the machine to write good documentation regularly. This makes the practice of documentation instinctive and a more integrated part of the programming process.

Less time building regex patterns

None
Regular Expressions in R — Part 1

All programmers use regexes but will admit complex regexes are painful to write and so just end up googling what they need. And if you're working in tandem with other coders, seeing a complicated regex by someone else is just mind boggling and hard to parse.

Regexes are really powerful but they're hard to read, hard to write with the kind of syntax that's difficult to just glance at and have a good idea of what it's trying to match. The worst thing is that in most cases it's not needed often enough to justify the pain of mastering it. There's been multiple attempts at making regex easier to write with mixed results so there's definitely a market for addressing it.

Given how much dirty data we will encounter working on Data projects, passing off regex patterns to Copilot sounds like a cracking deal. Here is an example of Github Copilot writing a regex of an email.

None

Artificial Intelligence helping programmers write more artificial intelligence was always a matter of time. I am ready to embrace change and adapt to a new exciting future.

Affiliate Promotion:

None

Have you heard of DataCamp Workspaces? The smart people at DataCamp have built Notebook templates for you to get up and running on your most common data projects across Python and R. Cut your workload in half by exploring what they have to offer.