My teenager spends hours and hours on the computer doing "programming" "coding" and other web-design stuff. He spends hours on stackoverflow. How should I be monitoring this behavior and should I be concerned?
Let me expand on my pithy comment above.
It sounds like your son has taken an active interest in programming. I too spent "hours and hours" doing exactly the same sorts of things that it sounds like your son is doing (though I didn't have the luxury of the internet back then!). Rather than this work being a waste of time, it's actually building the foundation for him becoming technologically adept, knowledgeable, and ultimately highly employable.
As a parent, you don't necessarily have to understand everything he's doing (and the technical details will almost certainly be beyond you), but you can engage with him and try to get the general idea of what he's building. Is he building a web site? What does it look like? Who is it for? What is the audience? Is he building a Ruby gem? (That is a programming module that can be used by other people.) What does it do? How is it useful? Who might use it? Keep in mind that his programming focus might change quickly, so be prepared for that. Today's hot new project will be tomorrow's "old and busted".
Too much of one thing can lead to deficiencies in other areas of his life. He's probably doing something ultimately worthwhile on the computer. But encourage him to do other things too, like go outside, hang out (in real life) with friends, read books, etc. Left to my own devices, I probably would have been programming every day from morning until midnight when I was your son's age. My parents managed to get me to do some other non-computer things too.
In short, talk to him about what he's working on. Ask questions about things you don't understand. If nothing else, this will give him valuable experience with explaining concepts to a non-technical person!