Just don't get a modern HP laptop, or any old ones for that matter. They're crap (personal experience). If you are not planning on playing modern AAA games then probably an older thinkpad would do. A friend of mine has an upgraded X1 Carbon gen 1, but i recommend something a little bit more modern for your usecases. I don't know about battery life tho.
refurbished thinkpad or dell xps. (buying something like a business model could save you money on the long run, because you'll be able to service the laptop later on. Instead of owning one of the new cheap consumer electronics that has everything soldered on and glued shut. And is generally made more cheaply.) Make sure to save enough money to afford a replaceḿent battery. The second hand one won't be at 100% capacity any more.)
eBay has many used ThinkPads at pretty cheap prices. If I were you I'd look for one with a recent-ish AMD Ryzen 5 or Ryzen 7. Look for CPUs with model numbers in the format 4xxx or 5xxx. And try to get 16GB of RAM if you can.
Then I mean a later year because my girlfriend and I each own X1s from around that time which we bought on eBay. Mine, I believe, was listed as a 2018. Hers is a year newer. So those figures might need budged but I do not mean a T480.
Unless you're just recommending a T480 over an X1, in which case, I apologize for stepping all over your punchline.
ThinkPads are generally pretty good. Got mine for ~£450 on eBay and it's got ridiculous specs for that price (4k display, discrete GPU, 2 nvme slots, 32gb of ram and an 8 core 3.6ghz i7)
I think it lasts about 5 hours of light use on Linux but like many ThinkPads you can swap out the battery so bringing a spare charged battery with you is an option if need be
Very high spec for the money, old hardware but still far more powerful than many modern laptops that are more expensive
You're not going to be running cyberpunk at 4k on it but for all of the things you mentioned it won't even break a sweat
Just make sure you pay attention to the specs because there are different builds of them with different amounts of memory, GPU and screen resolution I believe
Consider refurbished or second hand, please don't buy a brand new laptop as there is so much waste in the world already. If you buy from big brands, you might be able to buy replacement batteries. If not, install Linux and use TLP. You could also ask the seller to measure the battery life. I was patient and managed to score a used ThinkPad and the battery health was 98% when I bought it.
Check out Swappa.com for a used laptop.... Got a very good deal on a thinkpad. Almost any laptop will work for what you do except for tinkering with almost everything which is kind of hard to define... Just avoid the Google Chromebooks
Ok probably your best option is a used Thinkpad, or maybe a Chromebook with the Chromebook distro, but if you want to do something crazy you could try the Pinebook Pro. It's a 14" arm laptop that comes with debian for $220. You might need some accessories, but it would still be <$400 for something new and interesting. However, it's a bit slow, and arm doesn't have as much software support. I think it could do everything a CS student needs, except browsing may be slow because web apps are so absurdly big and complicated now. Definitely would get more than 5 hours of battery.
Dunno where you are, so can't recommend a specific laptop. Guessing from your currency I'd guess NA and looking at linux-preloaded, boy are there few options from non-oligopoly vendors in NA :/ And what the fuck are those prices in NA? Laptops with 16GB for 3kCAD? Bruh.
Maybe buys something that you can expand in the future by adding extra RAM, replace the storage and exchange the battery. A lot of the modern laptops don't allow you to do any of those (planned obsolescence?). I know older ThinkPads are a good option but I think newer models are less serviceable. In Linux you can use tlp to tune up your battery usage and reduce the power consumption to the bare minimum. I would also recommend a second-hand ThinkPad, but just check if it is upgradeable.
People may not like the idea, but you can get pretty decent laptops from AliExpress for like 250$, which was like 50% of the price of a similar laptop from any local sales channel at the time.
I did buy one for my son when he entered university and it still runs well: 5-6 hours battery life, 8 MB RAM, some older generation core i7 inside, full HD screen. The touchpad and keyboard are not great, but after 3 years they still work.
The specs today would be better, I guess.
With points and a 1000 off coupon it comes in your budget.
I think you need to do something to make the GPU drivers work. See this reddit thread.
Try running Linux os live usb on it and see if everything works. If you use Linux Mint, i think you need to install kernel 6.2 since it's still on 5.xx kernel now.