Eloquent JavaScript Book

D

David Mark

Ah, Usenet, where neurotic nit-picking is the accepted form of
communication.

Ah, the Web, where ignorance passes for knowledge.

Did you even read this thread? You might as well lose the DOM and
events sections. Those are the only two I looked at. Others have
raised valid concerns about your grasp on the language. What is left?

[snip]
 
D

David Mark

[snip]
There isn't. I tend to respond to every polite or useful comment. But
I'm not being paid for this, so there is no commitment.

And would you *please* add a section on basket weaving?

[snip]
 
K

Kenny

Marijn said:
(Hey Kenny.. fancy finding you here. Thanks for the moral support!)

PWUAHAHAHA!! I thought the name looked familiar, but all you furriners'
names look the same so I didn't think twice.

Nice book, and thx for POMO, too.

cheers, kenny
 
D

David Mark

Yes, where's a shill when you need one? Oh, right here in this thread
started by his friend. What a coincidence.
PWUAHAHAHA!! I thought the name looked familiar, but all you furriners'
names look the same so I didn't think twice.

A bit glib.

[snip]
 
K

Kenny

David said:
Yes, where's a shill when you need one? Oh, right here in this thread
started by his friend. What a coincidence.

PWUAHAHAHA!! I thought the name looked familiar, but all you furriners'
names look the same so I didn't think twice.


A bit glib.

[snip]

So your premise is that we cleverly arranged the whole thing in order to
make a huge impression on this very important -- PWUAHAHHHAHAHAA -- on
this very important group of -- PWUAUAHHHAHHAJHAHHOHHOAHHHAA -- gasp
gasp -- OK, and then Marijn accidentally blew it by --
PWAUUAUAUAUAUHAHHHAHAHAH -- I'm gonna pee! -- hang on, I'll be right
back.... OK, because of all the money to be made from a free ---
PWUAHAHAHAHHHAHAHAHAA!!!!! I can't do it!!....whew! Good one! Thx!!
 
W

William James

Erwin said:
One thing I am not impressed with is his codingstyle.
He ommits {}, like here in the for loop:

function power(base, exponent) {
var result = 1;
for (var count = 0; count < exponent; count++)
result *= base;
return result;
}

But I noticed more people leave the brackets out in their code, so
this might just be a very private irritation.

Braces here would serve no other purpose than to make the code
as ugly as possible and to give a feeling of security to the
anal retentive and to those who aren't comfortable with the
language.

A couple of examples from "The AWK Programming Language" by Aho,
Kernighan, and Weinberger:


{ for (i = 1; i <= NF; i++)
sum += $i
if (NF > maxfld)
maxfld = NF
}


while ((input = getline) > 0)
if ($0 == n1 + n2) {
print "Right!"
break
} else if ($0 == "") {
print n1 + n2
break
} else
printf("wrong, try again: ")


The insecure and the lovers of ugliness would change them to
something like this:


{ for (i = 1; i <= NF; i++)
{
sum += $i + 0 + 0 + 0;;;
}
if (NF > maxfld)
{
maxfld = NF;;;
}
};


while ((input = getline) > 0) {
if ($0 == n1 + n2 + 0 - 0 + 66*0) {
print "Right!";
break;;
} else if ($0 == "") {
print 0 + n1 + n2 + 0 ;;
break;
} else {
printf("wrong, try again: ");;
};;;;
};;;;;


And then they would pride themselves on their elegant coding style.
 
B

Brian Adkins

Kenny said:
David said:
Marijn wrote:

(Hey Kenny.. fancy finding you here. Thanks for the moral support!)

Yes, where's a shill when you need one? Oh, right here in this thread
started by his friend. What a coincidence.

PWUAHAHAHA!! I thought the name looked familiar, but all you furriners'
names look the same so I didn't think twice.


A bit glib.

[snip]

So your premise is that we cleverly arranged the whole thing in order to make a huge impression on this very important -- PWUAHAHHHAHAHAA -- on this very important group of -- PWUAUAHHHAHHAJHAHHOHHOAHHHAA -- gasp gasp -- OK, and then Marijn accidentally blew it by --
PWAUUAUAUAUAUHAHHHAHAHAH -- I'm gonna pee! -- hang on, I'll be right back.... OK, because of all the money to be made from a free ---
PWUAHAHAHAHHHAHAHAHAA!!!!! I can't do it!!....whew! Good one! Thx!!

Sure, there's some entertainment value in what's-his-name's posts, but
I gotta tell you this group become /much/ more tolerable (and
noticeably shorter) when I added him to my killfile.

I haven't added followups to him to the killfile yet, but fortunately
folks usually do some decent editing and just leave the funny bits.
 
L

Lasse Reichstein Nielsen

[strict bracketing]
And then they would pride themselves on their elegant coding style.

FWIW, I consider the bracketed style *more* readable (although only
when puting the starting bracket on the same line as the while/if).

Omitting semicolons would probably be more acceptable in a less broken
language, but since we have "semicolon-insertion" in Javascript, omitting
the wrong semi-colon becomes a hard-to-find error.

/L
 
K

Kenny

Brian said:
David said:
Marijn wrote:


(Hey Kenny.. fancy finding you here. Thanks for the moral support!)

Yes, where's a shill when you need one? Oh, right here in this thread
started by his friend. What a coincidence.



PWUAHAHAHA!! I thought the name looked familiar, but all you furriners'
names look the same so I didn't think twice.


A bit glib.

[snip]

So your premise is that we cleverly arranged the whole thing in order to make a huge impression on this very important -- PWUAHAHHHAHAHAA -- on this very important group of -- PWUAUAHHHAHHAJHAHHOHHOAHHHAA -- gasp gasp -- OK, and then Marijn accidentally blew it by --
PWAUUAUAUAUAUHAHHHAHAHAH -- I'm gonna pee! -- hang on, I'll be right back.... OK, because of all the money to be made from a free ---
PWUAHAHAHAHHHAHAHAHAA!!!!! I can't do it!!....whew! Good one! Thx!!


Sure, there's some entertainment value in what's-his-name's posts, but
I gotta tell you this group become /much/ more tolerable (and
noticeably shorter) when I added him to my killfile.

I haven't added followups to him to the killfile yet, but fortunately
folks usually do some decent editing and just leave the funny bits.

Oh, sure, that is definitely an option. I have this balance over here
where I weigh information vs. noise, Mr. Mark is still OK.

Busy elsewhere anyway, big demo coming up. See y'all on the far side.

p,k
 
D

David Mark

[snip]
Oh, sure, that is definitely an option. I have this balance over here
where I weigh information vs. noise, Mr. Mark is still OK.

You should filter yourself. Your recommendations are worthless (as
usual.)

[snip]
 
K

Kenny

Kenny said:
Brian said:
David Mark wrote:



Marijn wrote:


(Hey Kenny.. fancy finding you here. Thanks for the moral support!)


Yes, where's a shill when you need one? Oh, right here in this thread
started by his friend. What a coincidence.



PWUAHAHAHA!! I thought the name looked familiar, but all you
furriners'
names look the same so I didn't think twice.



A bit glib.

[snip]


So your premise is that we cleverly arranged the whole thing in order
to make a huge impression on this very important -- PWUAHAHHHAHAHAA
-- on this very important group of -- PWUAUAHHHAHHAJHAHHOHHOAHHHAA --
gasp gasp -- OK, and then Marijn accidentally blew it by --
PWAUUAUAUAUAUHAHHHAHAHAH -- I'm gonna pee! -- hang on, I'll be right
back.... OK, because of all the money to be made from a free ---
PWUAHAHAHAHHHAHAHAHAA!!!!! I can't do it!!....whew! Good one! Thx!!



Sure, there's some entertainment value in what's-his-name's posts, but
I gotta tell you this group become /much/ more tolerable (and
noticeably shorter) when I added him to my killfile.

I haven't added followups to him to the killfile yet, but fortunately
folks usually do some decent editing and just leave the funny bits.


Oh, sure, that is definitely an option. I have this balance over here
where I weigh information vs. noise, Mr. Mark is still OK.

And besides, it /is/ de facto his newsgroup, I cannot very well block
/him/ out.

kt
 
K

Kenny

David said:
[snip]

Oh, sure, that is definitely an option. I have this balance over here
where I weigh information vs. noise, Mr. Mark is still OK.


You should filter yourself. Your recommendations are worthless (as
usual.)

I recommend more variety in your calumny, it's a bit of a broken record
as is. Meanwhile, my recommendations are working great for me, you might
want to give them a try: Common Lisp, AllegroCL specifically, Chrome,
Mozilla Thunderbird for email/newsgroups, and tennis, great game.

kt
 
E

Erwin Moller

William James schreef:
Braces here would serve no other purpose than to make the code
as ugly as possible and to give a feeling of security to the
anal retentive and to those who aren't comfortable with the
language.

William, are you feeling OK today?

"Ugly as possible?"
"false feeling of security to the anal retentive?"
"For those that aren't confortable with JavaScript?"

I think if you try a little harder you should be able to squeeze a few
more insults in your statement. I count only 3.


A couple of examples from "The AWK Programming Language" by Aho,
Kernighan, and Weinberger:


{ for (i = 1; i <= NF; i++)
sum += $i
if (NF > maxfld)
maxfld = NF
}


while ((input = getline) > 0)
if ($0 == n1 + n2) {
print "Right!"
break
} else if ($0 == "") {
print n1 + n2
break
} else
printf("wrong, try again: ")


The insecure and the lovers of ugliness would change them to
something like this:


{ for (i = 1; i <= NF; i++)
{
sum += $i + 0 + 0 + 0;;;
}
if (NF > maxfld)
{
maxfld = NF;;;
}
};


while ((input = getline) > 0) {
if ($0 == n1 + n2 + 0 - 0 + 66*0) {
print "Right!";
break;;
} else if ($0 == "") {
print 0 + n1 + n2 + 0 ;;
break;
} else {
printf("wrong, try again: ");;
};;;;
};;;;;


And then they would pride themselves on their elegant coding style.


Even if you try to use brackets and semicolons, your codingstyle is ugly
because of your semicolon noise.

And what is the point of all your semicolons?
Why not add 10 more?

Or are you only trolling and am I taking the bait?

Erwin Moller


--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top