Yeah I had a mid-2012 macbook pro and it lasted me almost 10 years, as a full time software dev that is. Replaced a fan, a cable and the HD to SSD, and the battery was over, but other than that kept going strong until I was sort of forced to upgrade because a newer iOS OS required a newer XCode required a newer MacOS required a newer laptop.
I have to say it was fun anticipating my new laptop watching the benchmarks and observing like a 10x (multi core) improvement.