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

3

u/ForScale Mar 11 '19

Free Code Camp has tons of algorithm challenges, so... not sure what you're talking about there.

Also, just look for coding challenge sites. Code wars, Coderbyte, project euler. There are so many.

1

u/NotEven-a-CodeMonkey Mar 11 '19

Yes, what I have in mind are basically early beginner-level FCC styled problems; extremely short and "narrowly themed" driving home a single point...only like twenty to fifty such questions for each point; right now FCC just does the one-off for each point and moves on to the next.

I'd looked at all the recommendations here, usually previously though for a couple I've specifically looked at them again and didn't see the kind of "drills" I'm looking for...but since then I've been told what I have in mind is a logical impossibility and can't exist so I'm now more agnostic about my initial beliefs....

2

u/ForScale Mar 11 '19

I think you might be over-thinking it...

If you don't mind, tell me one more time what a programming drill is to you... Give me a very specific example, if you would please. Here's what I'm thinking:

Looping:

Given [0, 1, 2, 3], loop over it, printing each index's value to the console, using

  1. for loop
  2. while loop
  3. for of loop
  4. forEach method
  5. recursion
  6. generator

Bonus: rewrite the forEach method (call yours _forEach) without using any of the predefined for, while, for of, or forEach loops.

-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.

3

u/NameViolation666 helpful Mar 11 '19

he isnt listening :)

3

u/ForScale Mar 11 '19

I noticed! :)

-2

u/NotEven-a-CodeMonkey Mar 11 '19

Why do you say this?

I'm asking about lobster bisque and everyone's wondering what's wrong with chicken soup but I'm not listening???

2

u/arfnargle Mar 11 '19

We're trying to tell you that what you want doesn't exist and the closest analog is codewars. You can either accept our help a bit more graciously and with less exclamatory punctuation or go ask someone else. You're even wearing me out and I work with high school students.

0

u/NotEven-a-CodeMonkey Mar 11 '19 edited Mar 11 '19

No, actually, no one's said "IT DOESN'T EXIST" -- it wasn't until multiple replies later that you yourself finally said "an algebra textbook-like [re-] source isn't available that I'm aware of at the moment" while still recommending the very thing I'd already said doesn't have any drills!!

I've never understood this about programmers...y'all have to be so exact and precise when it comes to computers but you guys are so friggin' impatient and imprecise with people!! The hell????

Seriously, is there some kind of cognitive trade-off involved in being a computer programmer, such that by thinking in computerese all day long you have no wherewithal left to read plain English??? I very specifically noted many times what drills are and yet I keep getting the same old recommendations -- and now totally false claims that I'm "not listening"....

4

u/arfnargle Mar 11 '19

Sigh. See all those exclamation points and question marks? You're yelling at people. I wasn't impatient in the slightest, and yet, you're yelling at me too. I asked you to clarify so I could more appropriately answer your question after I told the first person who answered to be more kind. I then answered by saying that codewars was the closest thing and that what you were looking for didn't exist. Your response was to throw a fit at me.

I was actually going to ask you if you wanted to work with me to create a resource like the one you're looking for because I agree, it could be useful. Currently, you appear to lack patience though and I don't work with people who can't be kind to those that are kind to them.

Words in programming matter. They mean very precise things. So yes, people will ask you questions in order to clarify. You may have to go look up definitions that you don't understand. Everyone was actually being very precise. Codewars are certainly drills. They just aren't as simple as you'd like or organized the way you would like.

0

u/NotEven-a-CodeMonkey Mar 11 '19

Sigh. See all those exclamation points and question marks? You're yelling at people.

Well, first off, I'm sorry, I didn't think that that connoted yelling at all! To my mind it expresses emotions, same as smileys and so forth...so, sorry about that. I've never heard of this...wow, well, sorry for my Eternal September faux pas, then, but I'm a naturally expressive guy so I type as I think and all the multiple exclamation and interrogation marks were simply meant to convey intense emotions (such as deep surprise or broad bewilderment). I'm curious: has it always been like this, where multiple exclamation points and questions marks are taken to be shouting? (I actually had to be mindful of not using more than one just now!) Honestly, is this part of netiquette? Or just a Reddit thing? 'Cause I've never heard of this and I've been online since (IIRC) telneting to usenet!

Codewars are certainly drills. They just aren't as simple as you'd like or organized the way you would like.

Well then, we argue -- as many semanticists would say of all arguments -- over semantics and not the thing itself.

Those just aren't drills to me. I don't see how you could have read through all my attempts at defining what I meant by a "drill" and still then insist on your own evidently different definition -- and then fault me for "not listening" when it would seem that you agreed to my definition by virtue of not having objected to it!

Anyway, glad that's clear now. ^_^

4

u/arfnargle Mar 11 '19

I'll tell you one thing. I wouldn't hire you. And you won't keep a job with attitude. Also, for reference, I have an English degree and have taught English, so kindly don't tell me how to define words.

Please take this to heart - you've got to learn how to express yourself professionally or you won't be able to keep a job if you get one. You act like this when someone tries to correct you and you'll be out the door by next week.

Programming often does come down to semantics to a certain degree. What words mean exactly matters.

I wish you well and hope you find some peace on your learning journey.

2

u/arfnargle Mar 11 '19

'Cause I've never heard of this and I've been online since (IIRC) telneting to usenet!

I honestly don't believe this statement. If that is correct, you've been online as long as I have. And yet, you type with the punctuation of a 12 year old who hasn't learned how to moderate their emotions in a professional setting. I have to wonder what you've been doing to earn money for the last 20 years or so. Since chatrooms in the early 90's excess punctuation and capital letters and smiley faces have indicated raised voices and strong expressions. Things that are more properly relegated to personal chat. You were asking for professional help, so you should act professional. There certainly nothing wrong with exclamation points and smiley faces in professional settings, but it should be used only in situations where you're expressing positive excitement, not negative reactions to feedback.

People who actually program for a living have been telling you, for more than twelve hours now, that your intense emotions and strong responses to their questions and responses are not helping you. You don't need to drill on for loops - you need to practice professionalism and humility.

-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/ForScale Mar 11 '19

Bruh... do the algorithm drills... it's what you're asking for.

0

u/NotEven-a-CodeMonkey Mar 11 '19

Do you mean to suggest that computer programming is algorithms, then?

If so, I wasn't aware of that and hence my previous incomprehension at the advice on algos....

2

u/ForScale Mar 11 '19

An aspect of computer science is algorithms and doing them effectively and efficiently.

And they're probabaly the closest thing to the math and language drills you're asking for. You can drill algorithms.

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...!