Everything looks good from here... Yes. Yes, this is a fertile land, and we will thrive. We will rule over all this land, and we will call it... 'This Land.' I think we should call it 'your grave!' Ah, curse your sudden but inevitable betrayal! Ha ha HA! Mine is an evil laugh! Now die! Oh, no, God! Oh, dear God in heaven!

Wash ,'Serenity'


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!


Liese S. - Oct 17, 2012 6:56:17 pm PDT #21242 of 25505
"Faded like the lilac, he thought."

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.


tommyrot - Oct 18, 2012 10:21:54 am PDT #21243 of 25505
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.

[link]

Oh. But sometimes I need a string object.


Rob - Oct 18, 2012 10:35:24 am PDT #21244 of 25505

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?


tommyrot - Oct 18, 2012 10:48:28 am PDT #21245 of 25505
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.


tommyrot - Oct 18, 2012 11:08:51 am PDT #21246 of 25505
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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()'?


Rob - Oct 18, 2012 11:20:55 am PDT #21247 of 25505

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.


tommyrot - Oct 18, 2012 11:25:53 am PDT #21248 of 25505
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.


Rob - Oct 18, 2012 11:35:39 am PDT #21249 of 25505

I'd guess that early browsers didn't handle string literals correctly.


beekaytee - Oct 18, 2012 2:39:58 pm PDT #21250 of 25505
Compassionately intolerant

It turns out that I AM screwed with regards to the mini mac. Amazon isn't going to help me. I waited too long, trying to resolve the problem myself. My only recourse was to was leave bad feedback for the seller.

Chalk that dearly needed money up as down the drain.

Ah, well. Brushing myself off, I just need to figure out how to make it back.

To that end, I'm looking for a dirt cheap laptop with one of the following set of criteria to use as a biofeedback monitor in my private practice.

  • Windows:
  • Microsoft Windows® XP SP3 or newer Operating System
  • 1.0 GHz or faster processor — recommend Intel® Core™2 Duo at 2.0GHz or faster
  • 1 GB RAM — recommended 2GB or more
  • One available USB Port
  • Internet Access Recommended

  • Mac:
  • Mac OS® X 10.5 (Leopard) or later
  • 1.0 GHz or faster G4, G5 or Intel processor — recommend Intel® Core™2 Duo at 2.0GHz or faster
  • One available USB Port
  • Internet Access Recommended
  • I've looked at dealmac and tigerdirect so far...are there any other routes I can go without exposing me to the same sort of unreliability I experienced on Amazon Marketplace?


beekaytee - Oct 18, 2012 2:42:42 pm PDT #21251 of 25505
Compassionately intolerant

serial:

Has anyone used the Mountain Lion diskmaker app?

I figure I need to back everything up before this motherboard crashes and burns, including the operating system.

The reviews for diskmaker seem quite good, but I always feel better with a personal recommendation.

eta: I haven't tried to use it, obviously, but the diskmaker seems to have created the mountain lion boot disk I hoped it would. It took quite a while, but the process was dead easy.