I did the same thing your brother did 27 years ago at the age of 29.
I spent 6k. Adjusted for inflation....well, it's not 24k, but even if it were. I would have made out well.
I've had a 27 year career. Have made over 100k a year for the past 19 years. Made around 250k last year (150k salary. 20k bonus. 30k in RSU. 50k in investments [I know you are thinking investments should not count, but I would not have so much in investments if I had not had this career]).
I'm turning 57 in a few weeks, and am deciding if I want to retire now and do something different, or work part time for a few more years, while finally starting to spend a little more money, rather than saving, investing, saving, investing all the time - not that I'm a complete cheapo, but I live as if I make 80-100k instead of several 100k.
My point is: it can be done, but only if you go for it. If your brother is smart. If he is motivated. If he is willing to work pretty hard. And, most importantly, if he ends up loving software development, then he can still do well. Despite the late start.
I hear you saying "Yes, you did it almost 30 years ago, but times are different today". Yes, they are. For both good and bad.
30 years ago, programmers made an okay living. We did it because we loved it, and made a middle class income. Times are different now. Incomes are at the upper end up the middle class, and can easily slide into upper class if you are really good.
30 years ago they were not nearly as many programming jobs. You could find one, but finding a great job could be a challenge.
I'd have just one bit of advice (as someone in the trenches). Before forking over money for a program, find some free or less expensive online training. Take some web dev, or python training classes. Check out some books on algorithms from the library. Give that 6 months or so. If he loves it, then go for it. If not, then maybe give up the dream.
I'll also add one thing: 2 year programs are fine, but unless it's 2 years leading to a 4 year degree at a reputable school, then it may not help you get a job all that much. You either have a 4 year degree, or you have experience. The experience could be open source work. Not necessarily paying jobs. Especially if the open-source work is on known projects. A 2 year certificate may not help all that much.
It's fine if you want to discourage him to spend his money wisely, but don't tell him it can't be done. It can.