🤖 Can AI Make You a Smarter Programmer?

Cherlock Code 🔎 - Feb 16 '23 - - Dev Community

Exploring the potential of AI tools like ChatGPT in improving programming skills.


Breaking news:

ChatGPT has taken the world by storm!

Okay so not so much ‘breaking news’ anymore since everybody is talking about it.

And not just talking - they’re building like crazy! Since it was made public towards the end of 2022, almost overnight we’ve seen an influx of AI-driven apps designed to make our lives easier.

Most interestingly, are the people who have been using ChatGPT themselves to be more productive. From essay writing, to marketing, making social media posts and creating SEO content - ChatGPT can do it all.

All of this makes ChatGPT the best thing to hit the internet since, well the internet!

One of the most impressive uses of ChatGPT is its ability to churn out and explain code. It’s become a useful tool in every developer's pocket. A lot of devs are now wondering how they ever lived without it. They say their productivity has gone through the roof and they can build things in hours that once took days or even weeks.

But ChatGPT wasn’t the first AI revolution to hit the world of programming. Back in 2021, GitHub released beta access to their coding AI-assistant application called Copilot. They then released full access a year later in the summer of 2022.

Copilot can be used as a plugin for your IDE that will write code suggestions for you whilst you’re coding.

GitHub describes it as:

Your AI pair programmer

What’s important to note is that Copilot’s AI technology is driven by the OpenAI Codex. OpenAI is the mastermind company behind ChatGPT, so one can say that GitHub was on to something way before we knew anything about ChatGPT.

Copilot started the hype in the developer world of using AI for programming, and developers everywhere were raving about it. I was lucky enough to have beta access to try it out for myself (whilst it was free).

And just like everyone else, I was very impressed. However, when the trial was over, I decided not to upgrade and take on a subscription, and it had nothing to do with the price.

Why I stopped using AI for programming 📵

Although I was very impressed with copilot and found it very useful in many ways. I made the decision to let it go…for the time being.

My decision had nothing to do with the fact that I would have to start paying for it. In fact, I thought the subscription price of roughly £10 a month to be quite reasonable for what it offered.

My issue was that as an ever-growing dev, I was afraid that if I began to rely too heavily on using Copilot to write code for me, then this would hold me back from learning more important things myself.

I wanted to feel the struggle as I always had, learning through trial and error, and becoming a Google-Guru. I felt that the best way to learn was through failure and I didn’t want any shortcuts.

Then in came ChatGPT.

How I discovered the real benefits of using AI for programming ✅

So I stopped using Copilot. I uninstalled the plugin and carried on my way as I always had.

And a few months later ChatGPT was ‘born’. At first, I didn’t really pay much attention to it. Then suddenly I couldn’t avoid it.

Everyone was talking about it. My Twitter feed and YouTube algorithm were full of ChatGPT content, and I became massively intrigued, as I’m sure you were too.

My first thought and experiments with ChatGPT were mostly for writing. I wanted to see how I could use it to help me write content, both for this blog and on Twitter.

I then got massively into AI Art apps such as DALL-E and Midjourney. I even created my Twitter profile avatar and banner using DALL-E, but that’s another story.

I plan on writing a separate article about the awesomeness of AI Art apps in the future.

Anyways back to ChatGPT.

One day I had to complete a task of writing some documentation for a new application. Now I had never seen or used this application before. In fact, it was new, which was why they needed the documentation to guide others on how to use it.

I took a look at the code, and whilst some of it I understood, a lot of it I didn’t. This was because it was backend JavaScript and I’m mostly a frontend dev so I’m not always familiar with backend stuff.

My first thought, as it had always been, was to use Google. But after spending some time I knew it would take a long time to gather what I needed. Plus, I still needed to be able to explain properly what each function was doing.

It was then that I had the bright idea!

What if I asked ChatGPT?

So I fired it up, dropped in a block of code and asked ChatGPT to explain it to me.

To my surprise and delight, it explained it perfectly. I was able to understand what the code was doing. I mean, I had a rough idea, but ChatGPT confirmed this with clear and concise explanations that I don’t think I could have come up with on my own.

I was hooked.

From then on I used ChatGPT to explain everything I needed and even asked it add in the comments and JSdocs to the code itself and it did!

A simple example of this can be seen below:

Asking ChatGPT to write JSdocs

Now I know this is a very simple example, but one thing to point out here was my use of the words “send back as code”. By writing that, ChatGPT will know to send back the response in a code block that I could then easily copy and edit if needs be.

ChatGPT had officially saved me hours' worth of time.

It was then that I decided to embrace AI for programming and I reinstalled Copilot and signed up for a subscription.

Once I did that, I used Copilot to help with writing better suggestions for some of the stuff that I didn’t like or agree with what ChatGPT had given me.

Between the two apps, I had increased my productivity tenfold, plus I was learning so much along the way. ChatGPT’s explanations were teaching me about the code in the application I was working on in ways that would not have been as verbose with a Google search.

Whereas Copilot was coming up with the things I knew I had to write but would have taken a lot longer to figure out.

AI had indeed made me smarter: it made me work smarter.

How AI can make you a smarter programmer 🤓

If you’ve ever heard of the phrase “work smarter, not harder”, then this is exactly what I’m referring to here.

The best developers will often say that to be a good programmer you just need to be good at finding solutions, and this often involves using Google to the fullest to solve your problems.

For me, AI is a game-changer in this respect. Apps like ChatGPT and Copilot make it easier and faster to get to the solutions to your coding problems.

Some ways in which AI can make you a work-smart programmer:

  1. Code completion - ChatGPT can assist with code completion by suggesting lines of code based on your inputs and context. This can save time and improve the accuracy of your code.
  2. Debugging - ChatGPT can help with debugging by suggesting potential solutions to errors and bugs in your code.
  3. Automating repetitive tasks - AI can help with automating repetitive tasks such as code refactoring, which can save time and improve the overall quality of your code.
  4. Advanced programming - AI can also assist with more advanced programming concepts such as natural language processing and machine learning.
  5. Research Assistance - AI can also help with the research process by suggesting relevant papers, libraries, and other resources to help you further explore the topic you are working on.

So if you’re a new developer, don’t be like me and be afraid of using the technology to your advantage. Don’t think that if you use it then you could be stopping yourself from learning how to code.

Instead, use it as a tool to aid your learning. Get ChatGPT to explain the code and concepts you don’t understand. Use Copilot to fill in the gaps, but be careful and make sure you fully understand what it’s spitting back. Heck get ChatGPT to explain Copilot’s stuff if you’re not sure!

Work smarter, not harder.

But most importantly don’t stop learning.


From your fellow ever-growing dev,

Cherlock Code


💙 If you liked this article...

I publish a weekly newsletter to a community of ever-growing developers, seeking to improve programming skills, increase productivity and share knowledge within the exciting sectors of Tech, AI and Web3.

Get more articles like this straight to your inbox.

Let’s grow together 🌱

And stay in touch on 🐦 @evergrowingdev

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .