AIYINGFrom AI Awareness to Accomplishment

Thursday, November 19, 2026

The Script That Passed Once — How to Test AI-Generated Code | Unlearn This. Start Learning This. #002



Ravindra Dastikop with ChatGPT

The situation

Every Friday, you combine sales figures from several spreadsheets. You ask AI to write a script that does it for you. You run it on last week’s files, and the total looks right. Would you trust it next Friday?

The old habit

When we learned to code, getting a program to run was a milestone. It’s easy to carry that habit into everyday work and treat the first successful run as proof that the job is done.

Unlearn this

Stop writing every line of routine code yourself by default. Describe the output you need, give AI a small sample, and let it draft the script.

Start learning this

Practise defining what correct means before you run the code. If the same sale ID appears in two files, should the script count it once, count it twice, or flag it for review? Find out what a repeated ID means in your workflow. Then turn that decision into a test.

Try it once

  1. In your first sample spreadsheet, enter sale A101 for ₹1,000 and sale A102 for ₹500.
  2. In the second spreadsheet, enter the same A101 for ₹1,000.
  3. For this exercise, assume a repeated ID represents the same sale. Before running the script, write down the expected total of ₹1,500.
  4. Run the script on both files. If it reports ₹2,500, it counted A101 twice. The script ran successfully, and your test caught the wrong result.

How will I know I am learning this?

I can design a small test, predict the correct result, and explain why a plausible-looking output is wrong. On the next script, try writing the test case and expected result before asking AI to draft any code.

AIYING · Accomplishing with AI

No comments:

Post a Comment

Accomplish with AI

Powered by Blogger.

Featured post

Unlearn This. Start Learning This. | Hands-On AI Training for Schools, Colleges, and Corporates

AIYING · WORKSHOP ANNOUNCEMENT By Ravindra Dastikop We were taught to study worked examples, write code, and draft client replies...

Search This Blog

List of blogs

Search This Blog

About

Translate

Instant Stories

Read in Your Language

Test

share this

ShareThis

Popular Posts

Continue exploring AIYING

Explore another case study, practical lab, or learning pathway.