Generally speaking, people who are suitable for self-study should have these prerequisites:
First, there is plenty of time, and there is no hurry to find a job right away. For example, I am still a freshman or sophomore at school, or I have a job and food now, but I just want to change careers and jump into the IT industry. Personally, I think this period of time is at least one year, and two years of self-study is more appropriate.
Second, a person with strong self-control can persist in long-term self-study. However, the proportion of self-study is not high, and it may not exceed a quarter.
If the above conditions are met, there is a high probability that you don't need to enroll in class training, but you can also study by yourself. In addition, it is recommended to consider attending training courses.
For non-computer majors, if they want to learn programming and switch to the internet industry quickly, one advantage of taking the training course is "saving time". Because training institutions usually dynamically adjust the teaching content and build a relatively perfect employment course training system according to the current development status of technology and the changes in the demand for talents in the industry, so that you can get started in half a year.
Therefore, whether to report for class or not depends on your own situation.