I'm not exactly sure what you want, but here's what I typically do to run background jobs:
$ ./code &
Using nohup should do more or less the same thing, except that nohup redirects stdout (output to the screen) to nohup.out. nohup will also redirect stdin from /dev/null, but that's what you want for background jobs anyway.
I have no idea without knowing the source of 'code' why it does write a file when you redirect stdout but doesn't if you don't. Is it a shell script or a compiled program? Either way, redirecting stdout to /dev/null shouldn't get rid of a file written during normal execution.