Having experienced it myself, I can vouch that such an difference exist. When forced to write a complicated piece of code with a bunch of strange people breathing down my neck and watching every step I take, my productivity tends to slacken off when I hit a coders equivalent of writer’s block. It just doesn’t come out as naturally as it used to. In contrast, same task in a more familiar and comfortable setting looks like a piece of cake even if deadline is drawing close.