Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Randy Webb <HikksNotAtHome@xxxxxxx>
- Date: Mon, 07 Jan 2008 17:11:40 -0500
Jeremy J Starcher said the following on 1/7/2008 4:58 AM:
On Tue, 01 Jan 2008 05:37:14 -0500, Jeremy J Starcher wrote:
(Request for Discussion)
I've put together a guide that I hope will help novice coders avoid the
same hair pulling that I went through.
<URL: http://www.mopedepot.com/jjs/HowToRecognizeBadJavascriptCode.html >
Version 0.3 is up.
Once again, I thank all of you for your comments, suggestions and
encouragement.
I know that I did not include a lot of things that were mentioned. While
most, if not all, were markers of "not great" code, I had to remain on
task and on focus. I believe that I have distilled enough
easy-to-digest-points for the complete novice to follow.
If any of the powers that be would wish to move this document, once
finalized, into a larger collection of recognized Javascript writings I
would be open to the idea. We can discuss it here or in email.
Most of these, if not all, are grammar and typo related:
"If you are new to Javascript and want to learn from example", should be, IMO, examples.
Why? Most Javascript examples found found on the web.....
estimate, not estimage.
Still spelled depreciated, deprecated is the correct word.
"The recommended way write a script tag in HTML 4"
way to write a.....
Do a search/replace on depreciated. Some are corrected to deprecated, some aren't.
href="javascript:"
In the "best case", the worst ill effect is that animations stop being animated in the page.
document.write("<p>This page last updated:" + document.lastModified) + "<\/p>");
Extra ) after lastModified.
"This can cause result in hard-to-find bugs and unpredictable behavior."
Either remove cause or re-word the sentence.
"will suddenly fail Strictly"
Grammar. No period at the end of the sentence.
intra net is spelled intranet.
"An summary of things to avoid."
A summary.....
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
.
- Follow-Ups:
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Dr J R Stockton
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- From: Jeremy J Starcher
- Re: RFD: How To Recognize Bad Javascript Code v0.3
- References:
- RFD: How To Recognize Bad Javascript Code
- From: Jeremy J Starcher
- Re: RFD: How To Recognize Bad Javascript Code
- From: Jeremy J Starcher
- RFD: How To Recognize Bad Javascript Code v0.3
- From: Jeremy J Starcher
- RFD: How To Recognize Bad Javascript Code
- Prev by Date: Re: Determining number of files in folder using javascript
- Next by Date: Re: Bill Gates Announces Resignation
- Previous by thread: RFD: How To Recognize Bad Javascript Code v0.3
- Next by thread: Re: RFD: How To Recognize Bad Javascript Code v0.3
- Index(es):
Relevant Pages
|