Hardware or OS-related problems are rare today.
You must be really lucky
I'm home user, guys. Corporate system is another story
Even home users (and more so "hobbyist" programmers) should have a good backup strategy. It's all too easy to lose months (or years!) of work from lots of causes: a program fails and trashes your main disk, the disk(s) wear out (or fail) and start banging their heads all over the plates, you wake up one day with "butter fingers" and the laptop falls down a staircase, etc. And it almost always happens at just the worse moment.
Nowadays people have a single "big" (1, 2 or more TiB) disk and keep everything in it so as to have it inmediately accesible, not realizing that if it fails they'll lose everything, whereas with a simple dual odd-even days backup strategy they would lose at most one day of easily recoverable work. The motto still is: never keep your all eggs in one basket