If I were to study and make a career out of coding would I be able to have free time to workout and have hobbies
I like music and would like to start song writing and I value my personal health and would like to be able to have time for workouts and I would like time for my family and friends I know I would be unreasonable for all of these things but it would be nice to be able to find time here and there to work on some of these things and have a consistent workout schedule
This varies widely and can be different from company to company and from week to week. A job that a computer scientist holds is typically a salaried position, not where you get paid hourly. You could work weeks where you put in 36-40 hours and other weeks, close to deadline, where you work 60-80 hours. The pay is typically the same each week. I have always worked at companies where I mostly had normal working hours (8-10 hours a day including time for lunch and breaks) and periods of time, usually no more than 12 weeks a year, where the hours were closer to 60+ hours/week. This is mainly during times when a project deadline or release was approaching. Nights and weekends could be required to get the job done. At times, the management would grant compensation time off after several weeks of overtime work or I could request it. If you land a position where you are routinely (most of the time) working 60-80 hours a week in a salaried position, this is known as a "sweatshop" and you should look for another job before you burnout or have a breakdown. This is not fair to you or your loved ones. Look for a better company that treats their employees better. All professionals should expect to put in some extra time to make it to a deadline, but life at some point should settle down to a normal pace. Hope this helps. A career in Computer Science can be lucrative, interesting *and* manageable (work/life balance). Computer Science graduates are in high demand. Best of luck!
Example: you are asked to code a specific task and the deadline is 1 week later. As long as you complete that coding task within 1 week and do so with good quality, your employer does not care at what time of the day or night you are coding, or how many hours you coded on Tuesday or Friday.
Hope this helps!