Quora Answer : As a computer science major, is there a way for me to take what I learn and utilize it for my hobby of music production during my free time?
Yes, of course.
Quora Answer : How could computer programming help in Electronic Dance Music production?
Well, most electronic dance music is made with some kind of software and that software had to be programmed. So programming, in a general sense, is pretty essential. (You can make some kinds of EDM with just analogue gear, but many modern tricks and effects are done digitally.)
If you mean, is it worth you learning programming in order to make EDM, then the answer is, it probably depends on your temperament.
Here's a tune I did a few months ago : GoldenPond High Voice
It's a fairly unremarkable sketch, except that I used a simple Haskell program to generate the chords (as a .mid file, which I then imported into FL Studio). I did that because I wanted to experiment writing music with a large-scale structure. Like traditional songs with verse-verse-bridge-chorus-verse-chorus etc. structures. FL Studio is a great DAW but it doesn't really help organize your music at that scale, so I tend to (lazily) fall into making tracks that are just build-ups on the same repeated harmonic cell. My program helps me break out of that by letting me start with a long-form harmonic structure.
So, depending on how you see it, a small amount of scripting helped me overcome my own limitations as a musician and / or a lack of functionality of the software I use.
(You can do something similar in the open-source Audacity sound editor using a language called Nyquist.)
Then there's a whole "live-coding" scene with languages and libraries designed for people to perform music by writing code in real time. See this video for an idea of how that works :