Im sorry to say though that you wont get far with 400$.. ;/
I personally prefer Intel(Especially for "real" processing.), they just seem to run far more stable to me then AMD.
If you want a computer that will really hold for long, you need to get a high performance Intel i7(Not sure about the best model at the moment.) and 8gb of ram running at ~2000mhz.
The motherboard is extremely important as well, but i haven't stayed up to date for a while, so i cant recommend anything at all in this department.
But if you on the other hand want a computer that will last more then enough for the purposes you intend, you wont need more then a high performance i5 and 4gb of 1333mhz ram(Which might be possible for about 500$.).
Apple if you want the longest life.
Yes, I read your whole post. But seriously.
There are well known engineers still running on a freaking Apple G5.
Pricey, but they will last your far more than 3 years.
In case you didnt know, both Mac and PC lasts just as long, the difference is that while PC's constantly releases new parts, you have to wait for a whole new series of Mac's to get an upgrade.
So yes, PC's gets outdated faster, but they dont "loose" more performance compared to Mac at all.
That being said, the optimal solution would be running a Mac if possible(I still wouldn't though.).