Understand the technology
Automation makes a repeatable decision or action executable. Safe scripts validate inputs, limit scope, handle errors and make results visible. Idempotency means repeated execution preserves the intended state rather than duplicate side effects. Begin with read-only analysis and a dry-run plan before considering write actions. Approval belongs at the meaningful boundary, not after an irreversible operation.
By the end, you should be able to
- Explain how the components below support the business need.
- Complete the scoped exercise and compare expected with observed results.
- Defend a decision using your own evidence and state its limitations.
- Variables and structured data
- Represent and validate inputs.
- Control flow
- Apply explicit conditions and error handling.
- Dry run and idempotency
- Preview changes and avoid duplicate effects.
- Least privilege
- Use only necessary access for the specific task.
See the connections
1. Synthetic input
Locate Synthetic input in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.
In your diagram, label the owner, input, output and a possible failure at this stage.
2. Validation
Locate Validation in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.
In your diagram, label the owner, input, output and a possible failure at this stage.
3. Dry-run decision
Locate Dry-run decision in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.
In your diagram, label the owner, input, output and a possible failure at this stage.
4. Approved action
Locate Approved action in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.
In your diagram, label the owner, input, output and a possible failure at this stage.
5. Result log
Locate Result log in the scenario. Explain how it depends on the other stages, using the supporting technologies above. State what you would test before trusting its result.
In your diagram, label the owner, input, output and a possible failure at this stage.
Practice: How do you prevent a useful script from making a broad unwanted change?
Northstar needs to identify stale fictional device records. The exercise must report candidates without deleting anything.
Supplied synthetic input
device,days_since_seen,owner
LAB-A,5,team_a
LAB-B,95,team_b
LAB-C,unknown,unknownDownload synthetic input · Download worksheet
Procedure
- Read the CSV and define stale as a numeric age greater than 90 days; unknown is a separate review state.
- Write pseudocode or Python that validates the header and each value.
- Generate candidate and review reports without editing the input.
- Run twice and compare results to check deterministic behavior.
- Test a missing column and a nonnumeric value; require a visible failure or explicit review result.
- Document a future deletion approval process, but include no delete operation in the lab.
Compare your reasoning and expected results
LAB-B is a candidate, LAB-C requires review and LAB-A is current under the supplied rule. The script performs no external action; a candidate is not authorization to delete.
Download the read-only Python example. Run it with the supplied Topic 22 CSV; inspect the code first.
Optional technical extension
Implement the report with Python csv.DictReader, output a new CSV and add cases for missing headers, empty input and invalid ages. Use only supplied synthetic data.
External-tool procedures are reviewed instructions, not claims of execution in every listed environment. Record your actual tool version, observations and deviations. See the verification record.
Best practices to verify
- Validate inputs and fail clearly.
- Prefer read-only and dry-run modes first.
- Avoid hard-coded credentials and broad privileges.
- Test repeat execution and failure paths.
For each practice, specify an owner, a verification test and the evidence that would show failure.
Vendors, projects and tools
| Vendor / project | What to investigate | Official reference |
|---|---|---|
| Python Software Foundation | Open-source Python runtime and CSV library | Documentation / product site |
| Microsoft | PowerShell documentation | Documentation / product site |
| Red Hat | Ansible automation documentation | Documentation / product site |
Selection criteria: fit to the requirement, support lifecycle, integration, security controls, learning access, licensing and total cost. Examples are not exhaustive. Commercial products may require paid licenses; community editions and free learning access do not imply free production use. No purchase is required for the core exercise.
Check your reasoning
Turn practice into career evidence
Role families to investigate: IT automation technician, Junior infrastructure engineer, Technical support analyst. These are search suggestions, not verified vacancies or a promise of job readiness. Requirements vary by employer.
- Search for these titles plus the supporting technologies in this lesson. Compare three current job descriptions and record repeated requirements.
- Map requirements to evidence you personally produced. Mark gaps honestly and plan one additional lab or supervised experience.
- Publish your original diagram, sanitized inputs, decisions and test record in your own repository after checking reuse rights. Link the relevant project in an application.
- Rehearse the interview question below, explaining what you did, what failed and how you verified the result.
How would you design a script so a malformed file cannot trigger unintended actions?
Resume pattern: “Independent lab project: investigated programming, scripting, and automation, documented [your specific action], verified [your actual result], and identified [a limitation].” Replace placeholders truthfully; do not imply employment or production implementation.
Start here: build your GitHub portfolio
This form sends nothing to a server. Browser storage can be cleared, blocked or shared with other users of this browser. Download a copy you want to keep. Do not enter sensitive information.
Continue with primary sources
Reference review date: December 1, 2026. Follow current vendor instructions and verify licensing before optional tool use. Product links establish context, not independent performance rankings.