I end up paying Google for Postini. I haven't found anything else works as well.
Joyce ,'Never Leave Me'
Buffistechnology 3: "Press Some Buttons, See What Happens."
Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
For most purposes Google has great spam filters. Though they failed for ita !'s photo sight cause she gets legit mail with words like "naked" and "hot" in them. I wonder if Google is missing a niche market by not selling a tweaked version of their spam filter as a service to people who run sites where you might need need exceptions to the standard filter.
Yeah, I might need to pay for Postini.
I'm also getting a ton of spam to my donations address. Whereas the dirty address that I use deliberately to fill in web forms? Totally clean. IDEK.
So Douglas Crockford, author of JavaScript: The Good Parts and creator of the JSLint site says "Do not use String as a constructor."
IOW, don't do this:
strObj = new String("puppies!");
(strObj becomes a string object in this example.)
But AFAIK this is not a universal opinion. I'm still trying to understand why Crockford says this.
Any thoughts/opinions?
eta:
He says:
Do not use new Number, new String, or new Boolean. These forms produce unnecessary object wrappers. Just use simple literals instead.
Oh. But sometimes I need a string object.
I agree with Crockford. The JavaScript virtual machine is responsible for making string literals behave exactly like a string object constructed with new. I can't think of any case where you would need to use new String(). Where do you find you need to?
So
strObj = new String("puppies!");
will produce the same object as
strObj = {"puppies!"};
?
Mostly I learned Javascript by editing code that our consultant developers wrote. Now I'm trying to actually understand what's going on.
OK, my previous post was wrong.
This application just has a shitload of String objects, which we need for the String methods. So how do I get a String object without using 'new String()'?
A string literal gets automatically converted to a string object whenever you call a method on it.
This page [link] has a good description of what happens.
If you haven't already, read Crockford's book JavaScript: The Good Parts. JavaScript is a elegant little language that is quite easy to understand but has a few "bad parts" and is often tarred with the foul bush that is the browser document object model.
A string literal gets automatically converted to a string object whenever you call a method on it.
Heh. I just figured that out a minute ago!
Dunno why our consultants used 'new String()'.
read Crockford's book JavaScript: The Good Parts.
I've read parts of it. It's what made me realize I didn't really understand JavaScript that well.
Thanks.
I'd guess that early browsers didn't handle string literals correctly.