I have a very similar use case so here is my opinion.
HARDWARE
-No dGPU unless this is your PRIMARY gaming computer. (Reason: better battery life, lighter laptop, with recent AMD iGPU you have decent performance for non-VR/not massive openworld AAA games.)
-recent AMD CPU. (Reason: better performance to watt ratio than Intel which makes a big difference for most of your use cases. Better multi-core performance which makes compiling code much faster. Massively better iGPU for light-medium duty gaming.)
-atleast 16GB ram if not expandable but as much as you can reasonably budget.
-16:10 or taller aspect ratio screen (16:9 sucks on laptop size devices, the extra height makes a big difference for school, coding, browsing, pretty much everything but watching 16:9 movies)
-Resolution: personal preference. IMO 1080p or 1920*1200 for 16:10 is ideal for 14" and below laptops. Lower resolution means better battery and on a small screen the PPI is high enough. If you are OK with a trade off of battery life and want a super crisp display then 2K is the highest I would go. 4K is retarded on laptop sized screens unless you are plugged in 90% of the time and you'll have to fuck with scaling then.
-metal body for stiffness and durability
-decent key travel (usually longer travel means better IME)
If you want to do machine learning/AI work professionally I use and recommend investing in a dedicated desktop with a large memory nvidia (cuda cores) GPU and installing the cuda drivers. Trying to cram commercially viable ai hardware into a laptop is a losing battle and you'll end up with a worse experience for both use cases, wont be able to fit large models in the memory anyways, and end up buying a desktop for AI while being stuck with a laptop that is worse for laptop use)
SOFTWARE
#1 Nobara OS KDE - best OOB experience for gaming IMO. Easy transition from windows. Has kernel fixes and many laptop specific fixes (asusctrl for example) by default which means you have a good chance of extra features like LEDs, fingerprint, etc working without tinkering). Fedora based.
#2 Linux Mint Debian Edition (LMDE6) - best non-gaming distro to learn and grow into IMO. Access to deb packages. Stable. (nobara has been stable for me as well, but it is LMDE's bread and butter). Ease of transition from windows. Can game just as well if you are capable of following simple instructions to configure the stuff done by default on nobara and pop (may need to manually change kernels, drivers, etc to get the best performance on new hardware)
#3 Pop_OS - used it for years, but I prefer Nobara after comparing. Ubuntu based so you have access deb packages without ubuntu's bullshit. Setup out of the box for gaming. I got fed up with failed updates, broken packages, and sluggishness so I swapped to nobara which has been a treat.
EDIT: you can snag some good deals on amazon warehouse deals (used-like new) laptops. These are usually just open box returns and if there is anything wrong you have 30 days to return it.
I recently upgraded to an Asus vivobook S 14x OLED (M5402R) for $780 CAD ($580USD) with a ryzen 7 6800H, 16GB DDR5, a 1TB gen 4 nvme, and it has zero signs of use, slight coil whine under load that I can only hear if I put my ear next to the keyboard and don't have any sound or music on (I suspect this was the reason for the return on mine since its a common complaint for this model. That's what I was hoping for since I'm not that picky and its worth the steep discount IMO.) Everything works oob on Nobara. I believe lenovo also regularly heavily discounts their previous gen thinkpads which are a great option, although the AMD configs are rare. Good luck!
I can only argue with metal body here: that'd vary on model-to-model basis. I've had a few thinkpads made of plastic, and they're fine after a few drops here and there, and hinges are alive and well, also I've seen some (mostly new-ish) laptops made of literal aluminum foil that are bent AF; what's even worse, one wasn't even what they call unibody, i.e. the frame was sandwiched of aluminum shell and a piece of crappy plastic with heat inserts for screws → after like a year of normal usage those inserts literally broke off with the surrounding plastic.
The latter one was some ultrabook by HP. Namedropping here 'cause I have some personal issues with their products, so, frankly speaking, fuck them in particular :)
HP products are just always shit. I have a HP pavilion which was made of plastic, and it is basically unusable after 2 years of normal use. The plastic is the lowest quality crap I've ever seen.
HP products are just always shit. I have a HP pavilion which was made of plastic, and it is basically unusable after 2 years of normal use. The plastic is the lowest quality crap I've ever seen.
I just received a 2010 MacBook pro, but don't like macos and the 2010 can't support modern Mac. So, Linux. I installed budgie completely forgetting it was snap. I was planning to install LMDE. I've never heard Nobara OS, so will give it a shot first. Thanks!