Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #16703 > unrolled thread

Programming style question

Started byPatricia Shanahan <pats@acm.org>
First post2012-10-18 08:32 +0100
Last post2012-10-21 17:57 -0700
Articles 20 on this page of 113 — 20 participants

Back to article view | Back to comp.lang.javascript


Contents

  Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-18 08:32 +0100
    Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-18 10:23 +0200
      Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-18 13:42 +0100
        Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-18 17:59 +0200
          Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-18 09:56 -0700
            Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-19 00:49 +0200
              Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-19 11:04 -0700
                Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-20 11:52 +0200
              Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-19 12:06 -0700
                Re: Programming style question Tim Streater <timstreater@greenbee.net> - 2012-10-19 23:12 +0100
                  Re: Programming style question "Mel Smith" <med_cutout_syntel@aol.com> - 2012-10-19 21:56 -0600
                Re: Programming style question Bart Van der Donck <bart@nijlen.com> - 2012-10-20 02:21 -0700
                  Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-20 12:03 +0200
                  Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-20 06:31 -0700
                    Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-20 18:30 +0200
                      Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-20 10:32 -0700
                        Re: Programming style question Tim Streater <timstreater@greenbee.net> - 2012-10-20 22:34 +0100
                          Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-21 10:12 +0200
                            Re: Programming style question Tim Streater <timstreater@greenbee.net> - 2012-10-21 09:34 +0100
                          Re: Programming style question Dr J R Stockton <reply1242@merlyn.demon.co.uk.invalid> - 2012-10-21 17:59 +0100
                            Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-22 09:55 +0200
                            Re: Programming style question Tim Streater <timstreater@greenbee.net> - 2012-10-22 09:50 +0100
                              Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-22 04:49 -0700
                                Re: Programming style question Tim Streater <timstreater@greenbee.net> - 2012-10-22 14:04 +0100
                                Re: Programming style question Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-10-22 16:07 +0200
                                Re: Programming style question Dr J R Stockton <reply1243@merlyn.demon.co.uk.invalid> - 2012-10-23 18:22 +0100
                              Re: Programming style question Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-10-22 16:01 +0200
                                Re: Programming style question Jim T. <x@y.z> - 2012-10-22 12:16 -0400
                                  Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-22 11:40 -0700
                                    Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-22 14:01 -0700
                                      Re: Programming style question Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-10-23 10:07 +0200
                                        Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-23 09:43 -0700
                                      Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-23 11:49 +0200
                                        Re: Programming style question Jim T. <x@y.z> - 2012-10-23 15:52 -0400
                                          Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-23 13:07 -0700
                                          Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-23 22:45 +0200
                                            Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-23 14:14 -0700
                                              Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-24 09:35 +0200
                                                Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-24 10:17 -0700
                                                  Re: Programming style question Dr J R Stockton <reply1243@merlyn.demon.co.uk.invalid> - 2012-10-25 18:41 +0100
                                                    Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-25 17:03 -0700
                                                      Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-25 20:14 -0700
                                                        Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-25 20:46 -0700
                                                          Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-26 09:55 +0200
                                                            Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-26 06:18 -0700
                                                              Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-26 17:43 +0200
                                                          Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-26 09:57 -0700
                                                            Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-26 10:24 -0700
                                                              Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-26 14:18 -0700
                                                          Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-27 10:45 +0200
                                                            Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-27 12:58 +0200
                                                              Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-27 16:18 +0200
                                                                Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-27 18:08 +0200
                                                                  Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-27 18:26 +0200
                                                                    Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-27 19:43 +0200
                                                                      Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-27 21:09 +0200
                                                                        Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-27 22:53 +0200
                                                                Re: Programming style question John G Harris <john@nospam.demon.co.uk> - 2012-10-28 11:37 +0000
                                                                  Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-28 12:50 +0100
                                                                    Re: Programming style question Martin Leese <please@see.Web.for.e-mail.INVALID> - 2012-10-28 13:43 -0600
                                                                      Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-28 23:58 +0100
                                                                    Re: Programming style question John G Harris <john@nospam.demon.co.uk> - 2012-10-29 11:18 +0000
                                                        Re: Programming style question Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2012-10-27 23:58 +0200
                                                          Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-28 12:43 +0100
                                                        Re: Programming style question Dr J R Stockton <reply1243@merlyn.demon.co.uk.invalid> - 2012-10-27 19:44 +0100
                                                Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-24 12:06 -0700
                                                  Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-24 21:27 +0200
                                                  Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-10-24 15:12 -0700
                                                  Re: Programming style question Tim Streater <timstreater@greenbee.net> - 2012-10-25 01:29 +0100
                                                Re: Programming style question Stefan Weiss <krewecherl@gmail.com> - 2012-10-24 21:25 +0200
                                                  Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-24 21:57 +0200
                                                    Re: Programming style question Stefan Weiss <krewecherl@gmail.com> - 2012-10-25 01:11 +0200
                                                      Re: Programming style question Christoph Becker <cmbecker69@gmx.de> - 2012-10-25 02:00 +0200
                                                        Re: Programming style question Scott Sauyet <scott.sauyet@gmail.com> - 2012-10-24 20:27 -0700
                                                      Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-25 08:44 +0200
                                                        Re: Programming style question Adam Silver <adambsilver@gmail.com> - 2012-10-25 04:28 -0700
                                                      Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-25 23:18 +0200
                                                        Re: Programming style question Scott Sauyet <scott.sauyet@gmail.com> - 2012-10-26 08:24 -0700
                                                        Re: Programming style question Stefan Weiss <krewecherl@gmail.com> - 2012-11-07 22:13 +0100
                                                          Re: Programming style question Tim Streater <timstreater@greenbee.net> - 2012-11-07 21:51 +0000
                                                          Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-07 23:47 +0100
                                                            Re: Programming style question Stefan Weiss <krewecherl@gmail.com> - 2012-11-08 01:14 +0100
                                                          Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-11-07 16:51 -0800
                                                            Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-08 16:45 +0100
                                                              Re: Programming style question Scott Sauyet <scott.sauyet@gmail.com> - 2012-11-08 08:02 -0800
                                                                Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-08 17:39 +0100
                                                              Re: Programming style question Gene Wirchenko <genew@ocis.net> - 2012-11-08 11:25 -0800
                                                                Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-08 22:25 +0100
                                                                  Re: Programming style question John G Harris <john@nospam.demon.co.uk> - 2012-11-09 10:19 +0000
                                                                    Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-09 17:41 +0100
                                                                    Re: Programming style question Dr J R Stockton <reply1245@merlyn.demon.co.uk.invalid> - 2012-11-10 22:38 +0000
                                  Re: Programming style question Scott Sauyet <scott.sauyet@gmail.com> - 2012-10-22 12:32 -0700
                                  Re: Programming style question Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-10-23 10:05 +0200
                              Re: Programming style question Christoph Becker <cmbecker69@gmx.de> - 2012-10-22 22:11 +0200
                                Re: Programming style question Stefan Weiss <krewecherl@gmail.com> - 2012-10-23 02:42 +0200
                                  Re: Programming style question Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2012-10-23 10:08 +0200
                Re: Programming style question "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-20 18:34 +0200
    Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-18 11:57 +0200
      Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-18 13:06 +0100
        Re: Programming style question "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-10-18 15:32 +0300
          Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-18 13:37 +0100
            Re: Programming style question "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-10-18 15:55 +0300
            Re: Programming style question John G Harris <john@nospam.demon.co.uk> - 2012-10-19 10:12 +0100
              Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-19 07:24 -0700
                Re: Programming style question John G Harris <john@nospam.demon.co.uk> - 2012-10-20 17:47 +0100
            Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-24 01:15 +0100
              Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-24 01:31 +0100
              Re: Programming style question "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-10-24 07:34 +0300
                Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-24 19:57 +0200
                  Re: Programming style question "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-10-24 21:02 +0300
          Re: Programming style question Patricia Shanahan <pats@acm.org> - 2012-10-18 20:15 -0700
        Re: Programming style question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-10-24 01:21 +0100
    Re: Programming style question Scott Sauyet <scott.sauyet@gmail.com> - 2012-10-21 17:57 -0700

Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6  Next page →


#16878

FromPatricia Shanahan <pats@acm.org>
Date2012-10-25 17:03 -0700
Message-ID<GeadnbdgcqPNThTNnZ2dnUVZ_u6dnZ2d@earthlink.com>
In reply to#16876
On 10/25/2012 10:41 AM, Dr J R Stockton wrote:
> In comp.lang.javascript message <bh7g885ekk9ce55mmqec0bo2k12605ak6l@4ax.
> com>, Wed, 24 Oct 2012 10:17:13, Gene Wirchenko <genew@ocis.net> posted:
>
>>
>>      Some of these idioms are showstoppers, because how do you look
>> something up if you do not know its name and it is mainly an
>> arrangement of symbols?
>
> You look it up in the index of a book, where the symbols should come
> before the words.  Four of my five JavaScript books are like that, one
> having numbers before symbols.  The fifth, and most used, has no index.
>

Or search an electronic book. I searched for "||" (quotes in the search
field) in the book I'm using, and the first hit was the section,
"Logical OR", that explains what it does. In general, a programming
language book should either define a language symbol or give a reference
to where it is defined at the first use, so that is the place to look.

Patricia

[toc] | [prev] | [next] | [standalone]


#16883

FromGene Wirchenko <genew@ocis.net>
Date2012-10-25 20:14 -0700
Message-ID<luvj88ldgtr18fqdr2330b4msbgmd91nf9@4ax.com>
In reply to#16878
On Thu, 25 Oct 2012 17:03:19 -0700, Patricia Shanahan <pats@acm.org>
wrote:

>On 10/25/2012 10:41 AM, Dr J R Stockton wrote:
>> In comp.lang.javascript message <bh7g885ekk9ce55mmqec0bo2k12605ak6l@4ax.
>> com>, Wed, 24 Oct 2012 10:17:13, Gene Wirchenko <genew@ocis.net> posted:
>>
>>>
>>>      Some of these idioms are showstoppers, because how do you look
>>> something up if you do not know its name and it is mainly an
>>> arrangement of symbols?
>>
>> You look it up in the index of a book, where the symbols should come
>> before the words.  Four of my five JavaScript books are like that, one
>> having numbers before symbols.  The fifth, and most used, has no index.

     I was more concerned with the idiom.  If one does not know the
name, it is hard to look it up.

     Plus, see my response to Patricia.

>Or search an electronic book. I searched for "||" (quotes in the search
>field) in the book I'm using, and the first hit was the section,
>"Logical OR", that explains what it does. In general, a programming
>language book should either define a language symbol or give a reference
>to where it is defined at the first use, so that is the place to look.

     Try Googling for "||".  No results!

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#16885

FromPatricia Shanahan <pats@acm.org>
Date2012-10-25 20:46 -0700
Message-ID<moSdnWwY4cbrmhfNnZ2dnUVZ_o2dnZ2d@earthlink.com>
In reply to#16883
On 10/25/2012 8:14 PM, Gene Wirchenko wrote:
> On Thu, 25 Oct 2012 17:03:19 -0700, Patricia Shanahan <pats@acm.org>
> wrote:
..'
>> Or search an electronic book. I searched for "||" (quotes in the search
>> field) in the book I'm using, and the first hit was the section,
>> "L.gical OR", that explains what it does. In general, a programming
>> language book should either define a language symbol or give a reference
>> to where it is defined at the first use, so that is the place to look.
>
>       Try Googling for "||".  No results!

Why the exclamation point? I did not think Google would produce anything
useful, so the lack of results does not seem surprising to me. That is
why I suggested searching an electronic book, not Google. I'm sure you
realize in the context that I mean a book on JavaScript.

For general, casual information, Google is incredibly useful, but it is
not the only place to look for information. When I need a lot of
detailed information and explanations on a specific subject, such as
when I'm using a programming language for the first time, I buy a book.

Patricia

[toc] | [prev] | [next] | [standalone]


#16887

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2012-10-26 09:55 +0200
Message-ID<XnsA0F864EB01B44eejj99@194.109.133.133>
In reply to#16885
Patricia Shanahan wrote on 26 okt 2012 in comp.lang.javascript:

> On 10/25/2012 8:14 PM, Gene Wirchenko wrote:
>> On Thu, 25 Oct 2012 17:03:19 -0700, Patricia Shanahan <pats@acm.org>
>> wrote:
> ..'
>>> Or search an electronic book. I searched for "||" (quotes in the
>>> search field) in the book I'm using, and the first hit was the
>>> section, "L.gical OR", that explains what it does. In general, a
>>> programming language book should either define a language symbol or
>>> give a reference to where it is defined at the first use, so that is
>>> the place to look. 
>>
>>       Try Googling for "||".  No results!

Digital adepts should know Google-search only indexes words, not symbols.

> Why the exclamation point? I did not think Google would produce
> anything useful, so the lack of results does not seem surprising to
> me. That is why I suggested searching an electronic book, not Google.
> I'm sure you realize in the context that I mean a book on JavaScript.
> 
> For general, casual information, Google is incredibly useful, but it
> is not the only place to look for information. When I need a lot of
> detailed information and explanations on a specific subject, such as
> when I'm using a programming language for the first time, I buy a
> book. 

In this case I would not buy a book, why pay for what is free, 
and not wait 24+ hours for that to arrive:

<https://www.google.com/search?q=javascript+logical+operators>


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#16895

FromPatricia Shanahan <pats@acm.org>
Date2012-10-26 06:18 -0700
Message-ID<FvOdndHWAZgUEBfNnZ2dnUVZ_oGdnZ2d@earthlink.com>
In reply to#16887
On 10/26/2012 12:55 AM, Evertjan. wrote:
...
> In this case I would not buy a book, why pay for what is free,
> and not wait 24+ hours for that to arrive:
>
> <https://www.google.com/search?q=javascript+logical+operators>
>
>

I assumed the problem was to find out about "||" with no prior knowledge
other than the fact that it appears in a particular JavaScript
expression. I believe the original context for this was the statement:

var r = aDOMfunction || aDOMfunction("23px");

There is nothing about this use of "||" in this that would tell a
reader, considering JavaScript in isolation, that it is a logical
operator. Its inputs do not appear to be Boolean. Its result is not
being used to control an if-statement or continuation of a loop.

Of course, someone who thinks other languages are relevant might
consider the relationship between JavaScript syntax and a family of
languages in which "||" is a logical operator. However, in
https://groups.google.com/forum/#!msg/comp.lang.javascript/_Y5zv4SHiUM/viWqtDi6RgMJ
you rejected comparison to other languages as an aid to understanding
JavaScript.

I've never had to wait 24+ hours for delivery of an electronic book.

Patricia



[toc] | [prev] | [next] | [standalone]


#16897

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2012-10-26 17:43 +0200
Message-ID<XnsA0F8B44807323eejj99@194.109.133.133>
In reply to#16895
Patricia Shanahan wrote on 26 okt 2012 in comp.lang.javascript:

> 
> I assumed the problem was to find out about "||" with no prior
> knowledge other than the fact that it appears in a particular
> JavaScript expression. I believe the original context for this was the
> statement: 
> 
> var r = aDOMfunction || aDOMfunction("23px");

Which probably was an error, should have been:

var r = aDOMfunction && aDOMfunction("23px");

Well I did not assume that problem.

> There is nothing about this use of "||" in this that would tell a
> reader, considering JavaScript in isolation, that it is a logical
> operator. Its inputs do not appear to be Boolean. Its result is not
> being used to control an if-statement or continuation of a loop.

This is usenet. One could ask. 

You presume, it seems, 
that an ebook will tell you wat cannot be found using Google seacht.

I doubt that. 
How would you find such an ebook without consulting a search engine?

> Of course, someone who thinks other languages are relevant might

Other languages are relevant in the sense of language comparison and 
will give you a wider view. Compare English monoglots with multiglits in 
thier view of the world. So it must be also true of computer languages.

The books of Julius Caesar is very relevan to the developement of European 
languages.

However, relevance does not make it on topic in this NG.

> consider the relationship between JavaScript syntax and a family of
> languages in which "||" is a logical operator. However, in
> https://groups.google.com/forum/#!msg/comp.lang.javascript/_Y5zv4SHiUM/
> viWqtDi6RgMJ you rejected comparison to other languages as an aid to
> understanding JavaScript.

No, I did not. I said it was off topic, unless comparison was discusssed 
per se. Nothing about relevancy.

relevancy != ontopicness.

> I've never had to wait 24+ hours for delivery of an electronic book.

I personally don't want to pay for any book about javascript. Especially 
if you are not sure it anwers a particular question. 

This NG, this NG's FAQ, the web via search engines, gives me instant 
answers on most Javascript questions I still have.



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#16899

FromGene Wirchenko <genew@ocis.net>
Date2012-10-26 09:57 -0700
Message-ID<5ufl889vn9hakkqokjojiq6ergdhhq6fl9@4ax.com>
In reply to#16885
On Thu, 25 Oct 2012 20:46:25 -0700, Patricia Shanahan <pats@acm.org>
wrote:

>On 10/25/2012 8:14 PM, Gene Wirchenko wrote:
>> On Thu, 25 Oct 2012 17:03:19 -0700, Patricia Shanahan <pats@acm.org>
>> wrote:
>..'
>>> Or search an electronic book. I searched for "||" (quotes in the search
>>> field) in the book I'm using, and the first hit was the section,
>>> "L.gical OR", that explains what it does. In general, a programming
>>> language book should either define a language symbol or give a reference
>>> to where it is defined at the first use, so that is the place to look.
>>
>>       Try Googling for "||".  No results!
>
>Why the exclamation point? I did not think Google would produce anything

     There were no results at all.  Not just a few results, but none
at all.  I thought that noteworthy.

>useful, so the lack of results does not seem surprising to me. That is
>why I suggested searching an electronic book, not Google. I'm sure you
>realize in the context that I mean a book on JavaScript.

     Sure.  This is a surprise?

     But when one does not know what something is called, how does one
refer to it?

>For general, casual information, Google is incredibly useful, but it is
>not the only place to look for information. When I need a lot of
>detailed information and explanations on a specific subject, such as
>when I'm using a programming language for the first time, I buy a book.

     I find technical books to be expensive and too often
disappointing.  I am unlikely to buy one unless I know it is good.  I
find that out from the Net.  THEN, I may buy the book.

     A good book is a treasure.  A bad book should be buried.

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#16902

FromPatricia Shanahan <pats@acm.org>
Date2012-10-26 10:24 -0700
Message-ID<esydnU1bRuDaWhfNnZ2dnUVZ_sqdnZ2d@earthlink.com>
In reply to#16899
On 10/26/2012 9:57 AM, Gene Wirchenko wrote:
> On Thu, 25 Oct 2012 20:46:25 -0700, Patricia Shanahan <pats@acm.org>
> wrote:
...
>> useful, so the lack of results does not seem surprising to me. That is
>> why I suggested searching an electronic book, not Google. I'm sure you
>> realize in the context that I mean a book on JavaScript.
>
>       Sure.  This is a surprise?
>
>       But when one does not know what something is called, how does one
> refer to it?

As I wrote previously, as "||". The Kindle book search is not the same
as Google. It can afford to search for the actual string on demand,
rather than depending on a massive indexing operation. That is one of
the benefits of having a book, rather than depending on Google.

Sure, the book cost me a little money, less than $25. It is worth it to me.

Patricia

[toc] | [prev] | [next] | [standalone]


#16905

FromGene Wirchenko <genew@ocis.net>
Date2012-10-26 14:18 -0700
Message-ID<qgvl88hh72vhhig413uesf2k7v1uo7cfq2@4ax.com>
In reply to#16902
On Fri, 26 Oct 2012 10:24:12 -0700, Patricia Shanahan <pats@acm.org>
wrote:

>On 10/26/2012 9:57 AM, Gene Wirchenko wrote:
>> On Thu, 25 Oct 2012 20:46:25 -0700, Patricia Shanahan <pats@acm.org>
>> wrote:
>...
>>> useful, so the lack of results does not seem surprising to me. That is
>>> why I suggested searching an electronic book, not Google. I'm sure you
>>> realize in the context that I mean a book on JavaScript.
>>
>>       Sure.  This is a surprise?
>>
>>       But when one does not know what something is called, how does one
>> refer to it?
>
>As I wrote previously, as "||". The Kindle book search is not the same
>as Google. It can afford to search for the actual string on demand,
>rather than depending on a massive indexing operation. That is one of
>the benefits of having a book, rather than depending on Google.
>
>Sure, the book cost me a little money, less than $25. It is worth it to me.

     It is not in any book that I have so how am I to know?

Sincerely,

Gene Wirchenko

[toc] | [prev] | [next] | [standalone]


#16907

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-10-27 10:45 +0200
Message-ID<1712362.N4q8Dh0vJq@PointedEars.de>
In reply to#16885
Patricia Shanahan wrote:

> Gene Wirchenko wrote:
>> Patricia Shanahan <pats@acm.org>wrote:
>>> Or search an electronic book. I searched for "||" (quotes in the search
>>> field) in the book I'm using, and the first hit was the section,
>>> "L.gical OR", that explains what it does. In general, a programming
>>> language book should either define a language symbol or give a reference
>>> to where it is defined at the first use, so that is the place to look.
>>
>>       Try Googling for "||".  No results!
> 
> Why the exclamation point?

He is a wannabe (a person who only *thinks* they know).  He was when he 
first hit this newsgroup a few months ago, and unfortunatly he has not 
improved since.

> I did not think Google would produce anything useful, so the lack of
> results does not seem surprising to me. That is why I suggested searching
> an electronic book, not Google. I'm sure you realize in the context that I
> mean a book on JavaScript.
> 
> For general, casual information, Google is incredibly useful, but it is
> not the only place to look for information. When I need a lot of
> detailed information and explanations on a specific subject, such as
> when I'm using a programming language for the first time, I buy a book.

However, the reason that searching for `||' fails is probably that Google 
supports `|' as an alternative to *its* logical `OR' in an advanced query, 
and apparently either it cannot interpret `||' even when it is double-quoted 
(which you would do to work around that) or simply does not include that in 
its index (it does include `&&', so you can search for `"&&"', though).

Googling for `logical "OR" javascript' yields "About 9,720,000 [9.72 
million] results [in] (0.41 seconds)".


PointedEars
-- 
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
  -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)

[toc] | [prev] | [next] | [standalone]


#16908

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2012-10-27 12:58 +0200
Message-ID<XnsA0F98411B8A4Feejj99@194.109.133.133>
In reply to#16907
Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:

> However, the reason that searching for `||' fails is probably that
> Google supports `|' as an alternative to *its* logical `OR' in an
> advanced query, 
> 

No. 

Google search does only index complete words, strings of letters, 
all other characters are just seen as spaces. 

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#16909

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-10-27 16:18 +0200
Message-ID<3054756.qXEtDaJBpf@PointedEars.de>
In reply to#16908
Evertjan. wrote:

> Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:
>> However, the reason that searching for `||' fails is probably that
>> Google supports `|' as an alternative to *its* logical `OR' in an
>> advanced query,
> 
> No.
> 
> Google search does only index complete words, strings of letters,
> all other characters are just seen as spaces.

If you had read my posting whole, you would have seen that you are wrong.


PointedEars
-- 
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
  -- Richard Cornford, cljs, <cife6q$253$1$8300dec7@news.demon.co.uk> (2004)

[toc] | [prev] | [next] | [standalone]


#16910

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2012-10-27 18:08 +0200
Message-ID<XnsA0F9B883F25Ceejj99@194.109.133.133>
In reply to#16909
Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:

> Evertjan. wrote:
> 
>> Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:
>>> However, the reason that searching for `||' fails is probably that
>>> Google supports `|' as an alternative to *its* logical `OR' in an
>>> advanced query,
>> 
>> No.
>> 
>> Google search does only index complete words, strings of letters,
>> all other characters are just seen as spaces.
> 
> If you had read my posting whole, you would have seen that you are wrong.

Wrong conclusion, Thomas. 

You cannot know what I read or did not. It could be that I just don't agree 
with your words, they are not necessarily the final words of the master. 

Or it could be that I read them, and just did not appriciate them, by 
rreason of either my lack of understanding or your lack of expression. 


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#16911

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-10-27 18:26 +0200
Message-ID<1451098.uHMH94rIS0@PointedEars.de>
In reply to#16910
Evertjan. wrote:

> Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:
>> Evertjan. wrote:
>>> Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:
>>>> However, the reason that searching for `||' fails is probably that
>>>> Google supports `|' as an alternative to *its* logical `OR' in an
>>>> advanced query,
>>> No.
>>> 
>>> Google search does only index complete words, strings of letters,
>>> all other characters are just seen as spaces.
>> 
>> If you had read my posting whole, you would have seen that you are wrong.
> 
> Wrong conclusion, Thomas.
> 
> You cannot know what I read or did not.

Correct.  I should have said that you *could* have seen then that you are 
wrong then.  Which does not change the fact that you are *wrong*.

> It could be that I just don't agree with your words,

It does not matter what you agree with.  The truth of reality disproves you.


PointedEars
-- 
var bugRiddenCrashPronePieceOfJunk = (
    navigator.userAgent.indexOf('MSIE 5') != -1
    && navigator.userAgent.indexOf('Mac') != -1
)  // Plone, register_function.js:16

[toc] | [prev] | [next] | [standalone]


#16912

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2012-10-27 19:43 +0200
Message-ID<XnsA0F9C8958DAEEeejj99@194.109.133.133>
In reply to#16911
Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:

>> You cannot know what I read or did not.
> 
> Correct.  I should have said that you *could* have seen then that you
> are wrong then.  

Accepted. That presupposes that I "am" wrong.

> Which does not change the fact that you are *wrong*.

Your shouting *wrong* underlines that you feel you cannot prove the "are",
in English that does not help your point, in German some say it does.

>> It could be that I just don't agree with your words,
> 
> It does not matter what you agree with.  The truth of reality
> disproves you. 

I disagree. Truth is only agreement over supposed facts.

The same goes for reality as perceived by you.

[You don't mean truce, btw?]

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#16913

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-10-27 21:09 +0200
Message-ID<2670992.LZFPrmIrY0@PointedEars.de>
In reply to#16912
Evertjan. wrote:

> Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:
>>> You cannot know what I read or did not.
>> 
>> Correct.  I should have said that you *could* have seen then that you
>> are wrong then.
> 
> Accepted. That presupposes that I "am" wrong.

It is self-evident that you are.  See below.
 
>> Which does not change the fact that you are *wrong*.
> 
> Your shouting *wrong* underlines that you feel you cannot prove the "are",
> in English that does not help your point, in German some say it does.

Either you are really obtuse or you are trolling.
 
>>> It could be that I just don't agree with your words,
>> 
>> It does not matter what you agree with.  The truth of reality
>> disproves you.
> 
> I disagree. Truth is only agreement over supposed facts.

Nonsense.
 
> The same goes for reality as perceived by you.

FWIW, you have claimed:

| Google search does only index complete words, strings of letters, 
| all other characters are just seen as spaces. 

The truth of reality is that Google finds a lot of occurrences of "&&" on 
the Web.  In order to do that it has to have it in its index.  So it does 
not "only index complete words, strings of letters", and it is not the case 
that "all other characters are just seen as spaces."

This disproves what you have claimed.  IOW, you are wrong.

> [You don't mean truce, btw?]

No.


PointedEars
-- 
Sometimes, what you learn is wrong. If those wrong ideas are close to the 
root of the knowledge tree you build on a particular subject, pruning the 
bad branches can sometimes cause the whole tree to collapse.
  -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>

[toc] | [prev] | [next] | [standalone]


#16914

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2012-10-27 22:53 +0200
Message-ID<XnsA0F9E8CC49938eejj99@194.109.133.133>
In reply to#16913
Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:

>> I disagree. Truth is only agreement over supposed facts.
> 
> Nonsense.

So something is the truth is because you think it is?

Or is truth what both parties in a discussion agree upon to be true?

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#16918

FromJohn G Harris <john@nospam.demon.co.uk>
Date2012-10-28 11:37 +0000
Message-ID<x6oZg2GpjRjQFwW9@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD>
In reply to#16909
On Sat, 27 Oct 2012 at 16:18:13, in comp.lang.javascript, Thomas
'PointedEars' Lahn wrote:
>Evertjan. wrote:
>
>> Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:
>>> However, the reason that searching for `||' fails is probably that
>>> Google supports `|' as an alternative to *its* logical `OR' in an
>>> advanced query,
>>
>> No.
>>
>> Google search does only index complete words, strings of letters,
>> all other characters are just seen as spaces.
>
>If you had read my posting whole, you would have seen that you are wrong.

Google : "Your search - || - did not match any documents."

It does the same for ++ and -- . (Usually)

Also, the old-style Google Groups can't tell the difference between
comp.lang.C and comp.lang.C++ .

  John
-- 
John Harris

[toc] | [prev] | [next] | [standalone]


#16920

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-10-28 12:50 +0100
Message-ID<103983168.HxUOtsDO4S@PointedEars.de>
In reply to#16918
John G Harris wrote:

> On Sat, 27 Oct 2012 at 16:18:13, in comp.lang.javascript, Thomas
> 'PointedEars' Lahn wrote:
>> Evertjan. wrote:
>>> Thomas 'PointedEars' Lahn wrote on 27 okt 2012 in comp.lang.javascript:
>>>> However, the reason that searching for `||' fails is probably that
>>>> Google supports `|' as an alternative to *its* logical `OR' in an
>>>> advanced query,
>>>
>>> No.
>>>
>>> Google search does only index complete words, strings of letters,
>>> all other characters are just seen as spaces.
>>
>> If you had read my posting whole, you would have seen that you are wrong.
> 
> Google : "Your search - || - did not match any documents."
> 
> It does the same for ++ and -- . (Usually)
> 
> Also, the old-style Google Groups can't tell the difference between
> comp.lang.C and comp.lang.C++ .

I did not debate that; in fact, I am confirming above that `||' and `"||"' 
do not yield results.  You, too, want to learn to read.

<https://www.google.ch/search?q=%26%26>
| About 97,900,000 results (0.31 seconds)

Last time I checked, `&' was _not_ a letter, and `&&' was _not_ a "complete 
word".

EOD

PointedEars
-- 
    realism:    HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness:    XHTML 1.1 as application/xhtml+xml
                                                    -- Bjoern Hoehrmann

[toc] | [prev] | [next] | [standalone]


#16934

FromMartin Leese <please@see.Web.for.e-mail.INVALID>
Date2012-10-28 13:43 -0600
Message-ID<k6k1sm$v43$1@dont-email.me>
In reply to#16920
Thomas 'PointedEars' Lahn wrote:
...
> Last time I checked, `&' was _not_ a letter, and `&&' was _not_ a "complete 
> word".

Ampersands are used in normal (not code)
text all the time.  Therefore, Google treats
them as a letter.  This is simply fortuitous,
and does not indicate Google's general
policy towards non-letters.

-- 
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/

[toc] | [prev] | [next] | [standalone]


Page 3 of 6 — ← Prev page 1 2 [3] 4 5 6  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web