In my experience, simple technical solutions (like hosts file site blocking) force changes in behavior which end up strengthening your mental resolve - you'll create a habit which you'll then stick to, even with a clear hosts file.
You are what you do, not what you think.