Every change to code must include a comment. The comment must explain why the change was made. The comment must include the date of the change.
By Pawan Nayar · from the LLOS AI Learning record
Every change to code must include a comment.
The comment must explain why the change was made. The comment must include the date of the change.
A developer must add a comment every time code is changed. The comment must include the date of the change. The date format is YYYY-MM-DD. The comment explains why the code was changed. It does not just say what was changed. It explains the problem the change solves. The comment also explains why this specific solution was chosen. It describes what might break if the code is changed again. It can also include past problems related to this code. For CSS, the comment should explain other solutions that were tried. It should say why those other solutions did not work. This helps future developers avoid repeating mistakes.
A developer changes a JavaScript file. The developer adds a new function. The developer writes a comment above the function. The comment explains why the function is needed. It also explains why this method was chosen over others. It includes the date of the change.
Resolved from this lesson's own record — real definitions, not invented for this page.
More from the same record, pulled by shared topic — not written new for this page.
Before writing any external API code, a developer must read specific policy files. These files include rules for starting a session, handling retries, and using the central API coordinator.
A developer should check all existing rules that might be affected. This check must happen before adding any new standardized rule.
A developer must find all places where a problem might happen. The developer should list all these places.
A developer must add a comment for every code change. The comment must include the date of the change.
Every change to code must include a comment. The comment must explain why the change was made. The comment must include the date of the change.