Algorithms and the big advantage

I believe I’ve mentioned it before, but if not, I assume I have a huge advantage over the majority of folks who are working through the FreeCodeCamp curriculum.  That advantage?  A bachelors degree in computer science.

I’m assuming that advantage, plus the fact that I’ve recently finished reading the introductory text Eloquent Javascript, accounts for the huge discrepancy in estimated vs. actual time to complete the Basic Algorithm Scripting section of FreeCodeCamp.  It took me 3 1/2 hours to finish the supposed 50 hour section.

Why the big discrepancy?  Not sure.  The problems didn’t seem very challenging, and several of them were easily solved using JavaScript’s higher order functions.  As an example, the second Bonfire, asking you to reverse a string, can be written in one line using three such functions:

function reverseString(str) {
return str.split(“”).reverse().join(“”);

Another critical skill is regular expressions, which I’ve never come close to mastering.  These simplify a whole host of search problems, and are frequently useful in the algorithms Bonfires.

Of course, understanding loops, arrays, conditional statements, etc., all come into play, and in the end, I feel like they do give you a good workout, covering all the major concepts from the just-completed JavaScript section.

Perhaps the most useful thing I did in working through the problems was to copy and paste my code into a new CodePen pen, and use their environment, along with Chrome’s developer tools (specifically the Console), to debug things when they weren’t working.  There is nothing more helpful than a few well-placed console.log() calls to help you figure out that you’ve put something in the wrong place, or have mis-typed a variable name, etc.

In the end, whether it takes you 50 hours or closer to 5, the important thing is to complete all the bonfires.  These are real programming challenges, and closer to real programming than you’ve seen so far on FreeCodeCamp.  Learn all you can before moving on.

FreeCodeCamp section: Object Oriented and Functional Programming
Time estimate: 50h
Actual time: 3h 30m
Waypoints covered: 1
Bonfires covered: 17


One thought on “Algorithms and the big advantage

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s