Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That big-endian bug is a perfect example of OCD in coding.

"I can't ever reach that code path so I'll remove it".

I have caught myself doing this in some cases. I once removed a test to see if the CSPRNG was actually working because the test coverage showed that I could never reach that code-path. I then realised that this needed to be there, because otherwise, if the CSPRNG ever stopped working, the code wouldn't know about it, and (maybe) start using streams of zeroes as it's entropy.

Sometimes you need to remember that hardware can fail, or be compromised, even though in most cases it will just cause the program to crash.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: