An Open Source Book That Teaches JavaScript
github.com
github.com
> Computers are common in today's world, as they are able to perform a wide variety of tasks quickly and accurately. They are used in many different industries, such as business, healthcare, education, and entertainment, and have become an essential part of daily life for many people. Besides this, they are also used to perform complex scientific and mathematical calculations, to store and process large amounts of data, and to communicate with people around the world.
Anyone who would open this book must already know all this. Is there anyone who does not know that computers are everywhere? Does any prospective reader of a book on programming feel that computers are not essential? Does anyone doubt that complex scientific and mathematical calculations are made on computers? Who is this paragraph for? Who has taught us not to proceed straight to business?
I find introductions to books too boring, whether Maths, Programming or just about anything. I hope to document my Programming learning progress and document it in a small book. And I totally wish to steal that line.
“In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move.”
Hitchikers guide to the galaxy
But when I read this in a blog, I’m really turned off. Now I think the writer has no friends, doesn’t know how to make friends.
If this was a book about mechanical engineering, I’d say fine. What I know about ME I can stick in my eye and still see good.
If I find this picking up yet another book on a programming that I’m trying to brush up on… grr I’d have to read it non-linearly.
A book offers structure to get going. 'By example' is great too. As is 'read the manual'. [Good to have all, I like books.]
Getting a structure filled out takes a fair bit of effort. That hurdle's overcome. On Github, its easy to fork / contribute - the tools are right there along with a creative commons (or, Apache in this case) license.
Structure, content, license and tools are all there.
This in the intro can't be of much use. Sure, it's an introductory book, but this isn't a correct simplification. Is JavaScript run by an interpreter or a compiler now? The quote can't decide; and the final stage of JavaScript JITs tends to be machine code too. I know there's often both (with interpreter for cold code, compiler for hot code); but given the level of the rest of the intro, throwing terms like "interpreted", "just in time", "compilation" and "bytecode" which haven't been defined would only lead to confusion, nor are they too relevant.
I feel like we might be entering a new era of education with these LLMs, who will patiently tutor you and answer your every question (not perfectly yet, but we're getting there).
I believe AI will be amazing for traditional language learning with voice recognition but it really needs to improve to be useful in other areas where facts actually matter. Maybe it can be solved by toning it down so it's less convincing and stop making up things. If that's at all possible.
The average functional programmer writes this - and not a for loop :
````
const fizzbuzz = (n)=>(n%15==0)?"FizzBuzz":(n%5==0)?"Buzz":(n%3==0)?"Fizz":n;
Array(101).fill(0).map((_,i)=>fizzbuzz(i))
```` Array(101).fill(0).map((_,i)=> [...])
It's astonishing to me that even with all the niceties added to ES7+, JS still needs to resort to a hack like this for a simple range generator. At least give iterators support for forEach(), reduce(), and map(), so we can use `Array(100).keys()` without having to wrap it with the spread operator.Also, can't help but snark that apparently the "average" FP is so preoccupied with showing off their one-liners that they fail the problem requirements (should be `Array(100).fill(0).forEach((_,i)=>console.log(fizzbuzz(i+1)))`).
fizzbuzz = i => (i % 3 ? "" : "Fizz") + (i % 5 ? "" : "Buzz") || i
Array.from({length: 100}, (_,i) => console.log(fizzbuzz(i+1)))Honestly, I don't understand the complaint, a lean stdlib isn't a shortcoming.
And I don't understand how you can't see the irony of praising a "lean" stdlib immediately after saying every "actual" developer has to add the bloat of importing lodash.
You can have theoretical disagreements with this, but you didn't invent the most popular programming in the world.
As for Python, not interested, it's mostly a "performance doesn't matter, being able to do this without expertise, time or even necessarily intellect does" niche.
JS has been slow to roll in core functionality, but is has made great strides by being highly conservative, not generating the kind of bloat that PHP has.
This is such a weird ad hominin (especially from a two-week-old account).
Regardless, the absolute, overwhelming popularity of jquery pre-ES6 goes to show that practically every developer was of the opinion that JS's weak stdlib was a bug, and the community did their best to patch it. ES7+ is leagues better for it, but it still has room for improvement.