Evaluating AI Coding Models with a Desktop Batch Audio/Video Extraction Tool

    This article presents a practical engineering evaluation of AI coding models using a desktop batch audio/video extraction tool as the test case. It explains how to turn a vague experience question into verifiable acceptance criteria, design prompts that expose hidden constraints, and review generated code for structure, boundary safety, and runtime behavior. It also examines key details such as decoupling long-running tasks from the UI event loop, detecting external dependencies, handling path safety, preventing output overwrites, and providing progress and error feedback. The result is a reusable checklist for judging whether model-generated desktop code is actually runnable, maintainable, and safe at the edges, rather than merely impressive at first glance.

    1. Evaluation Context: Benchmark Scores Are Not Engineering Validation

    The capabilities of AI coding models cannot be judged by public benchmark scores alone. Coding benchmarks can reflect a model’s relative performance on algorithm problems, completion tasks, and some engineering problems. However, a real desktop tool involves the UI event loop, background tasks, the file system, external dependency detection, exception recovery, and cross-platform differences. If any one of these areas is handled poorly, the result can be code that looks complete but is unusable at runtime. A more reliable approach is to provide a comprehensive task with clear acceptance criteria and observe whether the model can implement functional requirements, non-functional constraints, and boundary conditions at the same time.

    This article uses a desktop batch audio/video extraction tool as a sample task. The task is moderate in size, but it covers common real-world difficulties for AI coding models: multi-file input, format selection, recursive directory scanning, background conversion, progress feedback, error messages, output naming conflicts, and external transcoder detection. It tests both the completeness of code generation and the model’s sensitivity to engineering details.

    2. Turning Experience Questions into Acceptance Criteria

    To make an evaluation reproducible, the first step is to turn “does it feel good to use” into checkable requirements. At the functional level, the tool should support importing common video files; exporting mainstream audio formats; displaying a file list; providing input and output format settings; offering start conversion, cancel task, and exit operations; and allowing the output directory to be configured. At the non-functional level, the UI must not freeze during conversion; the progress bar and status bar must update continuously; a single file failure must not interrupt the entire queue; error messages must be locatable; output files with the same name must not be silently overwritten; recursive scanning must have boundary controls; and missing external transcoding components must be reported in advance.

    Among these constraints, “the UI must not freeze” is one of the clearest ways to distinguish the quality of a generated solution. Putting time-consuming conversion directly inside a UI event handler may produce short code, but it blocks the main thread and causes the window to become unresponsive. The correct approach is to place conversion tasks in a background worker and send progress, errors, and completion states back to the UI thread through a thread-safe event queue. Whether the model proactively adopts this structure is an important observation point for evaluating its engineering awareness.

    3. Prompt Design: Making Implicit Constraints Explicit

    High-quality generation results often come from high-quality constraints. A prompt should not merely say “build a batch conversion tool.” It should specify the language and UI framework category, platform assumptions, feature list, exception handling requirements, UI layout requirements, progress and status requirements, output naming rules, dependency detection requirements, and code delivery format. The model can also be asked to first provide a module breakdown, then output the implementation, and include run instructions and an acceptance checklist.

    In a highly constrained planning mode, the model will usually decompose the task first: the UI layer handles the list and controls, the task layer handles queues and scheduling, the conversion layer handles calls to external transcoding capabilities, and the utility layer handles paths, formats, and naming. This kind of layering is easier to maintain than stacking everything in a single file. It is important to note that the more specific the prompt, the more necessary it is to avoid conflicting requirements. For example, if the prompt requires “automatic recursive scanning” and also requires “the user must confirm each file before conversion,” the priority must be made explicit. Developers should write acceptance criteria as actionable clauses rather than vague adjectives.

    4. Reviewing Generated Results: Syntax Passing Is Only the Beginning

    After code is generated, the first review round should focus on structure and boundaries, not just whether syntax validation passes. Syntax validation passing means the code is formally correct, but it does not mean the runtime environment is complete, dependencies exist, or exception paths are safe. The review should include: whether the entry point is clear; whether UI control states change with the task; whether background tasks can be cancelled; whether the queue limits concurrency; whether errors are caught and reported; whether temporary files are cleaned up; whether the output directory is created; whether paths containing spaces or special characters are handled safely; whether recursive scanning handles symbolic links and depth limits; whether the format whitelist is complete; and whether same-name files use numbering or timestamps to avoid overwriting.

    If the model additionally completes details such as a common format list, recursive directory recognition, automatic numbering for same-name outputs, and transcoder component detection before conversion, each item should be checked for its implementation location and failure behavior. For example, when dependency detection fails, the tool should give a clear message and prevent the task from starting, rather than throwing a low-level error when the first file is converted. A single successful run only shows that the main path is usable; it is still necessary to construct cases such as an empty list, a corrupted file, a directory without permission, and an output path conflict.

    5. Core Difficulty: Decoupling Long-Running Tasks from the UI Event Loop

    The key to keeping a desktop tool responsive is that the UI thread only handles drawing and user events, while time-consuming tasks are handed to background workers. Background tasks send progress and errors through a queue, and the UI thread periodically retrieves them and updates controls. The pseudocode is as follows:

    1. function start_conversion(file_list, out_dir):
    2. if not check_transcoder():
    3. notify("Missing transcoding component. Please install or configure it.")
    4. return
    5. job = create_job(file_list, out_dir)
    6. worker = spawn_worker(job)
    7. worker.on_progress = (percent, message) =>
    8. UI_EVENT_LOOP.post(update_progress, percent, message)
    9. worker.on_error = (file, error) =>
    10. UI_EVENT_LOOP.post(show_error, file, error)
    11. worker.on_done = (summary) =>
    12. UI_EVENT_LOOP.post(finish_job, summary)

    This structure must also handle cancellation. After the user clicks cancel, a cancellation flag is set. The background task checks the flag at file boundaries or conversion block boundaries and exits safely. The UI then restores the button states. Progress should distinguish between single-file progress and overall progress to avoid the progress bar jumping back and forth when there are multiple files. The status bar should show the current file, the number of completed files, and the number of failed files. Error messages should be aggregated for display while retaining per-item logs for diagnosis.

    6. Dependency Detection, Path Safety, and Output Naming

    External transcoding capability is usually not a built-in component of the UI program. Therefore, before starting conversion, the tool should check whether it is available and confirm the version or basic call capability. If detection fails, the user should be prompted to configure the path or install the component rather than facing a crash. Input files should be checked for existence, readability, and format whitelist compliance. The output directory should be created automatically and checked for write permission. During conversion, the tool can write to a temporary file first and then perform an atomic rename after success, reducing the risk of partial output pollution.

    Recursive scanning should have a depth limit to avoid long blocking caused by abnormal directory structures. Symbolic links should not be followed by default, or the behavior should be clearly indicated. Automatically adding a number to same-name output files is a necessary detail: first check the target path, and if it exists, append an incrementing number or timestamp, then show the actual output name in the UI. Common video and audio formats should come from a configurable whitelist rather than being checked in multiple scattered places.

    7. Default Output Directory: Follow-Up Questions Reveal Product Thinking

    During testing, a follow-up question asked whether the default output directory after conversion is the current program directory. This looks like a small issue, but it involves the design of default behavior. Defaulting output to the program directory can cause permission problems, pollute the installation directory, and conflict with user expectations. A safer strategy is: on first launch, use a directory selected by the user; if none is selected, use a dedicated subdirectory under the system Documents directory; before the task starts, clearly show the final output path in the UI; and if the path is not writable, prompt immediately. If the model can proactively explain default values, conflict strategies, and configurable items during generation, it shows that it has considered the usage path, not just completed the code.

    8. Acceptance Points for Progress, Status, and Error Feedback

    The progress bar should not be merely decorative. It should enter an active state after the task starts, update by file or data block, and reset to zero or remain in a completed state after the task ends. The status bar should continuously show the current stage. Error messages should include the file name, failure reason, and suggested action. Cancellation should be repeatable without creating race conditions. During an active task, the start button should be disabled to prevent duplicate launches. After the task ends, importing and configuration capabilities should be restored. For batch tasks, summary results should also be provided, such as the number of successes, the number of failures, the output directory, and the failure list.

    9. A Reusable Engineering Acceptance Checklist

    Overall, the following checklist can be used to evaluate a desktop tool generated by an AI coding model: complete functional entry points; UI thread and background tasks decoupled; progress and errors sent back through safe events; external dependencies detected before startup; input format whitelist validation; recursive scanning with depth and link policies; configurable and writable output directory; same-name files not overwritten; temporary files cleanable; safe cancellation; exceptions not interrupting the entire queue; complete run and dependency instructions; and minimal test cases for critical paths. Only when these conditions are all met does the generated code approach a deliverable state.

    10. Conclusion

    AI coding models can already generate fairly complete and detail-rich code for a comprehensive desktop tool task, and they may even proactively add engineering details such as recursive scanning, format lists, dependency detection, and same-name overwrite prevention. However, evaluating their experience should not stop at whether a single generation is impressive. It should return to runnability, maintainability, and boundary safety. Developers should treat the model as a highly efficient first-draft generator and solution advisor while retaining control over requirement decomposition, code review, exception testing, and engineering acceptance. Benchmark scores provide direction, but real tasks and acceptance checklists determine final quality.