Need a little encouragement

Hey everybody,

I have been going through the FCC program and am now in the basic algorithm scripting section. I just started looking into coding for the first time back in June. To be honest, I am having a really difficult time getting through the algorithm scripting section. When I finally break down and look at the hints I feel like I am thinking in the right direction, but not quite to the point where I am thinking like a programmer. Is is normal to struggle in this sections?

Also, does anybody have any tips on how to approach coding challenges like this? Like breaking down the challenge into smaller problems or something?


Yes, definitely. I was a programmer years ago and like to think I have a very logical, algorithmic mind, and a few of those set me on my heels.

Don’t worry about it, just learn. Everyone struggles with something. In the words of Will Rogers, “Everybody’s ignorant, just on different subjects.” Maybe you’ll be better at some other aspect of the job, like design or networking, two areas where I suck.

Just persevere. And learn.

Yes, where possible, always break it down into steps and test those steps. If you have the right idea about what those steps are, and you build and test them correctly, then when you put them together, it will work. But be patient. It takes a while. Eventually you’ll develop a sense for these things and how to approach them. You’ll develop a sense for how to plan them.

There are plenty of books and blogs and videos stepping though algorithms, I might take a look at some of those. After you finish an FCC algorithm, maybe check youtube and see if someone else solved it a different way. Understand their approach. Sometimes there is one best solution. Sometimes there are a few.

Just be patient and learn. If this were easy, then everyone would do it and it would pay minimum wage. The fact that it is difficult means good wages and job security. It’s a good thing.


I think the Algorithms section is a bit misleading. FCC makes it seem like it’s for you to apply what you’ve learned so far, so you expect to be able to do the challenges on your own.

But that’s NOT the case. They aren’t just practice exercises.

Many of those challenges teach new JS methods, and not just the ones they suggest you look up. You will never know this unless you click on that Hints button. They also provide solutions at different levels of sophistication, so it’s well worth seeing the more advanced ways of doing things, even if you’re not there yet yourself.

Even some of the basic solutions contain things never mentioned before, and not explained there. (Multiple return statements? The word “in”?)

So they are more than just practice exercises. Don’t feel bad if you don’t manage to solve every one. Also, don’t feel that if you don’t get the first ones, you won’t get the later ones. They aren’t in order of increasing difficulty. There were a few that were very hard for me, followed by a few that took only minutes to do.

Give each one a try, but look at them as learning opportunities, not tests of what you learned in the preceding sections.


Sorry to hear you are struggling at the moment. Most programmers will go through these phases I think. I would say that it is normal for a new programmer to have a hard time with solving algorithms where things are not as straight forward. The best thing you can do is to push forwards and accept that it’s ok to not always understand right away.

Here is my typical thought process nowadays for solving complicated algorithm problems.

  1. Take a few minutes (or more) to think about the problem. Do a little research on any terms that are unfamiliar
  2. Write out some pseudocode continuing to think about how to go about solving the problem in the best way. (You save alot of time in the end if you don’t have to work with code that isn’t optimized for the problem.)
  3. Go through the problem on paper or the computer using the pseudocode and seeing how inputed information will flow through the potential program.
  4. Start writing code and solving the problem. (If you get stuck, try asking google, it’s your best friend.)
    4.2. If there are test cases, try to work through them in mental chunks. If you are making progress, that’s a success! (Even if you haven’t solved the whole problem yet.)
    4.3. Scratch the program and go back to the drawing board if all else fails.

Alot of the time it’s much more jumbled than that, but generally that process works well for me. It also keeps me motivated to finish when I keep the small victories in mind.

Good Luck!

Thanks! Using some of these tips have helped me solve a few these much faster over the last few weeks. Still a learning experience teaching myself how to think differently though!

Thanks for the encouragement! Hopefully I will begin to learn to approach them differently as I go through. Breaking it down into steps really helps. Sometimes it is easy to want to go straight to the output without properly thinking through the steps in sequence.

1 Like

So I too have been stuck on the algorithm challenges and have found that even if I have to look at the hints, I learn. Coding is not something that is going to come over night, well at least for me. When I started, I knew literally nothing about coding/web development and now I can look at a website and piece it together the way it should. The thing that I have learned from the algorithm challenges is that some of them are straight forward and not as difficult as I made them seem. I felt as if I had to write this extensive code to solve a simple issue.

For instance, the reverse a string problem… I was looking at that section and my head was spinning :slight_smile: However I slowed down and thought it out, and a trick that I like to use with these algorithm problems are once I finish one, I study that one before I move onto the next section. I like to make sure that I can understand why I am doing this and what is the result. I also like to teach it to people who have no coding experience as well, I find that if you can explain to someone what it is that you are doing, you will in return learn and comprehend it better.

Finally, do not give up no matter what you are faced with in programming. Have you ever tried to learn a foreign language before? Well programming is just that, it is learning a new language so to speak. It takes time and effort and somethings will come quicker than others. Also remember that the best programmers still get stuck and still learn on a daily basis. You’ve got this, don’t give up. In the end you will have learned something that is amazing. Keep moving through the challenges and yes they will be tough, but you can do it. Also and my final tidbit… There will be 500 million tech jobs open by 2020 around the world and there are a fraction of people going into the field, so keep moving forward and get one of those jobs.