I would recommend thinkpads. You can find reasonably specked thinkpad on ebay.
As others have pointed out using a used laptop or desktop computer is the cheapest option.
For several years my favorite was Chromebook Acer AC720 with Linux installed, it was a beautiful light weight machine.
So a Chromebook where you can install Linux is a good option for me. I would select the one I can buy from this list:
Microsoft laptops generally have very good build quality for their price point, and they also offer student discounts like Apple does.
My wife is a die-hard ThinkPad user, and we've found over the years that unless you buy the expensive business-oriented ones they are, at best, not impressive.
If the budget is less than $1000, you probably want to go with a used machine, a Microsoft machine, or a Chromebook.
In our community this organization builds quality desktop computers, often with used components.
https://ithacareuse.org/ecenter/
If there is something like that in your town you might try that.
I learned on a Chromebook with 1gb of ram and Linux installed. This was fine for sublime text and running a rails or react dev server.
HP business desktops, or probooj laptops, are a good buy on eBay. I've using them for dev for 10 years
Does he care if it is a desktop or laptop? Is he okay with Linux or does he need Windows?
Easily M1 macbook air. If by cheap you mean 1k USD, which I think that laptop is at that price
A very cheap thinkpad if he need a laptop.
When I need more power I use RDPs with free cloud credits which you can easily get.
If you can get your hands on a raspberry pi at the real price it could be even cheaper. When I was really broke I was just hooking a PI to my TV, with a 30-40$ wireless keyboard+touchpad(logitech). And I was connecting to a remote RDP with free cloud credits.(the PI itself is actually usable with just a light linux distro, but it's kind of limited)
I was basically getting the equivalent of a 1K/2K$(or even 4K$ computer) for like 100-150$ tops.
(for credits, there is GCP which offers 300$ for the free trial, or AWS which have all kind of different offers, from student programs(including online courses), to any kind of entrepreurship program, if you have a basic website or just a landing page with a realistic project you can get a TON of credits, it doesn't have to be a real startup, just a side project that you may or may not finish one day...)
he could also learn some basics about cloud services/hosting that way...