Re: Inquiry about an etiquette for this forum
- From: Dr John Stockton <jrs@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 14 Sep 2005 00:10:21 +0100
JRS: In article <dg6tru01gek@xxxxxxxxxxxxxxxxx>, dated Tue, 13 Sep 2005
11:13:46, seen in news:comp.lang.javascript, Matt Kruse
<newsgroups@xxxxxxxxxxxxx> posted :
>Dung Ping wrote:
>> 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.
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.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
.
- References:
- Inquiry about an etiquette for this forum
- From: Dung Ping
- Re: Inquiry about an etiquette for this forum
- From: Matt Kruse
- Inquiry about an etiquette for this forum
- Prev by Date: Re: Can I get cookies from other than the current path?
- Next by Date: Re: Focus()
- Previous by thread: Re: Inquiry about an etiquette for this forum
- Next by thread: Can I get cookies from other than the current path?
- Index(es):