Is Macbook pro 2012/2015 viable for programming?

Hello guys,

I am starting to build iOS applications using i so I am in need of Macbook. For my budget I can afford Macbook Pro 2012. I was wondering if I would be able to use it without any major problems. I am not doing any intensive programming, mostly web development and I would need Xcode for building iOS apps.

Note that I will upgrade it to 16GB RAM and around 256GB SSD. Will this be enough for using things like phpstorm, vscode, Xcode and such.

I am aware this is very old laptop but for my budget this is what I can get.

Also will I be able to install Big Sur on it in order to run latest Xcode so I can actually build iOS apps on it.

Thanks in advance. Any suggestion is appreciated!