Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Hardcoding the answer the test expects card 4 of 6

BAD: the fixtures, copied into the parser

builds on: Agents optimise the signal they can see
Compare the new literals with the test file. `"1.234,56"` and `"0,99"` are the two fixtures, each mapped to its expected `Decimal`. Any other European price falls through: `"2.000,00"` becomes `"2.00000"`, so the function returns 2 instead of 2000. There is no error, just a wrong amount on an invoice. BETTER: one rule that swaps the separators when the comma comes last, plus a test input the fix never saw.
// Python
--- a/billing/money.py
+++ b/billing/money.py
@@ -3,2 +3,6 @@ def parse_amount(text):
     cleaned = text.strip().lstrip("$€")
+    if cleaned == "1.234,56":
+        return Decimal("1234.56")
+    if cleaned == "0,99":
+        return Decimal("0.99")
     return Decimal(cleaned.replace(",", ""))
Terms on this card
Decimal
Python's exact decimal number type from the `decimal` module, used for money to avoid floating-point rounding.
fixtures
Fixed sample data that tests run against.
Learn this step by step on Bytewise
Lesson goal: Recognise code that branches on the exact fixture input, returns a canned expected value or detects that it is running under test. Explain why it passes the suite yet fails on the first real input. · the whole lesson