Skip to content

Comment on Blind faith (computer programming)

Comments

A programmer calls a subroutine to save user-data on the hard disk without checking whether the operation was successful or not.

This might not be blind-faith. "Fail-fast" is a legitimate pattern where you don't check for errors, you just let the program fail/terminate immediately.

But in this case, if you don't check the return value of for example the write() system call, it's more a case of "fail silently" than "fail-fast", which is perhaps the most dangerous form of bug that a program can have.

I find that this is my natural strategy; I only test functions explicitly when they fail.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.