Javascript Cirriculum issue

I’m not sure if this is the right area to ask this question but . Why is functional programming and object oriented programming placed after basic algorithms and data structures? after attempting to the first few challenges of the basic algorithms section I realized that the previous sections grossly under-prepares you to even attempt to do basic algorithms ( at least in my opinion ). most of my time was spent just searching the problem and copy / pasting the answer without really understanding what was happening. once I got to the functional section and the object oriented section I went back to try and create my own code to solve the challenges and did slightly better.

I’ve been working at the challenges and going over the curriculum but all of the information presented before the basic algorithms section doesnt seem to prepare me to solve any problems at all.

I guess my other question would also be : what other free coding websites can I use to learn JavaScript?

@Quantumike To the best of my knowledge, all the challenges in the Basic Algorithms section can be solved with zero knowledge of Functional or Object Oriented Programming.

Which challenges did you feel were not solvable without understanding the concepts in the Functional or Object Oriented Programming sections? If there are some, then we can try to fix those challenges or add some additional challenges in the Basic JavaScript, ES6, Regular Expressions, and/or Basic Data Structures sections to help you and others have better success.

Thank you for replying ! I very much appreciate it . I hope that I didnt sound like too much of a jerk when typing out my question/ statement I have been frustrated for a few months on just the first few basic problems and have been close to quitting for awhile and I definitely do want other to bang their heads ( or just copy and paste) like I did.

I think that the first 4 sections that you just mentioned need to have more challenges that are either related to the basic algorithm section or that a “problem solving” section needs to be created in order to help people think about how to use things like For loops , arrays , and methods together to solve different types of problem instead of just seeing them once and being expected to know what to do.

The biggest example that I have would be the factorialize a number problem , when looking at the hints they reference something called recursion , which was not previously explained in depth or with any significant challenges to understand how to solve a problem like that ( I just copied and pasted the solution after trying to use a for loop to solve the problem) . Similarly the reverse a string and the Find the longest word in a string challenge required me to use the hint button that referenced me to methods (the split method in particular) that were not previously explained in depth. it was only after I basically copy pasted my way through the basic algorithms and got to the functional programming section that I learned in depth about the split method.

Additionally I understand that I should be using the read-search-ask method like I’m told to in each challenge , but I just feel like I haven’t been taught about how to “approach” programming problems or even how I should structure my algorithm to solve a problem.

I hope this helps.

Absolutely not. Most programmers at some point in the beginning of first learning go through some frustrating times. I remember when I was first learning about Object Oriented Programming many years ago. I was so used to Procedural Based Programming, that I really struggled with how to approach it.

I have found with the time I have been with FCC and on the forum, that most new programmers struggle the most with the algorithm challenges, because they don’t know how or just don’t try to write out the basic steps on paper (or typed in a document). Writing out these steps with either some pseudo-code or just plain everyday language is truly the key to mastering algorithm challenges.

Many beginners want to start “hacking” their way through code, when they don’t have a true visualization of what the “correct” algorithm is. When ever I come to a problem or challenge which has many requirements and moving parts, I first try to break the problem down into the most basic parts while at the same time figuring out “when” and “where” these parts will fit into an overall solution. Then, I try to write out the written steps for these smaller parts. Once I believe I have all the steps, I try to work through a known input/output. If I can not walk through my steps and get the output required from my written steps alone, then that will make it very difficult to write code to solve the problem.

There are some courses out there like Stanford’s Computer Science 101 which many believe help with understanding how to work through algorithms, but most will tell you that the skill is developed from practice/experience. This means you just have to keep working through problems/challenges until you start to develop your own methods of identifying when is the best time to use a for loop or a while loop or recursion or if statements vs. switch statements vs ternary operator.

I will agree with you on this one regarding the solution provided in the Guide for this challenge. In fact, I will create a pull request in the repo which shows a solution on how to solve this challenge using iteration to compliment the recursive solution shown in the Guide. This challenge does not require using recursion. That said, I believe there is an open issue on the repo, where someone is working on adding a challenge which covers recursion, so hopefully we can add something in one of the sections before the Basic Algorithms section to introduce the concept.

Again, I will agree with you regarding the solution provided in the Guide for this challenge. I personally solved this challenge in 3 different ways without using the split method in any of them. In fact, in all 3 solutions, I did not even use arrays at all. I will create a pull request to add one or more of my solutions which show various algorithms to solve the same challenge.

Finally, you do have to understand that the FCC curriculum is not meant to be comprehensive. It is merely designed to give you just enough to get you started. After that, you really do have to rely on the Read, Search, and Ask method. The forum exists to take care of the Ask part.

I definitely would recommend not copying/pasting the solutions to pass a challenge. Instead, if you get very stuck and have already asked for help on the forum with no results, then you should look at the solutions in Guide (Get a Hint button) and study them until you do understand them. If you don’t understand something or feel that there must be an easier way than what is show in the Guide, then go to the forum again and ask more questions (just like you did today). Because of your question, a few new solutions will be added to the Guide in the hopes of helping others who get stuck on one of these challenges in the future.

1 Like

I agree with you on this , is there anyway that I can help contribute to a “psuedo code for algorithms” section for beginners? I’m sure that alot of people with find it a bit redundant or meaningless but for a person like me who needs a bit more help understanding how to approach a problem when certain keywords arise or when ( I’ll use the factorialize exmple again) the problem is illustrated for you (54321) it would be very useful to either have :

  • links to previous challenges that would be helpful in solving that problem so that I can get used to using the syntax of the language ( again some of the challenge hints reference things that aren’t mentioned previously which make things hard

  • better pseudo code hints next to the challenge itself that give me an idea of what I should be using. like a picture , so that I can get used to understand why writing the psudeo code is important before trying to tackle the problem.

You are free to contribute to the existing Guide solutions. If you think a challenge solution hint in the Guide could be better written, then we welcome such contributions. Keep in mind, we want the Hints to be short and offer guidance vs. writing out a lot of pseudo-code.

Now if you are wanting to help create a new section on how to write out algorithms in written language and/or pseduo-code, I would first search the existing issues to see if anyone has already discussed this in the past. If not, then you should create a new issue and discuss ideas for such a new curriculum. If it generates any interest or feedback, then you and/or others could start working on such a section.

1 Like

I have created a pull request I added a Basic solution to the Guide for the Factorialize a Number challenge which is iterative instead of the existing solution which is recursive.

Also, I added a Basic solution to the Guide for the Reverse a String challenge which does not involve using split, reverse, or join methods.

I might propose that we move the challenge Split a String into an Array Using the split Method to an earlier section before the Basic Algorithm Scripting section, because the split method is commonly used method and can help simplify many problems.