I would suggest the same. Removing unwanted programs would improve laptops performance but you must be cautious about dependeny packages. If you are not sure what a particular app is for, it's better to keep it. This way you will save yourself from corrupting important sofware packages. But of all making an investment in an efficient laptop for programming would really do good.
Also try to stop unwanted background services at startup. That would also increase cpu performance.
I hope these tips helps!