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


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

Is an idea of website where users can compete with each other interesting?

Started bySergey Zakharov <sergzach@gmail.com>
First post2013-04-10 12:37 -0700
Last post2013-04-11 04:10 -0700
Articles 11 — 6 participants

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


Contents

  Is an idea of website where users can compete with each other interesting? Sergey Zakharov <sergzach@gmail.com> - 2013-04-10 12:37 -0700
    Re: Is an idea of website where users can compete with each other interesting? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-11 00:02 +0200
      Re: Is an idea of website where users can compete with each other interesting? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-04-11 18:40 +0100
        Re: Is an idea of website where users can compete with each other interesting? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-12 01:03 +0200
          Re: Is an idea of website where users can compete with each other interesting? x@x.com (znôrt) - 2013-04-12 21:16 +0200
            Re: Is an idea of website where users can compete with each other interesting? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-04-13 11:45 -0700
              Re: Is an idea of website where users can compete with each other interesting? x@x.com (znôrt) - 2013-04-14 14:36 +0200
      Re: Is an idea of website where users can compete with each other interesting? John G Harris <niam@jghnorth.org.uk.invalid> - 2013-04-15 09:27 +0100
        "Javascript" (was: Is an idea of website where users can compete with each other interesting?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-15 14:55 +0200
        Re: Is an idea of website where users can compete with each other interesting? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-04-16 18:09 +0100
    Re: Is an idea of website where users can compete with each other interesting? Sergey Zakharov <sergzach@gmail.com> - 2013-04-11 04:10 -0700

#19209 — Is an idea of website where users can compete with each other interesting?

FromSergey Zakharov <sergzach@gmail.com>
Date2013-04-10 12:37 -0700
SubjectIs an idea of website where users can compete with each other interesting?
Message-ID<e988e830-46b7-45de-a6ba-a411a89a0c09@googlegroups.com>
Is it interesting to compete with each other for points?

There are a new website for real-time programming competitions (Javascript supported): http://hackerlines.com.

You are welcome!

I will be very glad if you write here your opinions. Thanks a lot.

[toc] | [next] | [standalone]


#19211

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-04-11 00:02 +0200
Message-ID<3440417.l2pBrVLpSq@PointedEars.de>
In reply to#19209
Sergey Zakharov wrote:

> Is it interesting to compete with each other for points?

In theory, yes.
 
> There are a new website for real-time programming competitions (Javascript
        ^^^ is 
> supported): [URL]
> 
> You are welcome!
> 
> I will be very glad if you write here your opinions.

There is no „Javascript“: <http://PointedEars.de/es-matrix>

You should not use junk like jQuery, see 
<http://www.fortybelow.ca/hosted/dhtmlkitchen/JavaScript-Query-Engines.html> 
and David Mark's postings, among others.

You should not use a for-in statement to iterate over Arrays and Array-like 
objects; see the archives.

You should adhere to code conventions common to the used programming 
language (and _not_ to one common to *another* language).  In that regard, 
in ECMAScript whitespace belongs *before* *opening* and *after* *closing* 
brackets (unless in a /MemberExpression/, in which case there should not be 
whitespace before the opening bracket, but may be after the last bracket), 
not vice-versa.  

Common:

  if (user0[0] != "user3669" && user1[0] != "user3669")

Weird, because obviously harder to read, thus harder to understand, and 
harder to maintain:

  if( user0[ 0 ] != "user3669" && user1[ 0 ] != "user3669" )
  ^^^        ^^^^^^
  [1]        [2]

[1] Function call or _control statement_?
[2] Where does this expression belong to?

Also, ”user0” should probably be “user[0]” and “user1” should probably be 
“user[1]” instead; that is, avoid numbered variables in favor of Arrays or 
Array-like objects.

> Thanks a lot.

You're welcome.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

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


#19241

FromDr J R Stockton <reply1300@merlyn.demon.co.uk.invalid>
Date2013-04-11 18:40 +0100
Message-ID<KvYUAsE3VvZRFwlM@invalid.uk.co.demon.merlyn.invalid>
In reply to#19211
In comp.lang.javascript message <3440417.l2pBrVLpSq@PointedEars.de>,
Thu, 11 Apr 2013 00:02:25, Thomas 'PointedEars' Lahn
<PointedEars@web.de> posted:

>You should adhere to code conventions common to the used programming
>language (and _not_ to one common to *another* language).

And so should you; so let us hear no more wittering about attributions
differing from conventions peculiar to the .de hierarchy.

-- 
 (c) John Stockton, nr London UK. Mail, see Homepage. BP7, Delphi 3 & 2006.
   <http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
   <http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htm> clpdmFAQ;
   NOT <http://support.codegear.com/newsgroups/>: news:borland.* Guidelines

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


#19244

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-04-12 01:03 +0200
Message-ID<2120096.TvCSgZqcje@PointedEars.de>
In reply to#19241
Dr J R Stockton wrote:

> In comp.lang.javascript message <3440417.l2pBrVLpSq@PointedEars.de>,
> Thu, 11 Apr 2013 00:02:25, Thomas 'PointedEars' Lahn
> <PointedEars@web.de> posted:
> 
>>You should adhere to code conventions common to the used programming
>>language (and _not_ to one common to *another* language).
> 
> And so should you; so let us hear no more wittering about attributions
> differing from conventions peculiar to the .de hierarchy.

If you had paid attention, I was talking about *code* conventions of 
*programming* languages.  Curious, though; I would have expected a rambling 
about code style from you, since your JS/ES code style is like that of non-
Object Pascal, even worse than the OP's.

As for attribution _lines_ instead of your novels, and why the latter is 
inappropriate, see for example

<http://en.wikipedia.org/wiki/Posting_style#Attribution_lines>

which is not running the risk of being “.de”-specific.  Note that the 
section describes the attribution _line_, despite its title.

BTW, it's “de.”, “de.*”, or “de.ALL“ hierarchy.  (So much for your 
understanding NetNews.)

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

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


#19247

Fromx@x.com (znôrt)
Date2013-04-12 21:16 +0200
Message-ID<87bo9jpnje.fsf@smoothskuarematr.ix_>
In reply to#19244
Thomas 'PointedEars' Lahn <PointedEars@web.de> writes:

> If you had paid attention, I was talking about *code* conventions of 
> *programming* languages.  

if you had paid attention, there simply is no convention for
javascript. a paper published here or some house rules there do not
produce a convention. a natural convergence in the community driven by
consensus of relevant players resulting in general adoption
does. neither exist in the jAvAscripT community nowadays, now matter how
loud and often you may rant.

there are some guidelines, though. even some with very good points, but
they simply don't catch on enough and are still competing. my guess is
that JAVAscript (as in ' taken seriously') is too new, and javaScript
ecosystem is simply too diverse. personally, i consider this a
plus. after 25 years of coding professionaly in about a dozen
programming languages i'm truly fed up with conventions. code and let
code, man. just do it.

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


#19259

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2013-04-13 11:45 -0700
Message-ID<3f143f64-5d70-4910-aada-ba9915428a68@u20g2000yqj.googlegroups.com>
In reply to#19247
On Apr 12, 2:16 pm, x...@x.com (znôrt) wrote:
> Thomas 'PointedEars' Lahn <PointedE...@web.de> writes:
>
> > If you had paid attention, I was talking about *code* conventions of
> > *programming* languages.
>
> if you had paid attention, there simply is no convention for
> javascript. a paper published here or some house rules there do not
> produce a convention. a natural convergence in the community driven by
> consensus of relevant players resulting in general adoption
> does. neither exist in the jAvAscripT community nowadays, now matter how
> loud and often you may rant.
>
> there are some guidelines, though. even some with very good points, but
> they simply don't catch on enough and are still competing. my guess is
> that JAVAscript (as in ' taken seriously') is too new, and javaScript
> ecosystem is simply too diverse. personally, i consider this a
> plus. after 25 years of coding professionaly in about a dozen
> programming languages i'm truly fed up with conventions. code and let
> code, man. just do it.


- It is true that the size of the language community has resulted in
cliques of style/convention, but there an overarching theme of
convention that is generally cross-cutting. For example: camelCasing
of non constructors and PascalCasing of constructors should be
admitted as being the settled on convention. The bracing style has
settled towards a variant of 1TBS due to semicolon insertion issues
and premature optimization of code size.

- Calling the language "new" after 18 years seems questionable.

- Regardless of whether you've programmed in some capacity for 2
years, 25 years, or 50 years, if you are using a language that doesn't
enforce convention and you are working in any capacity with other
developers, it is sane to adopt one. Code is read more often than it
is written and as a language it should be expressed in a way that
facilitates communication between Man and Man as well as Man and
Machine.

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


#19266

Fromx@x.com (znôrt)
Date2013-04-14 14:36 +0200
Message-ID<87txn970hw.fsf@smoothskuarematr.ix_>
In reply to#19259
"Michael Haufe (TNO)" <tno@thenewobjective.com> writes:

> - It is true that the size of the language community has resulted in
> cliques of style/convention, but there an overarching theme of
> convention that is generally cross-cutting.

i see what you did there. :-)

now the topic isn't 'javascript code convention' anymore but 'a subset
of all conventions defined by an overarching theme that is generally
cross-cutting'. different things for me.

> - Calling the language "new" after 18 years seems questionable.

well, a vast majority of js programmers just 5 years ago didn't worry
about constructors at all. int this regard, js is pretty new.

> The bracing style has settled towards a variant of 1TBS due to
> semicolon insertion issues and premature optimization of code size.

depends. naming and case tend to have great impact on readability, while
bracing style is absolutely irrelevant if used consistently. 

> Regardless of whether you've programmed in some capacity for 2 years
> 25 years, or 50 years, 

it means having adapted to very different languages, contexts and
environments. and conventions, of course. it means i have no problem
whatsoever in following any convention ... when there's a need for
it. 

i still see no need to enforce some particular instance of it on the
code posted on discussion groups. gross eye-bleeding offences (in the
overarching generally accepted theme) may or may not be pointed out, but
being picky about every little perceived offense is just noise. plus,
given there is no real standard, it's just bigotry. guess how many style
bigots i've been in contact with in 25 years of reading! xD

> Code is read more often than it is written and as a language it should
> be expressed in a way that facilitates communication between Man and
> Man as well as Man and Machine.

sure, but i would expect man to be more flexible than machine. 

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


#19286

FromJohn G Harris <niam@jghnorth.org.uk.invalid>
Date2013-04-15 09:27 +0100
Message-ID<y$wNbaGBo7aRFwa1@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD>
In reply to#19211
In message <3440417.l2pBrVLpSq@PointedEars.de>, Thomas 'PointedEars' 
Lahn wrote:

   <snip>
>There is no „Javascript“:
   <snip>

When the program executes in Firefox it is a JavaScript program that is 
executing, by definition.

When the program executes in Internet Explorer it is a JScript program 
that is executing, by definition.

Which language, then, is the program written in?

   John
-- 
John Harris

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


#19288 — "Javascript" (was: Is an idea of website where users can compete with each other interesting?)

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-04-15 14:55 +0200
Subject"Javascript" (was: Is an idea of website where users can compete with each other interesting?)
Message-ID<31781433.gsCDQWZLxy@PointedEars.de>
In reply to#19286
John G Harris wrote:

> Thomas 'PointedEars' Lahn wrote:
>> There is no „Javascript“:
> 
> When the program executes in Firefox it is a JavaScript program that is
> executing, by definition.

That is correct.

However, because there are now (at the latest since Google V8 JavaScript in 
2006 CE¹) several (but not all) ECMAScript implementations bearing the 
„JavaScript“ name, it appears to be prudent to include the vendor name in 
the implementation name if it contains „JavaScript“.  Thus, *Mozilla* 
JavaScript for what was *Netscape* JavaScript before 2002 CE².  (Therefore, 
the ECMAScript Support Matrix³ which considers both those implementations, 
uses Netscape/Mozilla JavaScript; so do I here on occasion.)

> When the program executes in Internet Explorer it is a JScript program
> that is executing, by definition.

Historically correct.  And a program with ECMAScript-based syntax that 
executes as part of ASP (.NET) is a JScript (.NET) program as well.

However, recently Microsoft begs to differ in the documentation of their 
client-side implementation⁴ (but not in their choosing the engine name, see 
the unchanged return value of “ScriptEngine()”).  It would be interesting to 
know if this is just an oversight in MSDN, or if they made a deal with 
Oracle that allows them to use Oracle’s “JavaScript” trademark.  Likewise 
for Google.
 
> Which language, then, is the program written in?

An ECMAScript-based programming language; which now is for practical 
purposes “an implementation of ECMAScript”, or “an ECMAScript (ES)
implementation” for short.  (That was easy.)

Your question is like asking in which programming language a program 
executable by the Bourne Shell, the POSIX shell, GNU bash, and dash; or 
executable by POSIX awk, GNU awk, and nawk; or executable by CPython, Jython 
and PyPy; or compilable with the GNU C, Microsoft C, and Borland C 
compilers, was or is written.

Obviously those are different and differing *implementations* as well.  But 
the difference *to them* here is that the name of the programming language 
and standard that Netscape/Mozilla JavaScript, Microsoft JScript, Google V8 
JavaScript, (still⁵) Opera ECMAScript, and KDE JavaScript, among *many* 
others, are implementations of⁶ does _not_ contain the same or a similar 
name; it does not bears the name “JavaScript”, nor “Javascript”, or 
“javascript”.  Like it or that programming language and standard was and is 
called – by Technical Committee 39 agreement, and subsequent Ecma 
International General Assembly vote – _ECMAScript_ (commonly abbreviated 
“ES”, see “es-discuss”⁷) instead.⁸

That name is precise and unambiguous enough that it should be adopted for 
general discussions about the aforementioned implementations.  (I can see 
this already happening in this newsgroup by statements of other people.)

________
¹ Morita, Hajime (2009-01-13). „Why Is the New Google V8 Engine So Fast?
  [Part 1]“. In: Nikkei Electronics Asia.  <http://techon.nikkeibp.co.jp/
  article/HONSHI/20090106/163615/> (visited on 2012-02-15).
² Mozilla.org and Contributors (2012). History of the Mozilla Project.
  http://www.mozilla.org/about/history.html (visited on 2012-02-15).
³ <http://PointedEars.de/es-matrix>
⁴ <http://msdn.microsoft.com/en-us/library/hbxc2t98(v=vs.84).aspx>
  vs. <http://msdn.microsoft.com/en-us/library/
  system.web.mvc.html.formextensions(v=vs.108)?cs-save-lang=1bear
  &cs-lang=jscript#code-snippet-1>
  and <http://msdn.microsoft.com/en-us/library/d1et7k7c(v=VS.94).aspx>
⁵ <http://business.opera.com/press/releases/general/opera-gears-up-at-300-
   million-users>
⁶ with the exception of now-irrelevant Netscape JavaScript 1.0, 1.1, and
  Microsoft JScript 1.0
⁷ <http://www.ecmascript.org/community.php>
⁸ Krill, Paul (2008-06-23). „JavaScript creator ponders past, future“.
  In: InfoWorld. Developer World. <http://www.infoworld.com/d/developer-
  world/javascript-creator-ponders-past-future-704> (visited on
  2011-12-22).
-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

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


#19296

FromDr J R Stockton <reply1300@merlyn.demon.co.uk.invalid>
Date2013-04-16 18:09 +0100
Message-ID<PJI1J0A+WYbRFwn5@invalid.uk.co.demon.merlyn.invalid>
In reply to#19286
In comp.lang.javascript message <y$wNbaGBo7aRFwa1@J.A830F0FF37FB96852AD0
8924D9443D28E23ED5CD>, Mon, 15 Apr 2013 09:27:45, John G Harris
<niam@jghnorth.org.uk.invalid> posted:

>In message <3440417.l2pBrVLpSq@PointedEars.de>, Thomas 'PointedEars'
>Lahn wrote:
>
>  <snip>
>>There is no „Javascript“:
>  <snip>
>
>When the program executes in Firefox it is a JavaScript program that is
>executing, by definition.
>
>When the program executes in Internet Explorer it is a JScript program
>that is executing, by definition.


Only if it looks more-or-less like ECMAScript.  If it executes and looks
like VBScript, it is off-topic here.

I have about four Web pages that rely on VBScript.

-- 
 (c) John Stockton, nr London, UK.   E-mail, see Home Page.    Turnpike v6.05.
 Website  <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm
 Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.

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


#19213

FromSergey Zakharov <sergzach@gmail.com>
Date2013-04-11 04:10 -0700
Message-ID<a51d551a-42a6-4c2b-95a8-8fd1492a919d@googlegroups.com>
In reply to#19209
On Thursday, April 11, 2013 1:59:32 AM UTC+4, Thomas 'PointedEars' Lahn wrote:
> Sergey Zakharov wrote:
> 
> 
> 
> > Is it interesting to compete with each other for points?
> 
> 
> 
> In theory, yes.
> 
>  
> 
> > There are a new website for real-time programming competitions (Javascript
> 
>         ^^^ is 
> 
> > supported): [URL]
> 
> > 
> 
> > You are welcome!
> 
> > 
> 
> > I will be very glad if you write here your opinions.
> 
> 
> 
> There is no „Javascript“: <http://PoinedEars.de/es-matrix>
> 
> 
> 
> You should not use junk like jQuery, see 
> 
> <http://www.fortybelow.ca/hosted/dhtmlkitchen/JavaScript-Query-Engines.html> 
> 
> and David Mark's postings, among others.
> 
> 
> 
> You should not use a for-in statement to iterate over Arrays and Array-like 
> 
> objects; see the archives.
> 
> 
> 
> You should adhere to code conventions common to the used programming 
> 
> language (and _not_ to one common to *another* language).  In that regard, 
> 
> in ECMAScript whitespace belongs *before* *opening* and *after* *closing* 
> 
> brackets (unless in a /MemberExpression/, in which case there should not be 
> 
> whitespace before the opening bracket, but may be after the last bracket), 
> 
> not vice-versa.  
> 
> 
> 
> Common:
> 
> 
> 
>   if (user0[0] != "user3669" && user1[0] != "user3669")
> 
> 
> 
> Weird, because obviously harder to read, thus harder to understand, and 
> 
> harder to maintain:
> 
> 
> 
>   if( user0[ 0 ] != "user3669" && user1[ 0 ] != "user3669" )
> 
>   ^^^        ^^^^^^
> 
>   [1]        [2]
> 
> 
> 
> [1] Function call or _control statement_?
> 
> [2] Where does this expression belong to?
> 
> 
> 
> Also, ”user0” should probably be “user[0]” and “user1” should probably be 
> 
> “user[1]” instead; that is, avoid numbered variables in favor of Arrays or 
> 
> Array-like objects.
> 
> 
> 
> > Thanks a lot.
> 
> 
> 
> You're welcome.
> 
> 
> 
> -- 
> 
> PointedEars
> 
> 
> 
> Twitter: @PointedEars2
> 
> Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Thank you very much, Thomas. Very useful advices about user names and coding conventions.

[toc] | [prev] | [standalone]


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


csiph-web