>>17261I understand this behaviour, been there done that.
First, you don't have to feel bad. This is just something that happens.
You do this because it is a small reliable dose of happy. Weak but reliable.
Next is the change bit. Learn to love what you have done. It may me small, insignificant, but love it anyway. Use that to motivate more.
You didn't waste 3 hours on HN, you learnt some trivia, fuelled brain ideas. Excellent, now move onto the next thing.
Lastly when you have identify what it is you want to do. You can't do something if you don't know what it is. Ideally SMART goals, but you can cheat a bit to start with.
If you try and force discipline too hard you just set yourself up for failure, hate of failure moves you to easy addiction. Start easy for success, gradually increase difficulty for higher reward.
This is my way, I'm climbing out a deep pit.