I have bought laptops, but not a whole desktop ever in my life. I've been through two desktops, mind you, that were both built from scratch[1].
I think this article gets it about right - I've started enforcing a 3 year cycle for both phone and laptops because they were costing me too much (in a mustachian sort of way) - and I've stuck to it with laptops (I made 3.5 years on a 2009 MBP) and will be doing so with the iPhone (due for replacement spring 2015.) If the nexus devices keep getting cheaper and awesomer, then I might jump to those a bit earlier (particularly if I can sell the 32GB 4S for an appreciable fraction of the new phone cost.)
Working with the 3.5 year old laptop got slightly painful (re-down-grading back to snow leopard from lion was essential, I even tried ubuntu briefly) but perfectly bearable for coding and web browsing. I'll see how slow the phone gets, but I'm quite relaxed about not having the latest and greatest iOS features (I've not seen anything compelling since iOS 5; I only did 6 because some new app requested it.)
[1] or rather, one was, and then I gradually replaced all the parts until I had a whole spare PC to sell on ebay, and one mobo bundle later and I'm still using it with no problems, playing games etc.