One approach is to sell it right before the 2 years are up and get a new one.
That way you're always covered and will probably be ready to move
into the newest technology by then.
With Apple's reliability (and the number of duds I've purchased from them), I consider a machine that lasts 2 years to be a keeper.
I always struggle with buying a new Apple computer. Mostly because I know I've got a 95% chance that I'm going to have to return it for something or deal with repair headaches.
I've purchased several computers new from Apple in the last 3 to 4 years. And, sadly, none (yes none) have been reliable or free of defects.
Even the one I'm using now has a minor issue (well minor to me, but not likely anyone else). It has a poor solder connection on the audio output port. I know how to fix it myself (quite handy with a soldering iron). But, I know that fixing it myself will void the warranty (since I'd be disassembling the machine and soldering it myself.
I know that if I take it in to be fixed, that they won't perform actual repairs and instead will replace the entire logic board. And, since the replacement would just be a refurb, then I run the risk of getting something with other defects that actually affect the usability of the machine.
As it is, I can install a sound card or switch to using digital audio and the poor solder connection becomes irrelevant.
Alternatively, I've considered talking with the local guys, and asking them to disassemble the machine and lay it out on a bench and supervise me retouching the solder on the plug.
No-one does that level of work anymore. They always replace an entire logic board on the Macs.
But, I'm happy with my functioning logic board. The CPU's work, the system doesn't overheat, I don't get any errors, everything else is reliable.
And, I know from experience that as soon as they stick a refurb board in there, that the new board is going to have some issue which will cause me to go into the shop and will start the dreaded cycle (which I am quite familiar with) all over again.
So, at this point, I am leaning more towards installing an aftermarket sound card and then retouching the solder connection myself after the warranty has expired.
This is the first new Apple I've had in so many years that actually works at all. So, I'm not about to let them break it. I'll fix it myself or install an aftermarket sound card and just forget about it.
I wish I had better faith in their quality. But, experience has shown me otherwise.
I do have a few reliable Macs around here. Several actually that have no problems. But, I got them second hand, and could evaluate them a bit. When I've purchased new ones from Apple, I usually get the dud. You can't pre-test on the new ones, you get what they ship you.
I've got a new local shop out here though, and I've found their guys to be unusually friendly. So, I may just hit them up with my idea and see what happens. I've got more experience with a soldering iron than I care to remember (lots and lots of memories being hunched over a table working on tiny connections).
So, if I let them break it down, let them observe what I do (only 30 seconds of work), then let them reassemble it, they'll be able to tell that it was done right, and the process should all look like an authorized Apple repair (instead of having signs that I didn't know where all the hidden release clips and such were - darn Apple, can't make everything obvious).
Anyway, if a machine gave me 2 years of reliable service and didn't need any trips in for repair, then I would keep it. The only reason I'd consider replacement then is if it just absolutely couldn't do what I wanted.
Now, a PC, yes I'll buy a new one of those without blinking. I've never had one go in the shop for repair. But, an Apple, I'll think carefully before I buy a new one. I cautiously weigh the risk and evaluate the current complaint level for any new Apple purchases.