This article describes my brother (minus the programming experience). The hard thing is you can never make someone get help if they aren't a threat to themselves or others. Being an all around a-hole isn't sufficient to make someone admit themselves to a facility (no matter the run ins with police or the diagnosis). He's lucky he went to a facility and followed through. My brother ended up in one and I felt like I talked him into staying. Then he calls me to try and get me to lie to his social worker. Then the social worker calls me and I don't lie (he wasn't staying with me and he didn't have a job). Social worker listens but then a few days later he's out. My only hope is that now that he went out to California the system out there can make him get help.
I wouldn't hold up California as an exemplar of a mental health safety net, or expect too much from the services in place in this state. A significant population walking the streets loudly rambling nonsense is largely treated as a curiosity rather than in need of help. If anything, the culture embraces mental health issues.