Could leave yourself a breadcrumb for work not done, that maybe wasn't needed, maybe will never be needed.
Picking JavaScript today, rather than my usual C++.
// YagniError - something was not done yet because it wasn't needed yet.// Appears to be needed now. Happy fun time is over.classYagniErrorextendsError{constructor(to_do){super("YAGNI: "+to_do)}}// print_value - print the word for the number.// We'll yeet a YagniError for the unhandled cases.functionprint_value(value){if(value===0)console.log("zero")elseif(value===1)console.log("one")elsethrownewYagniError("print(value:"+value+")")}try{print_value(3)}catch(err){console.error(err.toString())}
Could leave yourself a breadcrumb for work not done, that maybe wasn't needed, maybe will never be needed.
Picking JavaScript today, rather than my usual C++.
I like the idea of leaving breadcrumbs! It's self-documenting and pretty straightforward.