Hacker News new | ask | show | jobs
by throwawayk7h 607 days ago
What does the function do if the entire board is mines?
4 comments

See https://www.youtube.com/watch?v=0-REcpPz3vw It causes some strange bugs to occur!
An array out of bounds access.
Found the tester :)

Jokes aside, I love it how in a group of software engineers someone can always think of an even more unlikely, but somehow realistic edge case.

For me, one of the marks of a senior engineer would be to then either go "we'll just not allow the board to be filled with entirely mines in the builder", or "well, if that ever happens: just let it crash". A practical solution to a theoretical case. Whereas the more junior engineer would spend the next few days researching and refactoring the algorithm to address this case. Obv. "it depends", letting my insuline pump "just crash" isn't cool, but minesweeper, meh.

It BSODs!