I went to a shitty underfunded public school in a major city, located in a poor neighborhood and only black people live there (magnet schools: because rich people object to "bussing"). I lived in a variety of poor neighborhoods during and after my college years (admittedly Houston doesn't have the problems with escape-proof ghettos that the Democrat-only cities do). The main problem keeping people there, where I lived, really was either "attitude and culture" or "spending money on someone else".
Don't get me wrong: attitude and culture are no small thing! The strongest prison bars are the ones in our minds. But if you want to actually fix the problem, instead of keeping the problem around on purpose to serve your political goal, then you must understand the fix has to be cultural. I was stuck there myself for a few years due to my own attitude.
Everyone I talked to (and you do spend time talking to your neighbors when there fuck-all else you can afford to do) fell into one of these 3 groups:
1. Hardworking recent immigrants, legal or otherwise, who were already making enough to live somewhere better, but were sending most of their money back home (these are the best neighbors, BTW). They were here because the opportunities were good, and were anything but trapped. I'm sure their kids are doing great here.
2. A hardworking woman who wouldn't still be in this shitty neighborhood except for some layabout relative, always male, she was unwilling to force to work or throw out on the street. (I always suspected I only saw the ones who hadn't done that yet, but either way the problem wasn't lack of opportunity).
3. The majority: people who were convinced that working a regular, full-time job was some sort of scam. They were just too smart to fall for that scam, you see, to be tricked into working long hour for shit pay. They knew that wasn't the right answer, and any day know their next scam would work and they'd be rich. I was definitely trapped there by this, for years.
There's nothing in entertainment that glorifies, or even explains, that working long hours for shit pay is what the start of the path upwards looks like. That living with roomates in a ghetto apartment longer than you have to, spending less than you can even when that sucks bad, is how you make the space to change to a better job. That working a job that sucks so bad that you sit in the parking lot in a daze sometimes unable to walk inside and start the workday is just a temporary step on the path. None of that is explained, but it's normal when you start from the bottom. My immigrant neighbors understood it - I wish they'd have been able to explain it to me at the time.
Software development is more open to non-traditional backgrounds than most fields. I've participated in a couple hundred interviews and phone screens while working with a variety of the big names in my career, and no one ever cared about anything but "can you code, are you self-motivated, and are you an asshole". The opportunity is there, if you have the talent and the training, but its ultimately on you to make the changes to get the training and go after the opportunity.