How to deal with students that don't like CS? This question is really aimed to teachers, especially in high school courses (but everyone is welcome to share some ideas). If you have a student that really does not like Computer Science, what should you do?


Encourage him, he might find his passion in CS
Talk to his parents and tell them maybe he should be in a course more of his liking
Try to find common ground between what he likes and CS (this one is actually very hard to do if you want to comply with the curriculum)


I'm most interested in the answers for a course that is required, but answers for courses that are optional would also be of interest.

If you think this question is not suitable here or should be rephrased, please tell me so in the comments.
On the first day of class, I ask students how Google search can work -- returning an answer to any query over billions of web pages in a fraction of a second. Usually someone mutters "magic". I say, "That's right. What else would you call it when putting together words and symbols enables you to control powerful entities?" Computer programs, I argue, are spells, and robotics is transfiguration. The wizardry in Harry Potter isn't real, but computer science is. Whatever you want to do, computer programming will make you more powerful. (The good people at Code.org similarly call coding a superpower.) I challenge students to name a field of interest, and I tell them how computer science can be applied to it. Whatever your goals are, I say, being able to create computer programs will help you achieve them.

Within the bounds of the curriculum, try to come up with applications that interest the students, and help them keep their eyes on the prize. Stress that they're going from the majority who only knows how to use other people's programs to the minority that can create programs.

I can't say how well this would go over in a high school class, but it seems effective in workshops for high schoolers and for classes at the college level. Of course, as Aurora0001 pointed out, CS isn't for everyone, so there will be some students who don't respond well, but you should be able to capture the imaginations and respect of many students by making sure they understand they're not moving semicolons around, they're exerting god-like power. :-)