You can start by utilizing the "noprocrast" (no procastination) flags and timeout delays (maxvisit and minaway) in your HN user profile settings and build a routine around that ;)
You can use focusbear.io to block websites (e.g. hackernews) on desktop and mobile.