Showing Your Judgment When You Use AI Coding Tools
By STEADYWRK Team
Give a reviewer a small project they can run and a decision they can inspect. An AI coding assistant may help write the first version; your portfolio should show how you turned that version into a defined, tested result.
Here is a compact exercise: turn a location record into a display label without inventing missing information. It is deliberately small enough to explain during an interview. Use synthetic inputs throughout.
Start with a miniature README
Create a file named README.md beside the implementation. Replace the bracketed notes with facts about your project:
Project: Location label
Reader: Someone reviewing an address before publication
Input: An object with non-empty city and country strings
Output: A trimmed "city, country" label
Failure: Missing, blank or incorrectly typed fields raise an error
Run: node demo.mjs
My contribution: [the decisions and code I wrote or revised]
Assistant contribution: [the suggestions I used and checked]
Known limit: Formats supplied text; does not verify a real location
The last line defines what the program does. A formatted label should never be presented as a successful geographic lookup.
Make the input and output repeatable
Save this example as demo.mjs. It uses built-in JavaScript features and makes no network request:
function locationLabel(input) {
if (!input || Array.isArray(input) || typeof input !== 'object') {
throw new Error('Expected a location object');
}
const fields = ['city', 'country'];
for (const field of fields) {
if (typeof input[field] !== 'string' || !input[field].trim()) {
throw new Error(`Missing or invalid ${field}`);
}
}
return `${input.city.trim()}, ${input.country.trim()}`;
}
console.log(locationLabel({ city: ' Aqaba ', country: 'Jordan' }));
// Expected output: Aqaba, Jordan
try {
locationLabel({ city: 'Aqaba', country: '' });
} catch (error) {
console.log(error.message);
// Expected output: Missing or invalid country
}
Add a small test table to the README and record what your version actually produced: