You could do your programming theoretically on any laptop, although I'd say faster the better/easier it'll be for you in the long run. In regard to your comment on upgradability I'd recommend taking a look at a Framework laptop where their whole goal is repairability which comes with the added benefit of being upgradable.
Those Framework laptops look amazing. I hope they take off so the big guys take notice.
@out_of buy what you can afford . The more power the better when programming. Remember you are running 2 maybe more applications at once. The IDE and the application you are debugging (maybe not so much with Android dev). Unlike a normal user who is just using their browser or word or excel . HTH
Buy the cheapest MacBook model you can find with an M-series chip and as much RAM as you can stomach the cost for.
I'd say 8gb is barrrrre minimum for doing app development. You'll want 16gb.
Listen, I'm the last person you'd expect to recommend a Mac. I am an Android guy. No other Apple products in my place.
...but I've owned every top end model from pretty much every relevant PC manufacturer just trying to find something as reliable, hassle free, and well built as my work Mac and it just doesn't exist.
The MacBooks are just in a whole other class. The battery life, the standby time, the speed of those M1/2 chips, runs cool and quiet.
I'm neutral on MacOS. It tends to stay out of my way. I don't use any of the Apple apps. It is usually stable as hell. My work MBP currently has an up time of 68 days without a reboot, and the only reason it rebooted last time was for security patches.
Build quality is unmatched, screen is great, trackpad is still a generation ahead of anything else, keyboard is great.
Iβm not here to βroastβ but M chips arenβt fully supported for everything a software engineer could be compiling/running. At the current moment, theyβre not quite as well-supported in every single way possible like an x86 chip would be for dev environments (even though we all really want them to be).
I second the Mac recommendation. I use Linux on my desktop, but use Mac for laptop, after 6 years of using MBP (I still use my mid-2015 15" MBP for mobile development and day to day work), I can vouch for their quality (but skip the 2017, 2018, butterfly keyboard + touchbar crap, our company have buttload of those broken). Their M1/M2 battery life is just out of this world.
If OP worry about spending big and having buyers remorse, I recommend MBP.
I am a big fan of my Framework laptop. It is super easily upgradable and repairable so should last a good while. They are a little sold out of all of their old models so they only have pre-orders right now. They have options for a 13th gen i5 and a Ryzen 5 that both start at $850. The intel ones ship sooner and are have cheaper DDR4 RAM (vs DDR5 for Ryzen). The $850 is "base", an i5 configured with 16g of RAM, a 500gb SSD, and no OS (assuming you'll use linux or already own windows) is just under $1100. You can go as low as just over $1k for 8g of ram and 250g SSD.
If you're concerned with cost they do have refurbished 12th-gen i5s in stock now for $720, but you'll need to buy RAM and an SSD (which if buying from them would bring your total to $820 for 8g of RAM and 250g of SSD).
I can't comment on the tablet/pen stuff. I have never owned a laptop that does that. It might be worth it if you do drawing or whiteboarding and stuff, but those are the only people I know of that actually use that sort of stuff.
Be careful with the Intel laptop chips and make sure you understand what you're getting. My work laptop has an i7 with 12 "cores" but it's 10 of the low powered e-cores and 2 of the hyperthreaded p- cores, so for heavy applications (like compiling) it's a glorified dual core i3.