I think you are being way too rough on the guy.
He posted the full code to the module that was having the issue which is the most important thing.
Accidentally creating a typo like this that not obvious or easy to accidentally to overlook is easy to do, particularly since the error(s) reported is unlikely to be on line where the error actually is.
Also, when there are typos or sometimes even valid code that the IDE chokes on vs the compiler, it is seldom in tiny little small code modules and often it is not as the file is slowly growing but after a editing session once the file is already a substantial size.
I've had MANY issues where the IDE chokes on perfectly valid code and I have to start doing a binary search using ifdefs to isolate where the problem is.
Once located I can massage the code to work around the bugs in the IDE parser to allow the IDE to parse the code before it hands it off to the compiler.
In terms of which is easier to deal with:
code in a code tags bock vs code that has been attached as file.
I don't think it really matters much.
However in practice, I find just the opposite from econjack's comments.
I'd rather have the code file attached, particularly if it is more than just a few lines.
(My view of "just a few lines" is more than can can be fully seen at once in the post, which is typically less than about 20)
When the code starts to get to be more than about 10-20 lines I want the code in an editor when I can do searches, have syntax highlighting, and other capabilities. This makes things much easier when trying to locate things like missing parrens or brackets, or nested comments.
The reason I consider having an attached file easier is that a browser can be set up so it asks what to do with the file: save it or do something else. (I have mine set up this way)
When selecting something other than saving, I can specify whether I want to bring up the .ino file directly into the IDE or my text editor.
If it is in code tags I have to select the code block, then copy it, then bring up the editor, then paste it into the editor or into a blank IDE sketch.
I'd rather have the original file than some cut/pasted text that has gone through several iterations of mutations from being cut/paste and might not be the full code in the module.
I've seen cases in these types of compiler error posts where you see that only a portion of the original file has been posted using code tags and the portion of the code posted is not the portion causing the error.
And so the thread bounces around a while while trying to get the OP to post the rest of the file.
It would have been much easier and quicker if the entire original file had been posted.
So from my perspective and experience with these types of threads, having the full code to a module as an attachment can actually be easier to deal with.