While we all like to think we are much more productive in a relaxed, care-free environment, the truth is that some people don’t get anything done until it’s urgent.
If that's you, make it urgent. Don't always rely on deadlines to be set for you (they often won't be during a PhD). Set yourself a deadline instead!
If you keep a diary or a calendar, write your current goal down and treat it like any other important, unmoveable commitment. You may be surprised how well you shape up and knuckle down simply because 'it’s due!'
Is it really as simple as that?
If you are the sort of person who has mastered the art of self-discipline, having a deadline set will probably be enough for you.
If not, well, welcome to the club! You may need to find reinforcements.
An obvious approach is to discuss deadlines with your supervisor. After all, once he or she is expecting you to send through a piece of work on a certain date, it's quite embarrassing to simply not do it.
You can also consider asking friends. They may seem like a source of distraction, but, once they understand the challenges you're facing, they could be the opposite.
In fact, if you have really really good friends, you may be able to let them boss you around. The declaration that 'I can only come out if I’ve finished this' still lights a perverse gleam in the eyes of my closest friends.