This is probably a fine resource. Can't really judge it - I avoid JavaScript to the extend humanly possible. But please - could someone end the devaluation of the word cheatsheet . A cheatsheet should be just that - a sheet of paper or its digital equivalent, with a few short, clear notes of essentials. Not a rambling document. Not something with a table of contents.
Cheatsheet for the modern JavaScript
11–20 of 37 posts
Re: Cheatsheet for the modern JavaScript
#12This is probably a fine resource. Can't really judge it - I avoid JavaScript to the extend humanly possible. But please - could someone end the devaluation of the word cheatsheet . A cheatsheet should be just that - a sheet of paper or its digital equivalent, with a few short, clear notes of essentials. Not a rambling document. Not something with a table of contents.
* https://zeroturnaround.com/wp-content/uploads/2017/03/regex-...
* https://rumorscity.com/wp-content/uploads/2014/08/10-Best-VI...
Re: Cheatsheet for the modern JavaScript
#13Ugh, why can't JavaScript programmers learn from others languages first? Making all your variables const is just going to confuse most people WHEN THEY'RE NOT CONSTANT. Stop with the const spam already, you just look like dicks. I am waiting for the articles in 3 years time, "const isn't constant" as the JavaScript community tediously explain to each other ref. vs value types like it's the 1990s. Just use let and sto…
Why would you choose to weaken the communication in your code by choosing `let` over `const` when you have no intention of reassign the value? `let` would just confuse the reader as they'd start anticipating the reassignment.
Compare:
```
// A variable containing an object that will not be reassigned
const a = { foo: 10};
// This is still valid
a.foo = 10;
```
vs
```
// A variable containing an object that might be reassigned.
let a = { foo: 10};
// This is still valid
a.foo = 10;
```
The first example says more about your intent and throwing that information away is a bad idea.
Re: Cheatsheet for the modern JavaScript
#14This is probably a fine resource. Can't really judge it - I avoid JavaScript to the extend humanly possible. But please - could someone end the devaluation of the word cheatsheet . A cheatsheet should be just that - a sheet of paper or its digital equivalent, with a few short, clear notes of essentials. Not a rambling document. Not something with a table of contents.
Thank you. For comparison, these are real cheatsheets: * https://zeroturnaround.com/wp-content/uploads/2017/03/regex-... * https://rumorscity.com/wp-content/uploads/2014/08/10-Best-VI... * https://wch.github.io/latexsheet/latexsheet-1.png
It was interesting that these are all bitmap image files at a rather low resolution. The text is so blurry on all of them! It made me wonder: do people actually use these kinds of image cheatsheets? They wouldn't print well, and zooming in on screen just gives blurry text. My old laminated sheets had crisp high-quality printed text.
It would be different if they were in a vector format, of course. But since I'm not printing them anyway, the traditional cheatsheet is no longer a useful format for me. I much prefer a short document like the OP's "cheatsheet" with legible text that I can scroll through on any device without having to zoom in and pan around.
I suppose one could object to the "sheet" part, since you can't print a document like this on a single sheet of letter or A4 paper. But that doesn't bother me at all: I started my programming career on Teletype machines that used roll paper, and we routinely printed out cheatsheets of varying length. There was no set height to a sheet: it ended wherever you tore it off the roll.
What would be a better name for a document like this that serves the purpose of a traditional cheatsheet but is in a format more suited for digital reading? Maybe "A short guide to ..."?
(Updated with more stories)
Re: Cheatsheet for the modern JavaScript
#15Earlier quoted context omitted.
Thank you. For comparison, these are real cheatsheets: * https://zeroturnaround.com/wp-content/uploads/2017/03/regex-... * https://rumorscity.com/wp-content/uploads/2014/08/10-Best-VI... * https://wch.github.io/latexsheet/latexsheet-1.png
Thanks for the cheatsheet examples. They bring back fond memories of the laminated cheatsheets I used to buy at the bookstore. But it's been a long time since I used one of those; now I just want everything in digital form to keep my backpack light. It was interesting that these are all bitmap image files at a rather low resolution. The text is so blurry on all of them! It made me wonder: do people actually use these…
Re: Cheatsheet for the modern JavaScript
#16I usually just do just enough javascript, but didn't know the difference between let and var, not it makes sense. the explanation of reduce made sense too.
Re: Cheatsheet for the modern JavaScript
#17Ugh, why can't JavaScript programmers learn from others languages first? Making all your variables const is just going to confuse most people WHEN THEY'RE NOT CONSTANT. Stop with the const spam already, you just look like dicks. I am waiting for the articles in 3 years time, "const isn't constant" as the JavaScript community tediously explain to each other ref. vs value types like it's the 1990s. Just use let and sto…
In Typescript anyway, `const` means I am not allowed to reassign. Attempting to change it just will cause compiler warnings. If you mean that, ignore Typescript and tooling, and that once the code is in the browser executing, then consts can be changed.... Who cares about that?
Re: Cheatsheet for the modern JavaScript
#18Earlier quoted context omitted.
Thank you. For comparison, these are real cheatsheets: * https://zeroturnaround.com/wp-content/uploads/2017/03/regex-... * https://rumorscity.com/wp-content/uploads/2014/08/10-Best-VI... * https://wch.github.io/latexsheet/latexsheet-1.png
Thanks for the cheatsheet examples. They bring back fond memories of the laminated cheatsheets I used to buy at the bookstore. But it's been a long time since I used one of those; now I just want everything in digital form to keep my backpack light. It was interesting that these are all bitmap image files at a rather low resolution. The text is so blurry on all of them! It made me wonder: do people actually use these…
AFAICT these are low-res previews of high-quality PDF cheat sheets you can buy.
Re: Cheatsheet for the modern JavaScript
#19Ugh, why can't JavaScript programmers learn from others languages first? Making all your variables const is just going to confuse most people WHEN THEY'RE NOT CONSTANT. Stop with the const spam already, you just look like dicks. I am waiting for the articles in 3 years time, "const isn't constant" as the JavaScript community tediously explain to each other ref. vs value types like it's the 1990s. Just use let and sto…
The idea that JS programmers can't learn from others' languages first is an odd one considering that, if I remember correctly, const in JS has the same semantics as the final keyword in Java and it's the default semantics of any local variable in Rust, so it's not something that seems to be out of the ordinary or falling out of favor.
Re: Cheatsheet for the modern JavaScript
#20Ugh, why can't JavaScript programmers learn from others languages first? Making all your variables const is just going to confuse most people WHEN THEY'RE NOT CONSTANT. Stop with the const spam already, you just look like dicks. I am waiting for the articles in 3 years time, "const isn't constant" as the JavaScript community tediously explain to each other ref. vs value types like it's the 1990s. Just use let and sto…
(defvar *db* nil)
(defun add-record (cd) (push cd *db*))
(defun make-cd (title artist rating ripped)
(list :title title :artist artist :rating rating :ripped ripped))
(add-record (make-cd "Roses" "Kathy Mattea" 7 t))
If you're concerned about this kind of thing, we should be encouraging novice programmers to stop using language features they don't understand.[0]: http://www.gigamonkeys.com/book/practical-a-simple-database....