Is looking at solutions bad?

Just curious as to how people feel about looking at solutions. Let’s say you’ve been working on a problem on CS50 for 2 to 3 days, and you’ve received help from forums but nothing you try is working, is it bad to eventually look at the solution? (not to simply copy and paste…but to actually understand where you went wrong)

I wouldnt say its bad, but it shouldn’t be something that should be done at first. If you can say you honestly exhausted your options, and still cant figure it out then looking at a solution might not be the worst thing. However, the even better thing is if things still aren’t working out in the forum then ask more questions. Sure it can be difficult because people may not always be around to answer your question. The more you ask questions on why code isnt working, why code works the way it does, etc the better understanding you are going to have of it and the more it sticks with you. Looking at solutions may give you that temporary clarity, but it probably wont stick with you as much as talking code with someone else.


Thanks, this was great advice

1 Like

I’d definitely try talking with humans before looking up solutions. Reading code and writing code are different but both important skills.


I was in similar situation during my learning phase, human brain likes to take easy path and avoid hard routes.

  1. I suggest to watch Secret to Learning To Code | JavaScript Mentor Session #learntocode - YouTube few times and understand how to break down big problem into smallest chunk possible and tackle each one. This way it’s easier to concentrate on single small problem and eventually solve bigger problem with consistency

  2. Take help of Google, Stackoverflow to find problem’s solution yourself.

  3. If you’re looking at someone else’s solution then it’s like trying to build muscles by watching YT videos.

I suggest write code yourself and later look at others’ solution to find out what improvements you can do with your code.



I agree. I can write code but I doubt I can read it.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.