How I am Approaching Learning with FreeCodeCamp

I see alot of people struggling and saying that they spend days or hours trying to solve a problem! Why!? You have to think about efficiency. This is not the best way to learn anything and it has been scientifically proven. At the end of the day javascript is basically a language you are trying to learn. You can learn alot more about Javascript as a whole in a given time if you have more attempts and brush off your failures and admit defeat from time to time. By all means try as hard as you can but don’t spend too long on a problem.

If you cannot solve a problem in 10 -15 minutes at the absolute maximum I encourage you move on and look at the solution to the problem and internalize it. When you spend too long on a problem you begin to beat yourself up and get negative which causes a spiral out of control, leading to irrational thoughts.

Projects might be a bit different; however, and I would definately encourage you to spend as much time needed on them.

4 Likes

This is the absolute worst approach to take, and I strongly discourage doing this.

Do not look at the solutions until you have solved the problem.

Coding is about solving problems, not memorizing solutions. Looking at code is a completely different skill than writing code.

Deciding to look at the solution will just hold back your ability to actually write code to solve problems when you don’t have solutions to copy. It will hurt your learning.

Don’t copy solutions. Don’t hurt your learning. If you hit a difficulty and don’t understand, just ask questions here on the forum. We’re here to help.

7 Likes

This is true to a point. The biggest difference between learning human languages and programming languages is the target audience. When it comes to programming languages your talking with a machine, who is dumb. Because of that, how you talk to it needs to be very specific and follow a specific syntax so the machine knows what your trying to tell it.

Furthermore even if you know the syntax of the language, your trying to get this dumb machine to execute “intelligent” instructions so its valuable. This is where you go from knowing just the syntax of the language, to understanding the problem, the solution and how to implement that solution using your given programming language. The machine can’t and wont really help you here, unlike trying to speak in another human language, where the other side of the conversation can infer what your saying without you needing to be fluent.

When it comes to programming you really need to be “beyond fluent” to solve the problem, and essentially be able to “write poetry” in another language. This doesn’t mean you need to know 110% of all the language syntax to solve a problem, but you should know enough to get the machine to solve the problem for you. So you need to solid mix of knowing enough syntax, and a grasp of the problem and solution. The same way you can write an elegant poem without knowing a bunch of fancy words.

This is why programming is hard, because machines are dumb. You need to do all the work to make it work. Its OK if you get stuck or caught up as you go through this stuff. However, experience is built on failure. If you try to skip past failure “because it takes to long” then your skipping over experience. Fail 500 times and you learn 500 new things. Looking at the solution 1 time and moving on means you learn 1 specific thing.

Regardless of the approach you take, good luck, keep learning, keep growing, keep failing and keep going :+1:

11 Likes

Hi @jontnoble !

An important part of becoming a developer is learning how to solve problems.
You have to get comfortable with trying different approaches, and looking at the problem from different angles.
Often times this process will take longer than 10-15 minutes.

The challenges are meant to help you when you get to the projects.
If you only spend 10-15 minutes on a problem before moving to the solution then you are going to be tempted to do the same with the projects and just copy code from sample projects.

Instead, you should want to spend time learning how to research and ask questions.

I don’t think there is anything wrong with spending 20, 30+ minutes working on a challenge like the intermediate algorithms, recursion challenges, redux challenges, or node & express challenges.

It is all part of the learning process. :grinning:

8 Likes

The end goal for a learner is to be able to solve a problem without looking at somebody else’s solution. To that end, people can choose whatever approach that works best for them. But I doubt an effectiveness of a blanket statement to look at a solution if one cannot solve it in 10 - 15 minutes.

I can appreciate a situation in which you might consider viewing a solution. For example, you know you solved the problem, but somehow your code isn’t passing the tests. The error could be a simple typo, like misspelling the variable name. You might take a quick look at a solution to verify your approach is correct. (Even in this situation, detecting your typo on your own without looking at the solution would actually be a good learning experience.)

In other situations, looking at a solution after trying for 10-15 minutes is most likely not going to be helpful. For example, if you are unsure on how to approach a problem or completely lost, looking at a solution is not a solution (pun intended). I doubt people will have an ‘Aha’ moment after viewing a solution code. Take recursion problems. Many people are still lost after seeing a solution code.

If one gets stuck and couldn’t solve a challenge, one could move on to another challenge instead of viewing a solution. And you can always post a question on a Forum.

3 Likes

most of the solutions to these problems are 1-4 lines of code… If im ever off its due to one dumb syntax error and if you take 2 hours trying to find out what that error is. You arent using your time effectively.

I strongly discourage your approach unless its a big problem

1 Like

You are welcome to use your approach. In my experience however, copying the solutions is a very bad approach that will cripple your problem solving skills. I strongly discourage willingly crippling your ability to solve problems if you are interesting in becoming a programmer.

Finding and diagnosing small problems is a critical skill when writing code. Debugging one of the biggest things that programmers do.

I always recommend people ask questions when they are stuck. That’s the entire reason the forum is here and we’re always happy to help. You’ll learn much faster by asking for help than you will by copying answers.

2 Likes

I don’t mean to be rude, but if you need 2 hours to find a syntax error in 1-4 lines of code, your debugging skills are seriously under-developed. How are you ever going to deal with a 5000+ lines codebase where there IS no solution to save you?

If you just started out (and I assume that you do, if the solutions are 1-4 lines), and you don’t know the syntax yet, and the most common methods (for loops, if statements, .toString, .split, .map, etc), maybe you’ll benefit from looking at the solutions fast. But once you’ve a good grasp of what these methods do, I’d recommend trying to find the solution yourself.

You’re not allowing yourself the massive motivation you get when you’ve stared at a problem for hours and then finally solve it all by yourself. I always felt like a loser when looking at a solution. It was like giving up and admitting that I just can’t do it.

2 Likes

IMO, time spent debugging, even if your problem is a small syntax thing, is not time wasted. You will end up spending a lot of time debugging as a coder so its best to get a jump on this skill - especially as there aren’t “solutions” to look up in the IRL.

When I started coding, I was not good at spotting small syntax things. But having spent an ungodly amount of time debugging relatively trivial problems, I can now spot these things pretty quickly & it saves me a lot of time.

TLDR learning how to debug (which I acknowledge can feel tedious) will save you a lot of time & frustration down the road.

2 Likes

Hey there @jontnoble !

I also kind of went through this approach and it isn’t the best IMO.

One test I did on myself is to take my time and use the solutions when needed but return the next day to see if I could solve the challenges I used the solutions on again. After a week of tests, it turns out 6/7 times (I count the weekend) I could not remember how it was solved.

For me at least, doing research and asking the forum is better strategy especially since my problem isn’t syntax errors or small bugs its actually coming up with a solution and a lot of people encounter my issue more than yours (at least from what I can tell).

So although I think your advice has merit for someone whose facing your issue (struggling with syntax) for most other beginners (struggling with syntax and solutions) the other advice found on the thread might prove to be more painful…but more helpfull in the long run.

Thanks for the tips! :grinning_face_with_smiling_eyes:

Best,
Cy499_Studios

3 Likes

As having studied pychology for 7 years, I strongly disagree with your rationale and having taught people myself for a couple years you come to realize motivation is key for learning.
I just picked up javascript last month and I am cruising through this right now because I taught myself how to learn. I am catching sytanx errors and debugging things because my mind has naturally already picked these things up by repeated viewings instead of stopping for 4 hours. If you are very experienced and have years of javascript exp, then sure go right ahead and spend hours upon hours trying to solve something. The optimal way at the start for sure is to push yourself to get to a point where you are challenged but not too much.
I cannot with good intention ever tell some one to learn javascript from here because I know most people have your guys’s thinking when it comes to problem solving. DO IT YOURSELF for hours upon hours until you come up with a solution thats 100% on point.

1 Like

This is a completely inaccurate description of our recommended approach.

As has been repeatedly said in this thread, our recommended approach is for the learner to try to solve the problem on their own. If the learner encounters difficulties, then the learner should ask for help.

I’m only saying ‘do not copy the answers’. Copying the answers hurts learning. I strongly believe in asking for help.

1 Like

Yes, you try to solve it on your own for like 10-15 minutes. Full blown effort but do you really think spending 123123 hours is an efficient use of time?

This would entail 100 percent accuracy. Or spending time from others to give you a reply or hint.

10-15 minutes is barely any time spent on trying to solve an issue. If you are uninterested in working on a problem for more than 15 minutes, then programming may not be something that suits you. That’s totally ok if that is the case.

If you prefer:

Do not look at the solutions until you have solved [with or without the help of others; I clearly indicate in several posts that receiving help when stuck is highly recommended] the problem.

Nothing about that implies that learners should be perfect. The response time on the forum and chat is pretty good, so it doesn’t typically take very long to get a hint and we’re willing to work with you as much as you need.

Copying the solutions just teaches you how to copy-paste answers. It does absolutely nothing to help you learn how to program.

Nobody is saying that learners should spend 123123 hours working away on a problem alone. We’re just saying that copying hurts learning.

Majority of people encountering these problems are new and learning. They are not writing projects with thousands of lines of code. These are 1-4 line issues. 10-15 minutes ought be sufficient enough time.

I could sit on the computer for hours upon hours… I have no issue with taking alot of time to figure something out but I know that it is NOT the best way to learn something new or is the best use of my time so I move on and reflection or internalizing it like I said in the OP is needed.

You gotta know when to hold em.
Know when to fold em.

You are welcome to keep copying answers, but you are not going to convince me that copying answers is a good way to learn.

I have seen too many people come onto this forum, swear they learn best by giving up and copying when they can’t figure out the challenge, and then get really upset when they don’t understand the later challenges or the projects at all. Copying kills learning and understanding.

Nobody anywhere has claimed that you need to waste hours upon hours trying to figure out something alone, except for you.

We’re just saying that copying answers hurts learning.

Ya just don’t get it. Sadly not even the education system does. Meh. Oh well.

Oh, I understand very well. Deciding that you must have a ‘small’ problem and copying the answer is very tempting. All new programmers have felt that temptation to just get the code working and copy-pasting code without being able to generate the original code in the first place. But those of us who have been programming for a while, and especially those of us who have been teaching programming for a while, understand that this temptation only causes more problems in the long run. Copying kills understanding.

I definitely do agree that you learn best when you’re in the “sweet spot” (challenged, but not over-challenged). Where exactly this spot lies differs from person to person. Some walk through the first 50 challenges and never need help, because they are good at analytical thinking, natural problem solvers, just very intelligent or have previous coding experience. Others have a bumpier start, get stuck easily, have maybe less tolerance for frustration and less willpower to fight their way through a challenge, even if it’s tough.

I don’t think there’s a recipe that works for all, so your time limit of “10-15 minutes” might work for you, but recommending it to others to adapt the same doesn’t take into account the person’s skills and personality.

If you want to get better at running, you have to run, watching others run will give you an idea how to do it, but that’s useless if you can’t do it yourself. Same for coding.

1 Like

I think there is a discrepancy on the level of difficulty of challenge problems during the discussion.

When you are talking about the problems that review the language syntax and semantics, I can understand the point of looking at a solution after trying 10-15mins (even less). Let’s call these Level C problems. Here’s an example: The push method adds an element to the end of an array. Add three items 10, 45, and 87 to array numbers. If one does not pass the test after 10 minutes, one may look at the solution. I can imagine an online practice session that poses a question. If the learner answers the question correctly in an allotted time, the session continues to the next question. And after the allotted time passes, it reveals the solution and poses another almost identical question. After 3 unsuccessful tries, the online practice session is locked and the learner is asked to review the materials before trying again.

Mastering Level C problems is necessary but not a sufficient condition for a software coder (developer, programmer, etc). There are Levels B, A, and S problems that go beyond the mastery of language syntax and semantics. [Note: This categorization of Level S, A, B, C here is my ad hoc invention for the sake of concrete discussion.]

Here’s an example of Level B problems. You are given an array of Student objects. Each student has a name, age, email, and an array of test scores.

  1. Display the average age of Students.
  2. Display the highest and lowest test scores of each student.
  3. Display the name of a student with the highest average test score.
  4. and so forth.

This is what we call problem solving (or algorithm) skills. It is one step above Level C in difficulty. FCC challenges include both Level C and Level B problems. For Level C problems, your answer must be 100% because otherwise, it won’t run. For Level B and above problems, we aim for 100% (most efficient, readable, etc.) but 50% solution would run and produce results. Looking at a solution too quickly is not what I recommend for Level B and above. It is difficult, in my opinion, to “internalize” a solution at this level if you peek a solution too quickly before giving a good solid try.

Finally, I think we are all in agreement that FCC is not (cannot be) a single source of learning. You need multiple sources (Udemy, W3CSchools, TutorialPoint, Stackflow, etc. etc.). I understand FCC is working on a new set of project-based curriculum with, I hope, an improved pedagogy.

1 Like