Dont Panic. Schizophrenia is not a death sentance. It may feel like that at first - but as long as your willing to learn coping skills and take advice from other people with the condition you will be fine.
You probably got sz, because your life was too stressful. You may have created some of that stress, by not doing well enough in school. But programmers don’t really have to take exams, that require a certain GPA, do they? You can always study now.
I was born with a brain that functions and reacts to things a little differently than the “norm”. I guess you were too, and that’s nothing to be ashamed of or blame yourself for. You can learn coping techniques, keep your stress level as low as possible, eat well and sleep well. I recommend Cognitive Behavioral Therapy as well.
It’s a struggle. I’ve struggled and and had to let go of goals and dreams, etc., but I have a decent life. You can find a balance and still live a good life.