**Use technology to break you out of the flow.** For example, if you're using Windows 7, parental controls can lock you out of your account at specified times (meal times, bed time, etc). My suggestion would be to set up another installation of Windows (dual-boot) with all your development tools. Remove everything development related from your original Windows installation. On the development install, set up an administrator account with a long auto-generated password that you entrust with someone else (or put the password out of reach in some other way), and set up a limited account with parental controls which limit what hours you can use the account, so that during that time you're locked out of your account (locking the workstation doesn't close any applications, so there won't be any loss of work). Getting the admin password to override the parental controls should be a long and inconvenient enough process to break you out of the flow, or a process that you won't consider doing at all (e.g. wake someone up late at night to ask for the password). As soon as you break out of it, hunger, thirst, and/or sleepiness will settle in, taking the place of adrenaline, and getting back into the flow will be pretty hard. That's the general idea. I'm sure there are similar technological solutions you can try that will be more suitable for you (and that work on your preferred OS). I'm sure there are also solutions that require less work to set up, but I find that the less they require, the easier they are to bypass and the less chance they have of interrupting your flow.