The decision you should not hand to an AI
Say your AI coding tool is about to write the piece of code that decides what happens when a job has failed every retry and has nowhere left to go: log it and move on, page a human, or something else entirely. The code itself might be ten lines. Nothing about its size tells you whether you should be the one deciding what those ten lines actually do. That is a gap most engineers do not know exists…
Deciding what an AI tool should code for a failed job, such as logging or alerting a human, might seem like a simple task due to its size. However, it's crucial to remember that the decision behind the code is of utmost importance. The size of a task doesn't determine whether one should delegate it or make the decision themselves. There are four signs that indicate a decision should be made by the engineer rather than handed off to an AI tool. These signs include:
1. The decision involves sensitive information like credentials or security keys.
2. The decision is a genuine judgment call with significant tradeoffs and no test can settle the matter. It requires human judgment to make the right call.
3. The decision is architectural, meaning it's deeply embedded in the system and difficult to change once other code starts depending on the decision.
4. The engineer wants to understand the code themselves before it becomes something they need to supervise.
In the example of a failed job, the decision about where the record of that failure gets stored (in memory or on disk) is architectural in nature, but it doesn't depend on other parts of the system yet. That part is safe to hand off. However, deciding what an operator should do when that record shows up (like paging someone, retrying it manually, or just counting and moving on) involves tradeoffs and no test to settle it.
This decision, whether a task should be handed off at all, is a part of the same method called Course 0. It's not about the quality of what gets built or judged live inside the loop, but about making the right decisions before any coding even starts. This decision-making process is rarely taught directly, and skipping it can have costly consequences later on.
Course 0, which introduces this method, opened this week for $99. The course offers eight lessons, two hands-on labs, and ten written questions with feedback and unlimited retakes. It also includes three challenges on a small chat app, allowing learners to prove their understanding of decisions made by others.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.