As I mentioned before (here and here), you really can’t trust your hardware to maintain a good health all by itself. It can overheat because of bad case design, dirty fans, or it can just burn out because of a bad PSU. It can also die from old age, which can mean any kind of weird symptoms, from random freezes to programs that crash all the time. You can test bad RAM using the free Memtest86+ which is conveniently packaged with Ubuntu’s live CD, and you can test your drives using their built-in SMART capabilities.
SMART (or S.M.A.R.T) stands for Self-Monitoring, Analysis, and Reporting Technology, and it’s basically extra sensors and firmware added to your hard disks so that they can detect hardware failures and other conditions, such as the drive’s temperature. The tool of choice on Linux to access SMART status is Smartmontools, which turned out to be most useful.