Help Learning JavaScript (Absolute Beginner)

If you read closely, you’ll find that I’m not telling OP anything. I wrote

I’d recommend you also learn about what a computer is and how it works. One of the most fundamental sources on that would be Donald Knuth’s “The Art of Computer Programming” or Charles Petzold’s “Code”.

To reiterate what I just quoted, just in case you missed it again: I currently cannot think of any sources, books or otherwise, which are more fundamental and therefore explain the process in any more detail than these. If you do, go right ahead and suggest them, I’m certainly not stopping you. I’m not saying it’s the most accessible book, I’m also not saying these were the most fun to read or whatever. In fact there are many more things I didn’t say, so please just stick with what I did say.

The person who “told” OP what (not) to read, actually, is BronzeV. I’m very much against trying to keep people from exploring sources for themselves. Mostly because that’s a terrible way of doing things if you want to foster competent, self-sufficient learners.

1 Like

It depends on who is learning and what the goal is.

For some learning the more technical – and for some, boring – parts about computing (such as memory allocation, pointers, etc) early on will certainly help them understand what’s happening faster. If you want to really get what you’re doing, then JavaScript or other high-level languages will obscure a lot of the details. For these kind of people it might also be helpful to start programming in Basic or C or something.

On the other hand, if you’re someone who just wants to build something cool that can do what you want, even though half of what it does is basically a “black magic box” for you, then it is advisable to start with JavaScript and learn from a Youtube video.

Of course there’s gradations in between these two. :slight_smile:

4 Likes

I think your self quote has removed a quite important piece of context, by omitting the first clause:

If your aim was not to suggest that he read Knuth, then what were you trying to accomplish?

1 Like

Suggesting that someone learn the fundamentals of how computers works before, or even while, learning to code strikes me as akin to suggesting that someone learn the fundamentals of number theory before or while learning basic math.

Learning the underlying theory, in either case, is certainly illuminating for understanding how everything else works, but also unnecessary, and likely intractable. Learn how to code, get familiar with the basics, and then learn the theory behind those basics. You won’t be able to implement any of the exercises, anyways, if you don’t know what a ‘for’ loop is.

4 Likes

As you see in this thread, programmers are an opinionated bunch. You will encounter lots of conflicting advice. Do not get discouraged by it - there is more than one way to do things, and as you gain experience you will develop your own taste. Programming (and debugging) develops your sense of skepticism: a good programmer needs to be open to new ideas, but he also knows that 90% of all advice is crap.

I can’t help you much with JavaScript - I’ve done a couple medium sized projects with it, but do not consider myself a skilled programmer in that language.

My favorite language currently is Go. I use it for most of my new projects, and have found it very easy to maintain over time. Give it a try sometime.

Hope this helps. Programming can be great fun, so hope you will enjoy it!

4 Likes
2 Likes

Again, I appreciate all of the advice I have continued to receive. While I see that some feel like @smurph’s recommendation is not the best, I was serious when I said I will carefully consider all options. It is really important to realize that I love learning just about anything. Mind you I am still very young so many of my conclusions may not be too well formed. However, in my experience many children around my age seem to have a poor motivation for learning and seem to not be very self-driven. I think we need more people in the world like @smurph who want to give that issue a little kick. In other words, smurph’s recommendation may or may not target my objective straight on but he did clearly indicate that that had more to do with computers in general (which, quite realistically, would be a good idea considering I don’t know much about a computer in general). Maybe that book would be a little complicated for me, but in my experience, along the lines of learning, there is never anything that isn’t worth trying. @smurph is trying to be helpful, and everyone, especially myself, needs to be grateful of that fact, so there is no need to get hot. Instead of denying his suggestion, I will take his advice, and surely I will come out having learned something. Let’s all try to follow his example and approach learning the way he does!

9 Likes

I just heard about this site. I haven’t tried it (being a 30+ year veteran of programming,) but you could check it out and let me know how it goes.

2 Likes

Say something ridiculous, try to claim it wasn’t ridiculous, attack people who still see ridiculous as ridiculous.

2 Likes

I think we should all be embarrassed by @Go_Board’s example, since clearly a 9th grader is demonstrating more maturity than the rest of us.

3 Likes

I’ve been programming for some 40 years and I found Elevator Saga way more entertaining than it has any right to be. Great recommendation!

5 Likes

Me too. Insane programmer-addiction.

2 Likes

I has been learning about a month web development with https://learn.freecodecamp.org/ , since you are interested purely in js then I strongly recommend you to do the “javascript algorithm and data structures certification” part, I completed it a couple of days ago and is by far the best course I have taken about a programming language.

Also, If you are interested in programming (but the advice can be applied for the acquisition of any new skill) I strongly recommend you define the scope of what you are trying to learn… programming is a extremely deep topic (from web development , to machine learning , there are a ton of fields you can get), then I think is better if you have and idea about what do you wanna do, and which field of programming are you trying to enter.
I talk from my personal point of view, since I wanna enter to web development only, so right now I’m learning the stack MERN, then I’m trying to get good at this stack ONLY ( at least until I get a job with it), but I guess the advice goes for every skill, since it is important to have clarity in what are you are aiming to do , otherwise you are gonna spend a lot of time going in circles.

2 Likes

From the preface of Volume 4A:

OK, it’s clear that the field of Combinatorial Algorithms is vast, and I can’t cover it all. What are the most important things that I’m leaving out? My biggest blind spot, I think, is geometry, because I’ve always been much better at visualizing and manipulating algebraic formulas than objects in space. Therefore I don’t attempt to deal in these books with combinatorial problems that are related to computational geometry, such as close packing of spheres, or clustering of data-points in n-dimensional Euclidean space, or even the Steiner tree problem in the plane. More significantly, I tend to shy away from polyhedral combinatorics, and from approaches that are based primarily on linear programming, integer programming, or semidefinite programming. Those topics are treated well in many other books on the subject, and they rely on geometrical intuition. Purely combinatorial developments are easier for me to understand.

Most of this book is self-contained, although there are frequent tie-ins with the topics discussed in Volumes 1—3.

This book has been written for readers with varying degrees of mathematical training and sophistication; as a result, some of the exercises are intended only for the use of more mathematically inclined readers. The rating is preceded by an M if the exercise involves mathematical concepts or motivation to a greater extent than necessary for someone who is primarily interested only in programming the algorithms themselves. An exercise is marked with the letters “HM” if its solution necessarily involves a knowledge of calculus or other higher mathematics not developed in this book.

(Bolded by me.)

His sentences are pleasant and approachable—I guess he wasn’t joking when he coined the phrase literate programming. I’m stuck at page 3 though, when he says:

In other words, 15.5·16 + 14.5·6 + … + 0.5·8 = 0.5·11 + … + 14.5·4 + 15.5·7; and in this particular example we also have another kind of balance, 16 + 6 + … + 8 = 11 + 16 + … + 7, hence also 16·16 + 15·6 + … + 1·8 = 1·11 + … + 15·4 + 16·7.

(He’s refering to a diagram of a lever with weights.)

I think it would take a while before I reach the end of §7 (1st section of the book), which is before §7.1.

By the way, at the end of preface he quotes:

The average boy who abhors square root or algebra
finds delight in working puzzles which involve similar
principles, and may be led into a course of study
which would develop the mathematical and inventive bumps
in a way to astonish the family phrenologist.

— SAM LOYD, The World of Puzzledom (1896)

Maybe he’s suggesting to look at other puzzles for readers not ready.


I found specifically a page Learn web development. In it for example there’s “Server-side website programming”. Near the beginning it suggests reading “What is a web server” so I think the author is good at reading my mind—it looks like I can jump in anywhere.


Edsger Dijkstra—The Man Who Carried Computer Science on His Shoulders:

The EWDs [—private reports prefixed with his initials—] were initially written in Dutch using a typewriter. In 1972, Dijkstra switched to writing exclusively in English, and in 1979 he began writing them mostly by hand.

Denken als discipline bij Noorderlicht (he starts writing with his fountain pen at 4:20):

Exams were always oral and could last a couple of hours. Upon completion of the exam, an informal chat followed during which the student was presented with a signed photo of Dijkstra, and a beer—age permitting.

I’ve no experience with oral exam and only seen it in films but it sounds fun.

2 Likes

This concept called metalinguistic abstraction looks interesting:

For example, consider modelling an airport inside a computer. A procedural (e.g. C) programmer would create data structures to represent the elements of an airport and procedures or routines to operate on those data structures. An object-oriented (e.g. C++) programmer would create objects to represent the elements of the airport with methods which represent their behaviors. A functional (e.g. Scheme) programmer would create higher-order functions representing both the elements and behaviors of the airport. A metalinguistic programmer would abstract the problem by creating new, embedded domain specific languages for modelling an airport, with peculiar primitives and types for doing so naturalistically. The language could then encompass any or all of the above techniques as required by the problem at hand.
(Wikipedia; why does it cite the SCIP book?—I couldn’t find the passage in there.)

The article recommends the SCIP book so I started reading it but got impatient at §1.2.2 and skipped to Chapter 4 preamble. I found non-mathematical explanations interesting but couldn’t identify with the numerical computing examples. Maybe visual or geometrical examples might work better for me. If there were parallel examples/exercises in various other fields to pick from, possibly more people might get interested in this text. (I know about the accompanying videos but I think I prefer text.)

After all that, I guess I don’t understand metalinguistic abstraction any better than where I started—just another rambling from an aficionado of prefaces and preambles.

2 Likes

SICP is a great book and I am very fond of it but it is a little dated in that way, it was written for MIT undergrads in the 80s who I think could be assumed to all have the background in math and engineering the book uses as the “business domain”. But of course these days many more types of people are programming and are interested in such things as the metalinguistic abstractions.

You might find more modern approaches for learning the same from the Racket community, which I think has graphical environments and tools in its basic tool box. And it definitely is built on the same metalinguistic Scheme foundations. In fact the homepage describes it as the “language oriented programming language”

2 Likes

Accessible articles on the intersection of programming and boardgame?

Associating a new subject with what one’s already familiar with or interested in…


Go-playing automata and negotiating with Nintendo.


Building an AI that Can Beat You at Your Own Game (2018) by Louis Lafair

The article concerns a board game called Pathways and shows an overview of how—from simple beginning—an AI was developed and successively refined.


Chapter 18 Search and the Game of Othello of Paradigms of Artificial Intelligence Programming (1992) by Peter Norvig

Most of the chapter is readable (explanation on “Edge Stability” late in the chapter was cryptic for me but can be skipped) without looking at the previous chapters if you ignore the occasional Lisp-specific terms and don’t dwell too long on the code snippets.

1 Like

Indeed. I think I’ve found good examples of what metalinguisitic abstraction can do.

Puzzler: A Language for 2D Puzzle Game Creation

Puzzler is a DSL designed to streamline the creation of 2D puzzle games. In general, Puzzler allows its users to express simple grid-based puzzle games in a succinct and declarative way.

Glossolalia

Glossolalia is a domain-specific language for the reproducible generation of words in constructed (made-up) languages, commonly called conlangs. Design your conlang’s sounds, syllable structure, and word construction rules in a simple declarative language, then run the file to get a list of generated words!


A project called R-cade seems to combine the above 2 ideas:

R-cade is a simple, retro, game engine for the Racket programming language with a few, specific goals in mind.

Designed for Kids

It is as simple as QBASIC was for me when I was learning to program oh-so-many years ago. But, as they become more comfortable, they can expand to a whole world of possibilities and learn some very powerful concepts provided by Racket.

No External Assets

You will never find asset loading code in R-cade (e.g. sprites, sounds, levels, etc). This is for a few reasons:

  1. Often, what holds kids back is the presumption that they can’t create good assets. Or they lack access to the tools to make them.
  2. I wanted all games to be 100% self-contained in code. Sharing a source file should be all that’s needed to play.
  3. Sprites, sounds, etc. require added libraries that abstract away what’s really taking place. I want to expose the wires.

Retro

Those of us who grew up programming the Trash-80, C64, Atari 2600, GameBoy, NES, … learned a lot about VRAM, wave functions, virtual registers, etc. I want to expose kids to these in a safe environment where they can experiment without worrying about crashing.

3 Likes

@TheGoban 21 months later how goes the JavaScript journey? Do you, by chance, feel like branching out into TypeScript and React? :grinning:

2 Likes

As of right now, I have actually taken a little bit of turn and have been mainly studying a lot of the fundamentals of computers and computer science in general as smurph originally suggested. Data Science, machine learning, and related topics have been of considerable interest so I am buckling down with a lot of the math that goes into it as well. My grandfather just bought me a linear algebra textbook and I hope to work through a course that goes along with it here when I have a little more free time at the beginning of 2021. In addition, I have been actively studying single variable calculus along with my regular schoolwork.

That all being said, I do think I will pursue a career in web development at first and possibly transition into those fields later on. Along with linear algebra, I think I should have more time to get back into JavaScript, HTML, CSS, etc. with freeCodeCamp soon so I will brush up and keep moving forward with web development at that point. I am just trying to prepare myself for college in a couple of years for Computer Science and so I am getting started where I can, taking things one step at a time. And, my regular high school work has been a lot more demanding than I originally anticipated, so I have been quite a bit more limited. But I expect things to free up more in the spring as I already stated.

So, as of now, I don’t have enough of a grasp on web development to learn Typescript or React quite yet, but those are on the to-learn list and, as I suggested in this post almost two years ago, I hope to help contribute to the OGS front end when I do obtain knowledge of those frameworks.

I have learned a lot of C and a bit of Python as well and have built quite a few cool little projects with those languages, though, such as Caesar’s cypher and a few other simple things. Nothing with much of UI yet though. Right now, it is just a matter of finding the time to do these things, and perhaps I should summarize my journey from time to time in this thread.

5 Likes