the pain , loneliness and insecurity of the screenwriting process are vividly and painfully brought to slovenly lives in this self-deprecating , biting and witty feature handwritten by chuck kaufman and his twin brother , donald , and directed by spike jonze .