Skip to main content
AIDevOps
  • Learn
  • Learning Paths
  • Practice
  • Open Source
  • Books
  • Engineering

    AI DevOpsThe full map of building and operating AI servicesLLMOpsLLM deployment · evaluation · observabilityHands-on ProjectsBuild AI Agent projects

    Knowledge

    DocsTechnical documentationBlogEngineering articlesPloggerDevelopment log feed

    Validate

    Certification3-level skills certification · coming soon
AI Models
LlamaTutorial|MistralTutorial|GemmaTutorial|DeepSeekTutorial|QwenTutorial
🧠 AI Core
AI Intro & RoadmapML FundamentalsLLM Fundamentals|Python AIC++|PyTorchTensorFlowJAX
🤖 AI Applied Development
Applied AI Intro & RoadmapHugging FaceLangChainLlamaIndexLLMOps|LangGraphMCPMulti-AgentAgent Evaluation
🧠 AI Agent Development
Finance AI AgentLLM API ServerStock Investing AgentAIOps AI AgentEducation AI AgentCoding AI Agent
🌱 Spring Cloud
Spring Intro & RoadmapSpring Cloud GatewaySpring BootJava|Spring AISpring SecuritySpring BatchSpring JPA
🐳 DevOps
DevOps Intro & RoadmapLinuxDockerCI/CD|Kubernetes BasicsK8s AdvancedPrometheusGrafana
🧱 Infrastructure
Infrastructure Intro & RoadmapNginxRedis
☁️ Cloud
Cloud Intro & RoadmapAWSGCPAzureNCPCloudflare
🎨 Frontend
Frontend Intro & RoadmapJavaScriptTypeScript|ReactNext.js|VueNuxt|Electron
📱 Mobile
Mobile Intro & RoadmapKotlinAndroidFlutter
⚙️ Backend
Backend Intro & RoadmapPython BasicsFastAPIDjangoFlask|CGoGinNode.js
💾 Database
DB Intro & RoadmapCore SQLOracleMySQLPostgreSQL|MongoDBVector DB
🧪 Testing
k6JMeternGrinder
AIDevOps

Engineering AI. From Code to Production.
An engineering learning platform for building and operating AI and AI Agents

Learn

  • All Guides
  • Learning Paths
  • AI Tutorial
  • Practice
  • Books

Resources

  • AI DevOps
  • LLMOps
  • Hands-on Projects
  • Docs
  • Blog
  • Plogger
  • Open Source
  • Certification (coming soon)

Start Here

  • AI Core Roadmap
  • AI Applied Development Roadmap
  • Spring Cloud Roadmap
  • DevOps Roadmap
  • Infrastructure Roadmap

 

  • Cloud Roadmap
  • Frontend Roadmap
  • Mobile Roadmap
  • Backend Roadmap
  • Database Roadmap
© 2026 AIDevOps. All rights reserved.
Terms of ServicePrivacy PolicySitemaptestforge.kr
  1. Home
  2. AI Tutorial
  3. The Smithy's Apprentice

Quest 06 · Developers

The Smithy's Apprentice

Visitors

How to ask an AI for code, and how to check the code you get

Time
6 min
Max XP
100
Skill earned
Writing · reviewing code with AI
1 / 5
0 XP

The smithy ledger

Client

I run the smithy. I add up order totals by hand and get them wrong far too often. Could you make a Python function that calculates the total?

Client

Each item in an order has a price in cents and a quantity, and regular customers get a coupon for 0 to 50% off. Anything below one cent is rounded to the nearest cent, with half a cent rounding up.

Hanna

The developer requests start here. Code is a request too. Everything you learned in request 1 still applies.

Summary

What this request teaches

If the code an AI wrote works on one example, are you done? Through the smithy's order ledger, learn what to give when you ask for code, how to check it with tests, and how to point at exactly what to fix.

Show the key points (best read after finishing the request)
  • Code is a request too. Give the language and version, the shape of input and output, the rules, and the error handling.
  • Ask for tests along with the code. What the code must keep to stays behind as code.
  • Passing a few examples does not make code correct. Run it yourself with edge values and real data.
  • When you find a bug, add a failing test first, then ask for a fix with the expected result and what to keep.
  • Do not take large code in one go; hand work over in pieces you can read and understand. Do not put in code you do not understand.
  • Check your policy before pasting API keys, passwords, or private company code into an outside AI service (request 3).

Try it yourself

Pick a function you wrote recently (with secrets removed) and paste it into an AI with the request below. Actually running the tests you get is part of the exercise.

Write tests for the [language] function below.
- Include at least one each of normal input, empty input, edge values, and invalid input.
- Add one line per test saying what it checks.
- If you think there is an input where this function could be wrong, tell me separately.

[paste the function here]

Learn more

  • Python — syntax and the standard library →
  • pytest — checking code with tests →
  • Back to the request board →