← AI for Builders (free course)

Module 02Free

Writing Technical Instructions That Actually Work

State the language and version, describe inputs and outputs precisely, and ask for explanations.

01

Teaching content

Module goal

Turn vague coding requests into precise ones that return code you can test and defend.

Lesson 1What a strong technical request includes

  • State the exact language, framework and version. “Write a function in Python 3 using only the standard library, no external packages” beats “write a function in Python.”
  • Describe inputs and expected outputs precisely, with an example if you can.
  • Mention constraints that matter for your environment: performance limits, existing code style, libraries already used in the project.
  • Ask it to explain, not just generate. “Explain what each part does” turns a black box into a learning opportunity.

Real-life example: Ama is building a web form for her course project. Weak: “Write code to validate a phone number.” Strong: “Write a Python function called validate_ghana_phone that takes a string and returns True if it matches a valid Ghanaian mobile number format (starting with 0, 10 digits total), False otherwise. Include 3 example test cases and a one-line comment explaining the regex pattern.” The second gives Ama code she can understand, test and defend.

def validate_ghana_phone(number: str) -> bool:
    # 0 followed by exactly 9 more digits = 10 digits total
    import re
    return bool(re.fullmatch(r"0\d{9}", number.strip()))

print(validate_ghana_phone("0554646762"))  # True
print(validate_ghana_phone("554646762"))   # False
print(validate_ghana_phone(""))            # False
A result you can read, test and explain — including the empty-string edge case.
02

Practical task

Rewrite one technical request

  1. 1.Take a coding task from your current studies or a project.
  2. 2.Write a vague version of the request and run it.
  3. 3.Rewrite it with language/version, exact inputs and outputs, and a request to explain the logic.
  4. 4.Compare the two results side by side.
03

Knowledge Check

Question 1 of 5

Why specify the exact language, framework and version?

04

Mark your progress