CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Guidelines  (Read 719 times)

ian

  • Keeping on
  • Global Moderator
  • Junior Member
  • *****
  • Posts: 32
  • Karma: +1/-0
Guidelines
« on: 24 Oct 2019, 07:31:18 pm »
The following are guidelines, designed to help get your JavaScript / ECMAscript questions answered.

  • HTML & CSS

    It is assumed that you already know HTML & CSS well and have read the HTML guidelines.

    You can validate JavaScript here.

    You can format code here if necessary

  • JavaScript is NOT Java

    They are two distinct languages with big differences in how they work and how you use them. Using the word Java in a post will likely result in it being ignored since it is deemed to be in the wrong forum. JavaScript is however ECMAscript. It’s understandable if you’re confused, but you know now.

  • JavaScript is not CSS

    CSS is very powerful in what it can do, JavaScript is rarely needed to style pages anymore.

  • JavaScript is for enhanced functionality

    User interaction can be enhanced with JavaScript, but the page must work without it first. If your page relies on JavaScript to work, then you are likely blocking access as many users have browsers that do not support JavaScript or they simply switch it off.

« Last Edit: 24 Oct 2019, 08:01:54 pm by Jason Knight »
Our desire for order and definition is often outweighed by our ability.

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • Karma: +171/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Guidelines
« Reply #1 on: 24 Oct 2019, 08:10:43 pm »
My only issue with this post is that the "linter" you linked to is one of the ones riddled with nit-picky nonsense if not outright malarkey.

Mind you, the massive blast of checkboxes below can be used to turn off said derpitude, but so much of it is just plain stupid.

Like getting its knickers in a twist over unary operators, or complaining about drop-through on "case" which is one of the entire reasons to USE switch/case, or saying there are 'useless escape characters" when they are ESSENTIAL inside a regex -- [0-9\.] for example it throws a warning claiming that it's 'useless'. I could go on for days. By the time I disable all the nonsense, it doesn't do anything anymore!

I mean it even complains about:

Code: [Select]
var x = new XMLHttpRequest();
Just because you didn't say "window.XMLHttpRequest"...

JavaScript validation is mostly BS, and pages like that doubly so. They love to complain about perfectly valid code and even claim some good practices are bad. That it even goes so far as to try and force let/const into things that neither need it, nor are improved by it, and could BREAK the code for client-side use?

Yeah, no...

Otherwise, good post which is why I made it a sticky.
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

ian

  • Keeping on
  • Global Moderator
  • Junior Member
  • *****
  • Posts: 32
  • Karma: +1/-0
Re: Guidelines
« Reply #2 on: 24 Oct 2019, 08:25:00 pm »
There are so many to choose from that there would be pages of links for them all. I've no preference and happy for a change.

A decent editor would sort most of the issues before needing to use an online validator, the problem is a lot of posters when starting out don't always notice what the editor is subtly telling them, an online validator is usually in your face - for good or bad.
Our desire for order and definition is often outweighed by our ability.

 

SMF spam blocked by CleanTalk

Advertisement