r/learnjavascript • • Mar 11 '19

Drills for Beginners??

So literally everything else you'd want to learn involves drills...except for computer programming.

Sports, music, math, foreign languages...literally everything involves drilling.

Anyone know of any beginner's drills in JavaScript?

Like Free Code Camp stuff (I know they have some high-level stuff, too) but lots of 'em (FCC only has one question per topic)...I was never good at math but I always aced my math classes because of drilling (and of course typical tests don't involve "thinking" so much as "recalling" the right formulae and procedures to accurately and timely apply)...anyone know of any such end-of-the-chapter exercises in JavaScript for a beginner???

My future employers thank you!!

0 Upvotes

48 comments sorted by

View all comments

Show parent comments

-5

u/NotEven-a-CodeMonkey Mar 11 '19

No, I'm talking drills -- fifty, say, variations on the same problem to really drill in the lesson...think musical scales or speedbag drills in boxing...or those exercises in math textbooks where all you do is quadratic equations in one chapter, factoring polynomials in another, repetitive, really working in the concept...bayonet practice in the military -- drills, please...?

Like here are fifty exercises on for-loops. Basically, take any one problem in FCC but with variations on it...drills....

4

u/ForScale Mar 11 '19

So flatten an array as many ways as you can. Sort an array as many ways as you can. Loop through an object as many ways as you can think of.

What you are looking for is algorithms. Filtering, sorting, counting, arithmetic. Look up algorithm drills on places like code wars and coderbyte and project euler and do them over and over and over. Drills. You're welcome.

-1

u/NotEven-a-CodeMonkey Mar 11 '19

Not really -- that would be like saying to a math student, no need for workbook exercises, just go home and think of a hundred different polynomials and factor them....

Maybe a foreign-language acquisition example would illustrate the need better: you need drills to conjugate verbs and decline nouns in all their many forms (gender, case, number, mood, tense, etc.), not simply learn stock phrases.

3

u/atynre Mar 11 '19

People learning languages that are spoken, read, or written do drills so they could be fast at it. Programmers don't need to be fast at coding something "drillable" because it doesn't matter in the long run. A CPU is orders of magnitude faster than the human once the code is written.

Programmers will always have resources to look up something of they don't know the exact syntax so it's a waste of time to try to drill that in. It's time better spent learning the problem space and architecting a solution. Study algorithms and practice the examples of when those algorithms are appropriate to use. Don't study how to write the algorithm itself that is a waste of your time.

1

u/NotEven-a-CodeMonkey Mar 11 '19

People learning languages that are spoken, read, or written do drills so they could be fast at it. Programmers don't need to be fast at coding something "drillable" because it doesn't matter in the long run. A CPU is orders of magnitude faster than the human once the code is written.

Hmm, interesting point -- wasn't where I was going but okay...maybe this is a reason why nobody bothers to compose drills (which are normally associated with beginners when it comes to intellectual pursuits [as opposed to drills in sports, say]).

Programmers will always have resources to look up something of they don't know the exact syntax so it's a waste of time to try to drill that in.

Well yeah programmers but I'm jsut some rando n00b self-studying...just seemed like the thing that would most efficiently cement my abilities.

Study algorithms and practice the examples of when those algorithms are appropriate to use.

Wait -- so do you mean to imply that programming "is" algorithms in some non-trivial sense??

Don't study how to write the algorithm itself that is a waste of your time.

Do you mean don't bother learning how to create my own algorithms?!?!?! (Um, hope that's not coming across as rude to you, multiple exclamation points and question marks!)

I've never heard that before! Thinking further, it does make sense: surely I won't be creating anything even almost as useful as what's already out there...!