Cutting them out completely might be a little much. Limiting them is a great idea to be productive is a good idea though.
What I find is I'll open ~5 comment sections, read, then leave for 2 hours. By the time I get back a significant portion of links have been replaced. Rinse and repeat. The key mechanism is the timeout forces me to break out of zombie reading and refocus on programming.
I would encourage anyone with a self-diagnosed HN addiction to turn on procrast.