What do you think about "don't look at the code" rule for challenges?

Hi I would like to know what others think about the rule that asks you to not look at the code in the example pen provided in the challenges? I have not been able to solve some of those and my personal opinion is that if you cannot find a way to understand what are you doing wrong in forums, chats, google, tutorials, etc. you are better off just looking at the code and unstuck yourself.

I post this with the deepest respect for the FCC team, I am very thankful to them. However this might be an important issue other learners might be facing too.


I wrote this previously, and I’m too lazy to rephrase it as a fresh reply today :slight_smile: https://forum.freecodecamp.com/t/memorization-of-code/20475/20?u=jacksonbates

I notice that you (@palmaone) haven’t asked many questions on the Forum before. I think before looking at code, asking for advice is a solid method for making progress. I even find that sometimes just working out how to phrase my question properly gives me the nudge I need to overcome whatever I’m stuck on. But the help I’ve seen on the forum is great, so it’s always worth asking if you feel stuck.


I Believe it’s fair, It helps you to rely on yourself and make you do researches to solve the problems you face

1 Like

I have kept to this policy 95% of the time… I never copied anything… I only adjusted or revised code I actually understood… It is frustrating but it really did force me to learn…

I do not have a large network of people who code and when I posted on the forums nobody reviewed my code and my only option was to glance at finished products…

The truth is for those who are going cheat and plagiarize - will have finished products without true understanding


Confession: whenever I have a new coding problem I’m working on - especially if 'for work - the first thing I do is hit the internet and see how other people are doing it. Most problems are solved problems.

Once I have a solution I like the look of, I play with it until I understand it, and then I put it in the program, sometimes tweaked a bit when necessary.

I learn a ton doing this, and don’t see anything wrong with the practice.


What i tend to do most is break the problem down and then go googling for specific elements that I don’t understand from the mdn examples. Half the time you run in to stack overflow answers or blog posts that are exactly the same as the challenge you are facing so it’s almost impossible not to see the answer if your looking hard enough. As long as i take the time to understand and type it, then I’m not too worried, as you say.


Right, I think I used the wrong terms. If “coding problem” is a whole program, then yes I figure most of that out by myself and I enjoy doing that. I was thinking more like “coding problem” as in “what is the most efficient way to randomize an array.” For that kind of stuff I’ve never seen the need to reinvent the wheel.


I’ve been mulling this over for myself recently…I’ve been thinking about the No Repeats algortihm, and I’ve been wondering whether I should just take a permutation algorithm from Stack Overflow, or try to code the actual permutation part myself. Once the permutation part is out the way, the rest of the algorithm seems trivial - but taking the SO permutation function feels like cheating since that is the guts of the whole challenge really.

My maths isn’t up to the stage yet where doing the permutation myself is on the cards…so I’ve just let it sit there un-attempted until I can really be bothered to dig into it.

There’s no sense of urgency though…I’m happy learning other things for now :slight_smile:

1 Like

The very moment that you look at the code is the moment you lose the value of learning. The problem was so that you will take the time to research and study on how to do the problem. Asking in the forums or the chat is okay to the extent that they will just guide you to finish a problem, but if you just look at the code or ask the code from others, it is unlikely that you will learn.

They made that rule for the benefit of everyone. As a self-paced learning website, honesty to self is one of the most important. You can finish this course without learning anything new, or you can become a great developer if you are honest in answering each on

With that, if you are struggling with a problem, review the exercises you have done and read some documentation of the programming language. Answering the problems on your own or asking for help when you struggle is the way for you to learn.


I was feeling the same thing about the No Repeats challenge. The way I got around it was to hit Wikipedia and read some of the pseudo-code around different well accepted permutation finders. Once I had an idea how they were thinking, I was able to implement my own which is certainly less efficient than the generally accepted solutions but is mine and gets the job done.

I also left with a slightly higher level of math. :slight_smile:

In response to the original question, I have looked at the example code in each project, but only after submitting mine. I’m not sure whether I retained any of the ‘aha’ moments I had when doing so, but I’ve enjoyed it and certainly don’t regret it. I never looked at it to help me solve problems, in part because of the rule and in part because I’ve always found the resources I needed elsewhere.

1 Like

Personally, I agree with the rule and am of the opinion that it should be violated only if all other options have been exhausted (SEARCH-ASK) or if once a challenge has been submitted you want to compare your solution to that of other campers.

Something I noticed early on in myself is the desire to finish quickly was too much of a driving force. I’ve noticed this in others through their forum comments as well. Learning is hard work and quite often comes into conflict with the desire to finish and move on. However, taking the time to search and ask will have a bigger payoff down the road.

I think there should be one additional component added to SEARCH-ASK…REFLECT. This is where comparing your solution to that of others is very appropriate IMHO. Right or wrong I’ve always thought of REFLECT as being synoymous with ‘continuous improvement’.

Remember, it’s not about how quickly you arrive at a solution - it’s about what you learn, retain, and improve.


For me, only after I submit a passing solution do I review the algorithm solutions and others’ code. I want to check to see if I am on the right path and see alternative methods of solving the problem. Jumping straight to the solutions is like looking at the answers in the back of a textbook. Do you really learn anything?

The purpose of the coding challenges and projects is to build your Developer’s mind or a mind to solve puzzles and problems. As a Developer, you use your arsenal of coding skills and technologies to solve problems. The very first thing you do is break a big problem down into smaller problems. Then, by solving the smaller problems you will develop a solution for the bigger problem. That’s the development way.


I think these responses are really great and touch on something that Barbara Oakley mentions in her book A Mind for Numbers:

Speaking of talking to other people, when you’re genuinely stuck, nothing is more helpful than getting insight from classmates, peers, or the instructor. Ask someone else for a different perspective on how to solve the problem or a different analogy to understand the concept; however, it’s best that you first wrestle with the problem before you talk to anyone else, because it can embed the basic concepts deeply enough that you become receptive to the explanation.

Learning often means making sense of what we’ve ingested, and for that, we need to have ingested something. (Chapter 2: Learning is Creating)

I only started reading this book recently, but I’m finding it helpful in reevaluating my study habits and methods for grasping new topics. All the best on your path to success!


I’ve looked a few times, and I found that the way the examples solve the problem may use a bunch of ideas not yet covered by FCC training. For example, the Quote Machine example uses SCSS and a ton of jQuery that hasn’t been taught yet at that point in the training.

And the Quote Machine can be made without having to go in and figure out what each part of the example’s code contains.

I can understand why they put that rule there, but as you said, you’re better off looking at the code when all other attempts at finding a solution fail.

I do believe their projects are solvable via forums, chats, and Google, though. There’s no way they would give you a project that can only be solved by looking at their code. If you can’t find the solution via forums, chats, and Google, I’d bet you’re not asking the right questions.


I don’t think all of the challenge examples have the cleanest code or the most intuitive organization. There’s a lot of jQuery in the React projects, for example, which is usually unnecessary. And some of them (notably Game of Life) seem to hardly use React the way its meant to be used at all.

In the d3 section, all the data is copy-pasted to the top, which is strange because you can use fetch() or similar to get the data from the source in the same format.

I did struggle with d3 tutorials elsewhere on the internet until I rolled back to the same version of d3 that the examples use. v4 is modularized and pretty new and it’s tough to find tutorials for it.

I don’t remember specific examples from the front-end projects, but I do remember finishing projects and then poking through the examples and thinking there was a decent amount of strangeness.

So I wonder if they tell us not to look because their code is not necessarily a great example of how the project ought to be done… :wink:


These points are both excellent!

One of the major issues (I would actually say this is a genuine problem) is that many of the sample front end projects are built using front end frameworks that don’t get introduced until the next certificate.

This may have changed since I did the first cert - since I know they sometimes change the example project. But I remember seeing some of them after I had finished and they were built using Angular.

I think it would be better if the front end projects really only relied on the technologies that had been taught up to that point.

When someone does peek a little early (hey, it happens…no biggie) and see that ‘you have to use AngularJS to build this’ that is likely way more discouraging than not having seen the code at all! If they peek and see ‘hey, this can be built with jQuery - and it looks like they used a $getJSON request there…’ then that is more useful and encouraging to them.


+1 for Barbara Oakley! I’ve been dipping in and out of the Learning to Learn Coursera course and she is brilliant! I’ve been teaching for over 10 years and I learned so really useful things about learning from her I wish I had known 10 years ago!


I think the reason the rule is in place is just to encourage you to do the challenge for yourself first and try to solve the problem by asking others and researching, like you would in a job. It’s not like it is forbidden to look, but rather for you to learn to be resourceful before you take a sneak peek.

Yes I totally agree with you. I am trying different approaches to learning and getting around code swamp frustrations. I first try to solve it with my current knowledge, if I can not after a good effort and several tries I then go on to look for how others have solved it and try to understand so that the next time I can do it without looking.

I have also discovered that practicing is the best way to learn but there are some areas where theory, clear explanations and then good examples are the best if not the only way to do it.

1 Like

Well I understand the idea of using your own skills to solve a problem, however I must say that while this works for people and situations there are many of us who benefit from examples or by looking at code. I think I have learned a lot like this, because I make an effort to understand the solution. I think what is not good for learning is just copying and pasting others code without even trying to understand what is in the works.

We humans learn not just by effort or repetition, we also learn by example, by copying others, all animals do. So I just wanted to know what others think since I do not like to cheat but I think I am starting to disagree that looking at code when you do not understand by first means (Read-Ask-Search) counts as cheating.

I am trying different approaches to learning and getting around code swamp frustrations. I first try to solve it with my current knowledge, if I can not after a good effort and several tries I then go on to look for how others have solved it and try to understand so that the next time I can do it without looking.

I have also discovered that.

  • Practicing is the best way to learn but there are some areas where theory, clear explanations and then good examples are the best if not the only way to do it.

  • Learning from different languages has worked for me to understand programming best form different perspectives.

  • Forums and chats many times don’t help or don’t help on time. They are valuable don’t get me wrong, but where they fall short, some other way needs to be found.

I really appreciate your response, thanks.

1 Like