Practical AI and future skills

Tina Huang: Explain and Change One AI-Generated Function

Can I explain and change a small piece of AI-generated code, rather than only get it to run?

Self Growth Lessons
Choose, practice, reflect

A practical learning exercise

The Lesson

You ask an AI to build a small script. It runs, and the result looks right. Then you try a different input and the script does something unexpected. You do not know which part to change because you never worked out what the code meant.

In her September 2023 self-study article, Tina Huang distinguishes consuming technical lessons from implementing them. She recommends beginning a project after learning enough to start, then studying the specific gaps you encounter. She also says that using AI tools should come with understanding the logic. Her creator links identify her work in AI, coding, careers and self-study.

That gives us a useful learning question: what can you now explain and change? A finished-looking output is one sign of progress. Being able to describe its behavior and adjust a requirement is a different sign.

Choose a task small enough to inspect. For example, a function could take a list of fictional practice-session lengths and return the total. It does not need a dashboard, a database or a connection to your accounts. The point is to learn what the input, processing and output mean.

Before asking for code, work out an example yourself. For session lengths of 10, 15 and 5 minutes, the total is 30. Ask for a short function and a plain-language explanation of how it handles that example. Read the code alongside the explanation. Mark any line you cannot describe.

An explanation from the same assistant is still something to check. Trace the example through the function: what value exists before the first step, what changes after each step, and what gets returned? If a word or operation is unfamiliar, consult the relevant language documentation or ask a focused question. You do not have to learn the whole language to investigate one gap.

Next, change the requirement. Perhaps you want the number of sessions as well as the total. Predict what should happen for your example before accepting a revised function. Then check a second example, such as an empty list. Decide what that should mean for this exercise instead of leaving the decision hidden in generated code.

This practice does not establish that the script is ready for real users. It makes your own learning observable. You can see where you understand the logic and where you still depend on a generated explanation.

Huang’s AI App Sprint page also discusses troubleshooting and engineering considerations in building with AI. Its workshop promises are the provider’s marketing; completing this small practice carries no promised timeline or career outcome.

Reflection

  • Which line of the generated code can I explain in my own words?
  • Which line am I accepting because the assistant sounds confident?
  • What result do I expect before I run the example?
  • What small change would reveal whether I understand the function?

Practice

Original SelfGrowthVideos exercise: predict, explain and change. This is our learning exercise, not Tina Huang’s named framework.

  1. Pick a small calculation or text operation. Use invented, non-sensitive inputs.
  2. Write one input and its expected output by hand. For the practice-session example, list the lengths and add them yourself.
  3. Ask an AI for a short function in a language you are learning, with no external services, plus an explanation. If you are not ready to run code, trace it on paper first.
  4. Explain the function back in your own words. Mark the first place where your explanation becomes vague.
  5. Study that one gap. Use the language’s official documentation to check the operation, and revise your explanation.
  6. Add one requirement, such as returning both total minutes and session count. Predict the new output before requesting a change.
  7. Compare the original and revised function. Identify which lines changed and why. Try one ordinary input and one edge case whose expected behavior you have chosen.

Keep a short note: “I can now explain ___; I still need to understand ___.” That is a more useful record than simply counting generated scripts.

Review

At your next check-in, return to the function without its generated explanation. Describe what it does and make a different small change.

If you get stuck, name the precise missing concept. Use it to choose the next lesson or documentation section. You can reduce the task’s size and continue learning without treating the difficulty as a verdict on your ability.

Go Deeper

Sister brand · Vacation Club Promo

All-inclusive resort stays from $435

Qualified couples: promotional Mexico and Caribbean packages at real resorts. Short presentation during your stay — enjoy the rest of the trip.

Qualifications apply · presentation during stay · no purchase required

Subscribe YouTube Suggest