Coding has been a part of my life since I was 10. From modifying HTML & CSS for my Friendster profile during the simple internet days to exploring SQL injections for the thrill, building a three-legged robot for fun, and lately diving into Python coding, my coding journey has been diverse and fun!

Here’s what I’ve learned from various programming approaches.

The way I learn coding is always similar; As people say, mostly it’s just copy-pasting.

When it comes to building something in the coding world, here’s a breakdown of my method:

  1. Choose the Right Framework or Library
  2. Learn from Past Projects
  3. Break It Down into Steps
    Slice your project into actionable item steps, making development less overwhelming.
  4. Google Each Chunk
    For every step, consult Google/Bing/DuckDuckGo/any search engine you prefer for insights, guidance, and potential solutions.
  5. Start Coding
    Try to implement each step systematically.

However, even the most well-thought-out code can encounter bugs. Here’s my strategy for troubleshooting:

1. Check Framework Documentation: ALWAYS read the docs!

2. Google and Stack Overflow Search: search on Google and Stack Overflow. Example keyword would be:

site:stackoverflow.com [coding language] [library] error [error message]

site:stackoverflow.com python error ImportError: pandas module not found

– Stack Overflow Solutions: If the issue is already on Stack Overflow, I look for the most upvoted comments and solutions, often finding a quick and reliable answer.
– Trust My Intuition: When Stack Overflow doesn’t have the answer, I trust my intuition to search for trustworthy sources on Google; GeeksForGeeks, Kaggle, W3School, and Towards Data Science for DS stuff 😉

3. Copy-Paste the Code Solution

4. Verify and Test: The final step includes checking the modified code thoroughly and testing it to ensure it runs as intended.

And Voila you just solve the bug!

Photo by Stephen Hocking on Unsplash

Isn’t it beautiful?

But in reality, are we still doing this?!

Lately, I’ve noticed a shift in how new coders are tackling coding. I’ve been teaching how to code professionally for about three years now, bouncing around in coding boot camps and guest lecturing at universities and corporate training. The way coders are getting into code learning has changed a bit.

I usually tell the fresh faces to stick with the old-school method of browsing and googling for answers, but people are still using ChatGPT eventually. And their alibi is

“Having ChatGPT (for coding) is like having an extra study buddy -who chats with you like a regular person”.

It comes in handy, especially when you’re still trying to wrap your head around things from search results and documentation — to develop what is so-called programmer intuition.

Now, don’t get me wrong, I’m all for the basics. Browsing, reading docs, and throwing questions into the community pot — those are solid moves, in my book. Relying solely on ChatGPT might be a bit much. Sure, it can whip up a speedy summary of answers, but the traditional browsing methods give you the freedom to pick and choose, to experiment a bit, which is pretty crucial in the coding world.

But, I’ve gotta give credit where it’s due — ChatGPT is lightning-fast at giving out answers, especially when you’re still trying to figure out the right from the wrong in search results and docs.

I realize this shift of using ChatGPT as a study buddy is not only happening in the coding scene, Chatgpt has revolutionized the way people learn, I even use ChatGPT to fix my grammar for this post, sorry Grammarly.

Saying no to ChatGPT is like saying no to search engines in the early 2000 era. While ChatGPT may come with biases and hallucinations, similar to search engines having unreliable information or hoaxes. When ChatGPT is used appropriately, it can expedite the learning process.

Now, let’s imagine a real-life scenario where ChatGPT could help you by being your coding buddy to help with debugging.

Scenario: Debugging a Python Script

Imagine you’re working on a Python script for a project, and you encounter an unexpected error that you can’t solve.

Here is how I used to be taught to do it — the era before ChatGPT.

Browsing Approach:

  1. Check the Documentation:

Start by checking the Python documentation for the module or function causing the error.

For example:
– visit https://scikit-learn.org/stable/modules/ for Scikit Learn Doc

2. Search on Google & Stack Overflow:

If the documentation doesn’t provide a solution, you turn to Google and Stack Overflow. Scan through various forum threads and discussions to find a similar issue and its resolution.

StackOverflow Thread

3. Trust Your Intuition:

If the issue is unique or not well-documented, trust your intuition! You might explore articles and sources on Google that you’ve found trustworthy in the past, and try to adapt similar solutions to your problem.

Google Search Result

You can see that on the search result above, the results are from W3school – (trusted coding tutorial site, great for cheatsheet) and the other 2 results are official Pandas documentation. You can see that search engines do suggest users look at the official documentation. 😉

And this is how you can use ChatGPT to help you debug an issue.

New Approach with ChatGPT:

  1. Engage ChatGPT in Conversations:

Instead of only navigating through documentation and forums, you can engage ChatGPT in a conversation. Provide a concise description of the error and ask. For example,

“I’m encountering an issue in my [programming language] script where [describe the error]. Can you help me understand what might be causing this and suggest a possible solution?”

Engage ChatGPT in Conversations

2. Clarify Concepts with ChatGPT:

If the error is related to a concept you are struggling to grasp, you can ask ChatGPT to explain that concept. For example,

“Explain how [specific concept] works in [programming language]? I think it might be related to the error I’m facing. The error is: [the error]”

Clarify Concepts with ChatGPT

3. Seek Recommendations for Troubleshooting:

You ask ChatGPT for general tips on troubleshooting Python scripts. For instance,

“What are some common strategies for dealing with [issue]? Any recommendations on tools or techniques?”

Using ChatGPT as coding buddy

Potential Advantages:

Possible Limitations:

Now let’s talk about the cons of relying on ChatGPT 100%. I saw these issues a lot in my student’s journey on using ChatGPT. Post ChatGPT era, my students just copied and pasted the 1-line error message from their Command Line Interface despite the error being 100 lines and linked to some modules and dependencies. Asking ChatGPT to explain the workaround by providing a 1 line error code might work sometimes, or worse — it might add 1–2 hour manhour of debugging.

ChatGPT comes with a limitation of not being able to see the context of your code. For sure, you can always give a context of your code. On a more complex code, you might not be able to give every line of code to ChatGPT. The fact that Chat GPT only sees the small portion of your code, ChatGPT will either assume the rest of the code based on its knowledge base or hallucinate.

These are the possible limitations of using ChatGPT:

This scenario showcases how ChatGPT can be a valuable tool in your coding toolkit, especially for obtaining personalized guidance and clarifying concepts. Remember to balance ChatGPT’s assistance with the methods of browsing and ask the community, keeping in mind its strengths and limitations.


Final Thoughts

Things I would recommend for a coder

If you really want to leverage the autocompletion model; instead of solely using ChatGPT, try using VScode extensions for auto code-completion tasks such as CodeGPT — GPT4 extension on VScode, GitHub Copilot, or Google Colab Autocomplete AI tools in Google Colab.

Auto code completion on Google Colab

As you can see in the screenshot above, Google Colab automatically gives the user suggestions on what code comes next.

Another alternative is Github Copilot. With GitHub Copilot, you can get an AI-based suggestion in real-time. GitHub Copilot suggests code completions as developers type and turn prompts into coding suggestions based on the project’s context and style conventions. As per this release from Github, Copilot Chat is now powered by OpenAI GPT-4 (a similiar model that ChatGPT is using).

Github Copilot Example — image by Github

I have been actively using CodeGPT as a VSCode Extension before I knew that Github Copilot is accessible for free if you are in education program. CodeGPT Co has 1M download to this date on the VSCode Extension Marketplace. CodeGPT allows seamless integration with the ChatGPT API, Google PaLM 2, and Meta Llama.
You can get code suggestions through comments, here is how:

You can also initiate a chat via the extension in the menu and jump into coding conversations 💬

As I reflect on my coding journey, the invaluable lesson learned is that there’s no one-size-fits-all approach to learning. It’s essential to embrace a diverse array of learning methods, seamlessly blending traditional practices like browsing and community interaction with the innovative capabilities of tools like ChatGPT and auto code-completion tools.

What to Do:

What Not to Do:

Let me know in the comments how you use ChatGPT to help you code!
Happy coding!
Ellen

Let’s Connect

🌐 Follow me on LinkedIn
🚀 Check out my portfolio: liviaellen.com/portfolio
👏 My Previous AR Works: liviaellen.com/ar-profile
☕ or just buy me a real coffee ❤ — Yes I love coffee.

About the Author

I’m Ellen, a Machine Learning engineer with 6 years of experience, currently working at a fintech startup in San Francisco. My background spans data science roles in oil & gas consulting, as well as leading AI and data training programs across APAC, the Middle East, and Europe.

I’m currently completing my Master’s in Data Science (graduating May 2025) and actively looking for my next opportunity as a machine learning engineer. If you’re open to referring or connecting, I’d truly appreciate it!

I love creating real-world impact through AI and I’m always open to project-based collaborations as well.

The post How Would I Learn to Code with ChatGPT if I Had to Start Again appeared first on Towards Data Science.