News for hackers. Stuff that matters.
Re:AI is forcing us to pay off 40 years of technical debt by Orphis on Wednesday November 04, 2026 @12:00PM (#50368422)
And the day you add a way to batch import request through another code path, you may forget the validation.

Having it in the lower layer is correct, a proper optimizing compiler should be able to detect there's a single code path to the function and that the checks have already been done, skipping the second check.

Re:AI is forcing us to pay off 40 years of technical debt by eithed on Wednesday November 04, 2026 @01:40PM (#50369750)
Well - this would be an example of defensive programming and by that logic catering for this "what if" is the way to go. LLMs were correct all along!
Re:AI is forcing us to pay off 40 years of technical debt by alright2565 on Wednesday November 04, 2026 @06:24PM (#50372850)
Alternatively, the code could be written in the style of parse, don't validate[1]. However I've never had a coding LLM preemptively suggest that.

[1]: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...