im 29 yo. recently lose my job,
and thinking about use some of my saving money to school for programming, for the sake of not being homeless, but idk consider of my age, will it helps me in the future to survive if i have a degree on programming.
When I was in uni for computer science we had a few older people at the time. I myself went a little older at 21 instead of 18 but there were others, notably one even at 50-ish changing careers from nursing to computer science. I'm pretty sure they're doing pretty good now. If you finish with knowing your stuff, employers aren't going to care that much about your age.
Trial and error, oh my God yes. So much error. Such a trial. But also try to pay attention to detail... If something seems to generally work but then doesn't for this one case, it might be completely broken and just spitting out plausible stuff the rest of the time. But anyway yeah, you've got the spirit.
Knowing your stuff is more about knowing how to learn rather than memorising how to do things exactly.
Knowing where to look to find the information you need is way more important than remembering that information because it means you can adapt to anything and programming is always changing and you'll always be learning new stuff.