DEV Community

100DaysOfCode-io
100DaysOfCode-io

Posted on

Should you use ChatGPT for learning programming?

Here’s an experiment conducted by a MIT professor on the same topic: The Impact of AI on Computer Science Education

The TLDR of the experiment:

  • The group which used ChatGPT solved the problems quickest but couldn’t recall anything and all failed the memory test.
  • The group which used Google to solve took longest but they all passed the memory test.

Image description
(image generated using Dall-E)

If your goal is to truly learn, then I would recommend avoiding ChatGPT for solutions. You’ll learn nothing by simply looking at the solution given by ChatGPT. Breaking down the problem and then solving it yourself creates the learning process.

During my childhood, my parents and teachers didn’t allow me to use a calculator for solving math problems. I never used it and loved solving math problems and became good at Maths. Even though I can’t multiply 2 numbers in my head now, I believe not using a calculator has helped me in my learning journey. The multiplications I learned in childhood are not relevant to me today, but the learning process is invaluable.

Maybe the programming skills that you’ll learn now might be obsolete in a few years and everything is done by AI. But learning programming today will help you in obtaining the problem-solving skills that will be valuable in whatever direction the future is heading. So, let’s put more effort into our learning, take your time in understanding the concepts, and avoid relying 100% on AI.

Here’s my recommendation for your learning journey:

  • Attempt to solve problems on your own first, and then improve the solution using ChatGPT.
  • Try to solve the problems using multiple approaches. Understand why one approach is better than the other. Use ChatGPT to compare the approaches.

Top comments (1)

Collapse
 
aaronre16397861 profile image
Aaron Reese

As a 30 year coding veteran I use ChatGPT to
1) write simple code I know how to write but can't be bothered. GPT does it in a 10th of the time and gets it 90% correct.
2) write code that I know but in a language I don't. I can read and reason about the code generated to see if the underlying pattern is sound.
3) suggest refactoring for performance, maintenance or security

In all cases I would not deploy the code without a comprehensive review and understanding. I would do exactly the same with code delegated to a junior dev.
But I know what I'm doing, I guess the challenge is can you use it as a mentor to show you better ways to code.