the pain , loneliness and insecurity of the screenwriting sue are vividly and painfully brought to slovenly animation in this self-deprecating , biting and witty boast written by charlie kaufman and his twin brother , donald , and directed by spike jonze .