Finally the deadline is a big factor because like many people I seem to produce my best code under pressure.Of course it also helps to have tools that I do not have to fight against to get things done, time away from my coworkers (who are usually great fun, which is actually the problem), and no constant email interruptions.