← Back to list

Learning New Coding Concepts with AI (beginner)

In week 6 of CS50P, I encountered a big problem (at least for me, it was). I didn’t know how to solve the problem, and the tools I was…

Zohralearnzz · 2026-04-21 04:01 · 0 claps · 2.2 min read
#cs50 #python #learning-to-code #lessons-learned #ai-learning
Open on Medium ↗
Wiki topics: AI · AI · General EDU · Education & Learning 💻 · Programming

Learning New Coding Concepts with AI (beginner)

In week 6 of CS50P, I encountered a big problem (at least for me, it was). I didn’t know how to solve the problem, and the tools I was using were not solving it. I had to read names from one file and update another file as the first and last name. In previous problems, I was using reader and then a list to read things, but now, if I had used the same way, it would have been hard to split the name and also a bit inconvenient to call that index as index[0].split", ". Whereas with dictreader, it’s going to give me a dictionary of the data as keys and values. I can use its key name to split it as row["name"].split(", "), much easier to read and an optimized option compared to reading and then listing.

try:
        with open(before_csv) as infile:
            with open(sys.argv[2], "w") as outfile:
                reader = csv.DictReader(infile)
                writer = csv.DictWriter(outfile, fieldnames=["first", "last", "house"])
                writer.writeheader()
                for row in reader:#explain?
                    last, first = row["name"].split(", ")#why lastg is coming before first?
                    writer.writerow({"first": first, "last": last, "house": row["house"]})
except FileNotFoundError:
        sys.exit(f"Could not read {sys.argv[1]}")

So, the question is: how did I find these dictwriter, dictreader, and stuff? If you said AI, then you are right. It was Claude who wrote the code. It was him who wrote the solution and told me what it is and how to use it.

If I had done it myself, it would have taken me 2 hr or more, on the contrary this way has taken me 30 min. I have learned what I have used, how I’m using it, why I’m using it, and how it’s working under the hood. In just 30 min, but how? Well, same old advice you have been getting from others: Ask AI how it’s working. Trust me, this works wonders, but with some cautions.

Here’s my way of doing it:

After the correct code is written by AI, you follow these steps:

  1. Ask it to explain it line by line.
  2. Ask why we are using this and not something else.
  3. Ask how this line of code works with the line above/below.

Explain what you have learned in your own words (you might find things that you don’t understand) and repeat the cycle until you can explain the following:

  • What you have done?
  • Why you have used certain libraries, tools, and not others?
  • How all this syntax works under the hood, and what output it gives?
  • What this syntax gives you back (output)

However, this should not be your everyday go-to pattern; it should be do it yourself → ask AI for hints → use this technique. You should only move to the next stage if you have failed this stage.

Lastly, I want to say using AI will not make you dumb, but how you use it will. Be cautious: in the stage of asking questions, ask every dumb question. Ask it until you understand it fully and able explain it in your own words. This is the most significant part (never skip this). Hope this helps ^_^


메타데이터
post_id
8c53d8a79f77
slug
learning-new-coding-concepts-with-ai-beginner-8c53d8a79f77
url
https://medium.com/@zohralearnzz/learning-new-coding-concepts-with-ai-beginner-8c53d8a79f77
canonical_url
https://medium.com/@zohralearnzz/learning-new-coding-concepts-with-ai-beginner-8c53d8a79f77
author_url
https://medium.com/@zohralearnzz
status
ok
fetched_at
2026-07-11 03:00:40