Inquiry about an etiquette for this forum

D

Dung Ping

I have questions on a long code. Do I just place its url, or have to
paste the whole code, in my message to this forum? Thanks.

Dung Ping
 
M

Matt Kruse

Dung said:
I have questions on a long code. Do I just place its url, or have to
paste the whole code, in my message to this forum? Thanks.

First, do some debugging and testing and isolate your problem. Problems
happen in very specific pieces of code, not long code listings. If you first
isolate your problem to the smallest possible test case that will
demonstrate the problem, you have a much better chance of a) finding the
solution yourself, or b) getting an answer here.

At that point, a url demonstrating the code is most appreciated because it
can be easily loaded and tested.
If the code is sufficiently short, posting it in the message is helpful also
for those who may be reading offline.

Hope that helps,
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Tue, 13 Sep 2005
11:13:46, seen in Matt Kruse
First, do some debugging and testing and isolate your problem. Problems
happen in very specific pieces of code, not long code listings. If you first
isolate your problem to the smallest possible test case that will
demonstrate the problem, you have a much better chance of a) finding the
solution yourself, or b) getting an answer here.

Indeed. I once had a failing Pascal program of thousands of lines. By
reduction and simplification, I ended up with a still-failing
var X : extended ; begin X := Sqrt(2) end.
or similar. The cause turned out to be that a newly-installed quad
serial port card was also responding when the 80287 FPU was being
addressed (or similar).
At that point, a url demonstrating the code is most appreciated because it
can be easily loaded and tested.
If the code is sufficiently short, posting it in the message is helpful also
for those who may be reading offline.


If the test case is a completely self-contained piece of javascript
code, or a function with obvious parameters; or if (maybe to provide a
Form) it is a complete HTML page, then those who have made appropriate
preparations can very easily test it by copy'n'paste from News. The
following HTML page - adequate but non-compliant - can be prepared for
test here by just Select Copy Drag Click Paste Click , which is not a
lot (the Drag is only to expose the Click target, which is set to open a
local copy of my page js-quick.htm).

<script>
Z = 0
function X(Y) { alert(Y) }
</script>
<input type=button onClick="X(Z++)">



It is IMPORTANT that, when putting code in News, it is an EXACT copy of
the actual minimised failing code - so use copy'n'paste ; and it is
IMPORTANT that it not be line-wrapped by the posting agent - so write
with short lines, or expand your margins. To be sure, copy'n'paste the
material out of the draft news article and re-test it, before posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top