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


Groups > comp.lang.javascript > #34342

Re: Dictionary-like objects

From Joao Rodrigues <groups_jr-1@yahoo.com.br>
Newsgroups comp.lang.javascript
Subject Re: Dictionary-like objects
Date 2017-11-13 20:26 -0200
Organization Aioe.org NNTP Server
Message-ID <oud672$r4k$1@gioia.aioe.org> (permalink)
References (4 earlier) <2901334.aeNJFYEL58@PointedEars.de> <oub380$1do6$1@gioia.aioe.org> <1735928.PYKUYFuaPT@PointedEars.de> <ouck80$50s$4@gioia.aioe.org> <19625708.EfDdHjke4D@PointedEars.de>

Show all headers | View raw


Thomas 'PointedEars' Lahn wrote:
> Joao Rodrigues wrote:
> 
>> Thomas 'PointedEars' Lahn wrote:
>>> Joao Rodrigues wrote:
>>>> I doubt an experienced developer would use: (1) console.log() in
>>>> production code,
>>> Which shows that, at the very least, you are not an experienced developer
>>> yourself.
>>
>> /Ad hominem/ fallacy - the one you like to use most of the time.
> 
> No, it is a logical conclusion.

Logical conclusion? You must be kidding! You are the King of Fallacies 
in Usenet. I have yet to see someone who can beat you in this respect.

>   
>>> *In the right places*, console.log() can be and *is* *very
>>> useful* even in production code.
>>
>> "Different strokes for different folks". Keep using console.log() in
>> production code as you wish. If you really do what you preach, that's
>> because you work alone or do not use version control systems such as
>> GitHub.
> 
> Now *that* is a by-the-book /ad hominem/ argument.

That might be considered a fallacy roughly speaking, but not a 
"by-the-book /ad hominem/ argument", because I was not denigrating your 
image when I said that you worked alone or did not use a version control 
system. However, you interpreted that as an attack to your image. 
Anyway, I just don't care.

> 
> Also, why do you make up things and pretend that they are true?

You do that *all the time* - only you don't recognize the fact.

>  GitHub is
> _not_ a version control system (Git, which GitHub uses, is).

Don't say.

>  And your claim
> that I would not use such is so *obviously* false

> – read my sigs.

FYI, no one cares about them.

>   
>> Anyway, putting console.log() in source code is insane and unnecessary,
>> given all modern browsers provide "DevTools" way more capable to debug
>> code nowadays.
> 
> You are dead wrong.

Maybe a little wrong, not dead wrong.

> 
> Sometimes it is still necessary to use console.log() for debugging because
> the interaction with the built-in debugger causes unwanted results.

I challenge you to give an example of that.

> 
> Also, sometimes it is useful to have console.log() & friends in *some*
> places even if one is not actually debugging the code.  For example, if you
> *want* to generate *messages* that only *developers* need to see.

In debug code, yes. However, using console.log() in production code is 
pure nonsense.

> 
>>> The very point of linters like JSLint is to make sure that it does not
>>> appear *unintentionally* in *production* code, as a remnant of debug
>>> code.

Don't say.

>>>
>>> Annotating “console” as an implicit global for the whole file, as you
>>> suggested, *counteracts* this benefit.  (Except, AISB, if it is a *debug*
>>> library.)

You are picking my comment regarding the OP's question and putting it in 
an wide context. What is the name for this fallacy?

>>>
>>>> (2) an obsolete and opinionated linter such as JSLint.
>>>
>>> The same is true for other linters *by default*, so that argument does
>>> not hold water.
>>
>> Nonsense.
> 
> It is not nonsense.  *For example*, JSHint will by default produce a warning
> on the use of “console”, too, because it does not need to be defined in
> order to be used; so that is not at all “opinionated” of JSLint.

You are missing the point. JSLint is opinionated and everyone knows 
about that, except (maybe) his creator. But you are trying to distort my 
words conveniently in favour of your arguments.

> 
>      [If you want to remember, you had made that argument yourself; I am
>       merely repeating it.  Unfortunately, one can observe here again that
>       you "forget" your own arguments when they become inconvenient for you.]
> 

You do that *all the time*.

> However, maybe by contrast to JSLint, JSHint provides several ways in which
> to disable that warning in *some* places where the use of “console” was
> *intentional*.

My suggestion for using the JSLint global directive would affect only 
the file in which it appears - the OP's example. Nonetheless, you are 
trying to spread panic around such a trivial fact as if it was the end 
of the world.


>>>>> You have no clue what you are talking about.
>>>> You too!
>>> LOL.
>>
>> That was hilarious indeed.
> 
> It was.  Your overconfident ignorance is most refreshing at times.
> Have you ever heard of the Dunning–Kruger effect?

Again, one can observe your customary behaviour in using /ad hominem/ 
fallacy against everyone that "dares" to thwart your arguments.


> 
> Here is another one:
> 
>    /* somewhere in code that the OP’s code uses */
>    Object.prototype.answer = 42;

Extending Object.prototype is generally a bad idea, but extending it 
with enumerable properties is even worse. I would never expect that from 
you. And you are changing my words, putting them in a different context, 
just to prove your point.

I had enough. Bye.


-- 
Joao Rodrigues

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

get average height in an object JRough <janis.rough@gmail.com> - 2017-11-11 14:57 -0800
  Re: get average height in an object Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-11-12 06:04 -0200
    Re: get average height in an object Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-11-12 06:49 -0200
    Re: get average height in an object John G Harris <niam@jghnorth.org.uk.invalid> - 2017-11-12 13:39 +0000
    Re: get average height in an object Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-11-12 13:40 -0200
      Re: get average height in an object JRough <janis.rough@gmail.com> - 2017-11-13 12:06 -0800
      Re: get average height in an object Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-11-15 13:14 -0200
        Re: get average height in an object "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-11-15 22:21 +0100
          Re: get average height in an object "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-11-15 22:57 +0100
            Re: get average height in an object Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-11-16 02:46 -0200
              Re: get average height in an object "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-11-17 13:06 +0100
    Re: get average height in an object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-12 18:24 +0100
      Re: get average height in an object Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-11-13 00:26 -0200
        Re: get average height in an object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-13 03:42 +0100
          Re: get average height in an object Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-11-13 01:23 -0200
            Re: get average height in an object Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-13 14:16 +0100
              Re: get average height in an object Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2017-11-13 14:20 -0300
                Dictionary-like objects (was: get average height in an object) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-13 19:56 +0100
                Re: Dictionary-like objects Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2017-11-13 20:26 -0200
                Re: Dictionary-like objects Julio Di Egidio <julio@diegidio.name> - 2017-11-13 15:48 -0800
                Re: Dictionary-like objects Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-11-15 02:55 +0100
                Re: Dictionary-like objects Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-11-15 12:30 -0200
                Re: Dictionary-like objects John G Harris <niam@jghnorth.org.uk.invalid> - 2017-11-15 15:59 +0000
        Re: get average height in an object JRough <janis.rough@gmail.com> - 2017-11-13 12:08 -0800
      Re: get average height in an object John G Harris <niam@jghnorth.org.uk.invalid> - 2017-11-13 10:17 +0000
      Re: get average height in an object JRough <janis.rough@gmail.com> - 2017-11-13 12:07 -0800
  Re: get average height in an object "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-11-12 11:00 +0100
    Re: get average height in an object "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-11-12 11:15 +0100
    Re: get average height in an object JRough <janis.rough@gmail.com> - 2017-11-13 12:28 -0800

csiph-web