Comments on: Compiler compliant, or figuring out error messages in code http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/ Programming, Education, Computer Science Wed, 30 Sep 2020 08:31:44 -0400 http://wordpress.org/?v=2.8.4 hourly 1 By: RB http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/comment-page-1/#comment-101395 RB Sat, 09 Feb 2008 16:28:35 +0000 http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comment-101395 Debugging your own code is insane when you have thousands of lines :) Debugging your own code is insane when you have thousands of lines :)

]]>
By: gautam madeshia http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/comment-page-1/#comment-101200 gautam madeshia Fri, 01 Feb 2008 15:46:20 +0000 http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comment-101200 ahh...debugging...i used to love those harcore "debugging" sessions using softice :D I used to adore softice. Too bad that numega had to kill such an excellent pieced of debugger. Now, i am trying to cope up with windbg. ahh…debugging…i used to love those harcore “debugging” sessions using softice :D

I used to adore softice. Too bad that numega had to kill such an excellent pieced of debugger.

Now, i am trying to cope up with windbg.

]]>
By: Tony http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/comment-page-1/#comment-101120 Tony Tue, 29 Jan 2008 03:29:36 +0000 http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comment-101120 Students will indeed try weird things, and what's more is that such <em>"weird"</em> code will make absolute sense to them. That is why it is so important for them to learn to understand just what the compiler is trying to tell them. Perhaps this is a yet another argument in favour of teaching with interpreted languages and interactive consoles. Syntactical errors are limited to a block of code, often just a single line. It could be a pain when two bugs in compiled code compound to an extraordinary bizarre situation. Students will indeed try weird things, and what’s more is that such “weird” code will make absolute sense to them. That is why it is so important for them to learn to understand just what the compiler is trying to tell them.

Perhaps this is a yet another argument in favour of teaching with interpreted languages and interactive consoles. Syntactical errors are limited to a block of code, often just a single line. It could be a pain when two bugs in compiled code compound to an extraordinary bizarre situation.

]]>
By: aramadia http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/comment-page-1/#comment-101117 aramadia Tue, 29 Jan 2008 01:37:04 +0000 http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comment-101117 It can become extremely frustrating. In C++, I stand no chance because sometimes errors occur in headers I don't even know about and it takes me a while to find that missing bracket in a completely different header. Even in Java, when I teach younger students who try really weird things such as if (expression) else (expression) instead of elseif, the compiler simply fails. Sometimes I get "construct" errors and it really amazes me how hard it is to find a typo in someone else code because you can't imagine making the same mistake. It can become extremely frustrating. In C++, I stand no chance because sometimes errors occur in headers I don’t even know about and it takes me a while to find that missing bracket in a completely different header. Even in Java, when I teach younger students who try really weird things such as if (expression) else (expression) instead of elseif, the compiler simply fails. Sometimes I get “construct” errors and it really amazes me how hard it is to find a typo in someone else code because you can’t imagine making the same mistake.

]]>
By: Tony http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/comment-page-1/#comment-101119 Tony Tue, 29 Jan 2008 01:32:33 +0000 http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comment-101119 I am frightened of <em>"self-correcting code"</em> for a number of reasons. As a developer I would simply not want the system to start making assumptions about what I'm doing, as that will certainly end badly. From the educational standpoint, this would also encourage lax standards and breed programmers who would simply rely on the existing system. Though from the practical standpoint, this is only feasible for the trivial mistakes with syntactic sugar -- that is, if a compiler can figure exactly where the missing period must be placed, then we don't really need that period at all. I am frightened of “self-correcting code” for a number of reasons. As a developer I would simply not want the system to start making assumptions about what I’m doing, as that will certainly end badly. From the educational standpoint, this would also encourage lax standards and breed programmers who would simply rely on the existing system.

Though from the practical standpoint, this is only feasible for the trivial mistakes with syntactic sugar — that is, if a compiler can figure exactly where the missing period must be placed, then we don’t really need that period at all.

]]>
By: RRabins http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/comment-page-1/#comment-101116 RRabins Tue, 29 Jan 2008 01:31:46 +0000 http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comment-101116 Back in the late 80s or early 90s there was a compiler (I believe it was called Clarion) that promoted a smarter compiler. The thinking was, if you got a compiler error that reported, "Error: Missing period," clearly the compiler knew what the error was, and therefore could fix it -- and should. In fact, this remains the case. Many code errors could be automatically repaired by the compiler if it were designed to do so. I think the notion of a self-correcting code is a frightening one to compiler developers, and therefore the notion hasn't advanced. Back in the late 80s or early 90s there was a compiler (I believe it was called Clarion) that promoted a smarter compiler. The thinking was, if you got a compiler error that reported, “Error: Missing period,” clearly the compiler knew what the error was, and therefore could fix it — and should. In fact, this remains the case. Many code errors could be automatically repaired by the compiler if it were designed to do so. I think the notion of a self-correcting code is a frightening one to compiler developers, and therefore the notion hasn’t advanced.

]]>
By: michaelp http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/comment-page-1/#comment-101113 michaelp Mon, 28 Jan 2008 22:20:56 +0000 http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comment-101113 Those crazy compiler errors really drive people crazy, don't they? Fortunately, I don't get them often because the code I write isn't too advanced, and an error will be something like "cuot undeclared: first use this function" or something because of a typo I made. I usually I don't try too many new things though because I'm not sure how to use them, or only a small bit on how, so I don't get crazy messages. Maybe I should expand and start trying some new things in the language I am using. Those crazy compiler errors really drive people crazy, don’t they? Fortunately, I don’t get them often because the code I write isn’t too advanced, and an error will be something like “cuot undeclared: first use this function” or something because of a typo I made. I usually I don’t try too many new things though because I’m not sure how to use them, or only a small bit on how, so I don’t get crazy messages. Maybe I should expand and start trying some new things in the language I am using.

]]>
By: Matt http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/comment-page-1/#comment-101107 Matt Mon, 28 Jan 2008 11:16:58 +0000 http://compsci.ca/blog/compiler-compliant-or-figuring-out-error-messages-in-code/#comment-101107 Haha, Its worse trying to fix someone else's bad code and having to sift through lines and lines to just solve a simple problem. Joys of xkcd comics, relive the brain on exploding from horrible code. Haha, Its worse trying to fix someone else’s bad code and having to sift through lines and lines to just solve a simple problem. Joys of xkcd comics, relive the brain on exploding from horrible code.

]]>