Github Copilot and Sentiment Analysis in 3 Minutes

This week the conditions aligned, and I got to use two new (to me) technologies: Vader Sentiment Analysis and Copilot. It was a fortuitous coincidence that these two technologies came together, as their combined power was able to break me out of my comfort zone and still be productive.

Wrote a simple sentiment analysis script in 3 minutes

Here is my problem: Every time I have to start a new analysis, I have to make a decision. Do I do the analysis in Python or in R? I start with Python, set up the IDE, install Anaconda, spend an afternoon configuring the environment. Then I start writing the code and I realize I could finish much faster in R. Switch to R and do my analysis there.

The reason for that is my familiarity with R. Although I used python in the past for scraping, my knowledge beyond what I used back then is fairly limited. I knew pandas had a data.frame for example, but I didn’t know it had json reading built in. I was going about analytics tasks like I would go about writing a normal program. Use the json library, open file for reading, read file, close file… In short I am not good at Python. R doing everything I need from Python, I wasn’t very motivated to learn either.

That is why copilot was such a game changer. Programming with copilot allowed me to bridge that gap. It was suggesting the right libraries and functions when I needed them. Suggesting eerily prescient code snippets just when you need them. It is incredible to see. Thanks to copilot my python code looks more elegant (I am sure it still looks like shit, but a more refined shit) and I managed to write a simple sentiment analysis script in record time.

Writing with copilot is like having someone lookup stack overflow answers as you code and put in the answers right there in your code block. Just like stack overflow, you need to learn to ask the right questions. It is a bit of a learning process, you learn to specify what you need better and copilot gets better at making suggestions.

The code it produces is by no means ready to use. It still suggests Joshua Hughes’ home folder every once in a while for file locations. I worry what it would mean for security if people just relied on the form fields generated by copilot. You need to know what you are doing to be able to use it. But it is obviously is a game changer. I can see it taking its place next to stack overflow and a good IDE as a tool of the trade today. Tomorrow, it may allow regular people to develop software without coding. I shudder to think what it means for all those office jobs that rely on moving numbers around in excel spreadsheets.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: