Week 1 went lightning fast! It feels as if we’ve covered an entire semester of a college CS program already. For the next few weeks, I’ll post all the topics we covered at Hack Reactor and go into depth on one that I find particularly interesting and important. No deep dive this time around due to the unique density of this week.
What we covered this week:
How to succeed at HR, pair programming effectively, what’s it like to be a developer Setting up your dev environment & shortcuts to make you more efficient (details on each of these topics to come in future posts)
- Recursion: A function that calls on itself, see below for a brief definiton. Here is a great example.
A task can be solved recursively if, after a little bit of the processing is completed, the remainder of the problem has a structure that remains equivalent to the original problem.” @mracus, Head HR Instructor
- Scopes and Closures: A scope is the context of a variable and a closure is a type of scope. More on that here – pay extra attention to problems that may arise from JS’s funny way of variable and function ‘hoisting’.
- Underbar: This was pre-course work we did in preparation for HR and reviewed in our first week (very good for people looking to apply to HR). This is an exercise in rebuilding and understanding what goes on under the hood of the popular JS library Underscore. For finance/non-technical folks, I would think about this as rebuilding some of Excel’s functions such as sumifs and vlookup.
- Function binding, call and apply: these are all ways you can invoke a function. Use bind(function, context) to guarantee that a function will always be invoked in the context listed. Use call when you want to pass in arguments to a function and you know how many arguments you have. If you don’t know, pass in an array of arguments (of any length) and use apply – a way to remember: “A is for array AND apply” @epic_science