![]() | |
#21
| |||
| |||
|
|
Thomas 'PointedEars' Lahn posted : Are you a programmer or an English teacher? Oh, you're both! That would explain a whole bunch. |
#22
| |||
| |||
|
|
On Jan 1, 11:30 pm, Randy Webb <HikksNotAtH... (AT) aol (DOT) com> wrote: Things you didn't cover: ... Use of "new Function". Is there anything wrong with use of "new Function"? |
#23
| |||
| |||
|
|
Not to name names, but had I the skill to recognize URL: http://www.dynamicdrive.com/ > for what it was, I wouldn't have had to unlearn so much. |
#24
| ||||||
| ||||||
|
|
First, I liked your doc, and the comments on it so far have taught me a lot. |
|
I haven't commented because I lack the experience to intelligently do so |
|
As for Thomas, I was sniping. He irritates me. I really didn't want to do anything in that post but irritate him, |
|
apologies for sidetracking the discussion of your work. |
|
I hate to see someone put so much effort and labor into something to have someone be so callous about it. |
|
[...] Is my basic goal flawed? I don't think so. I think it would make a fine addition to the FAQ after careful evaluation. Is code bad in so many different ways You can bet on that. that I should just pack up shop and forget this? No, it's a good start. |
#25
| |||
| |||
|
|
If you do think that could do any good, you are using the wrong medium. You are back out of my killfile, for now, but scored Lowest. |
#26
| ||||||||
| ||||||||
|
|
On Tue, 01 Jan 2008 13:30:25 -0500, Randy Webb wrote: |
|
href:javascript. Drop #1, they all fall into the "Too stupid to know better" category. If this were directed at coders, I'd agree. I'm trying to aim this paper more at people getting into looking at/learning Javascript and maybe help them avoid a lot of the crap I waded through. |
|
Thomas had a few comments that have been thinking over the eval issue. I'm still pondering.. but you bring up valid points as well. |
|
The use of the "with" operator. Food for thought. I've avoided the with operator since the ancient days of Pascal, so I don't even see code in it. Barely aware that JS had one. |
|
Use of "new Function". I don't see this one too often. |
|
There are, inevitably, more things you didn't cover. Personally, I think a "Best Methods" document is of far more value than a "Bad Methods" document. Then, you aren't showing people bad ways to do things, you are showing them the best ways to do things. And even though I don't agree, totally, with Matt's, I keep it in my signature for that very reason. I won't quibble the need for a "Best Methods" document, but I was trying to fill a different need. I see a "Best Methods" as a document aimed at coders. I'm trying to aim at people who don't code yet. |
|
It is my goal to have an easy-to-understand list of things that should throw up red flags when you see them in code. If too many code snippets have these red flags, skip onto the next site. |
|
Not to name names, but had I the skill to recognize URL: http://www.dynamicdrive.com/ > for what it was, I wouldn't have had to unlearn so much. |
#27
| |||
| |||
|
|
Thomas 'PointedEars' Lahn posted : If you do think that could do any good, you are using the wrong medium. You are back out of my killfile, for now, but scored Lowest. Could you put me back in? |
#28
| |||
| |||
|
|
Jeremy J Starcher wrote: On Tue, 01 Jan 2008 18:01:51 +0100, Thomas 'PointedEars' Lahn wrote: d. "JavaScript1.2" actually means something in NN4; ask Google. I have never seen anyone using "JavaScript1.3", though. I didn't know if that was backwards compatible to browsers today or not. If memory serves me correctly, it changes some of the array methods. Care to elaborate? |
|
2. 'Using "href:javascript"' [...] There are other points that I have also mentioned in my FAQ notes last year. There are also exceptions to be made in special cases. |
| A reasoning for the statement that the security concerns could be easily addressed is missing. I'll toss in this link: <URL: http://www.json.org/json2.js > In my reading, I haven't heard of anyone finding holes in it. I know the JSON reference implementation but I don't see how that would provide a reason for your statement that it would be easy to address security concerns that using eval() with JSON would introduce. Care to elaborate? |
#29
| |||
| |||
|
|
Jeremy J Starcher said the following on 1/1/2008 2:38 PM: On Tue, 01 Jan 2008 13:30:25 -0500, Randy Webb wrote: Not to name names, but had I the skill to recognize URL: http://www.dynamicdrive.com/ > for what it was, I wouldn't have had to unlearn so much. Some of the first copy/paste scripts I ever used came from there. It took a while for me to understand what was wrong with them. The first tutorial I ever went through (web-based) was on the HTMLGoodies site when Joe Burns was writing them. Not the best quality but at the time the best I could find. Was enough to "Get my feet wet" and obtain the desire to know more. Now, I wish a good one did exist. |
#30
| |||
| |||
|
|
The group FAQ, and the Notes pages on it, cover just about every aspect of javascript: protocols. |
|
try/catch is another of the things you didn't cover. Don't use it. |
![]() |
| Thread Tools | |
| Display Modes | |
| |