They are not even close to being the same.
Can there be analogies, some very far fetched? Sure.
Do those analogies mean that the two are the same? No.
Is the reader's brain like a compiler? No. Compilers are very literal. Readers' brains build an imagined world from the hints given by the author.
One huge difference is the feedback. With a program, whether it compiles is a hard feedback. It either does or it does not, no wiggle room. Same if your unit tests pass. Does this sentence work? Maybe. Are you done revising that chapter? Well, I guess it's better now, but it still seems a bit wonky.
etc.