Coder Social home page Coder Social logo

node-lodash's Introduction

Project Brief

These days, lonely coders rely on online learning to get to know new languages. But let's be honest: "one-app stands" with the wrong language can lead to recurring bugs. Gone are the days of swiping left and right for the next best thing. Programmers are looking for languages they can trust.

You're the lead developer for Java Meets Bagel, a service that takes a user's personal interests and matches them with courses that help them get to know new languages in a deeper, more authentic way.

After a chat with the lead architect, you agreed on a series of unit tests that will guide the functions you should write. Use a lodash method in each function โ€“ in each case, doing so will save you time and hassle. Each function will either manage data with Node (used to respond to API requests) or will make a request from the client using AJAX.

Functional programming will help improve the consistency of how your applications perform whilst improving their testability and code semantics. To read more about functional programming take a look at this article.

Milestones

Milestone 1: Getting to Know You

  1. Clone this starter repository containing a starter point and some unit tests.

  2. Install the project by running npm install.

  3. Run the test suite using npm test to see which tests are implemented and which is the next test to complete.

Milestone 2: You Pass!

Go through the /src/ files starting with 01-*.js and implement each function one at a time by passing the tests. Read the comments in each file describing the signature in more detail.

  1. findCourseByName - This function will be used for selecting a course from the list. Take a look at _.find.

  2. findCoursesBySkills - This function will need to select a list of courses that all offer the provided skill names. Take a look at _.chain, _.filter and _.pluck and _.intersection.

  3. getGroupedCourses - This function will return a nested array of courses grouped by language and sorted by the suitability of the language. Take a look at _.sortBy and _.where

  4. multiSort - This function will return a list of courses sorted by multiple fields. Take a look at _.sortByAll and _.includes.

  5. requestAdapter - This function will expose 5 functions and you'll need to write 3 of them. Two of these functions will make use of the first. The first function is a requestAdapter that returns functions. Read up on Partial Application and Composition and then take a look at _.partial and _.bind.

Keep running the tests with npm test to see if your functions meet the requirements. If you get stuck, remember to log things out. You can play with various lodash functions in the console by opening your dev tools on the lodash docs page.

Milestone 3: Strictly Functional

Once your tests are passing, keep your hipster stakeholders happy by refactoring your code to be as eloquent and purely functional as possible.

Don't sneak a peak at the /solutions/ folder until after you've refactored your code. If you do anyway - try to implement the solutions in a different way! Happy hacking!

Resources

Thinkful Lodash Course - A video series going through various methods and techniques using lodash.

Don't be scared of Functional Programming - An in detail article describing functional programming.

Lodash Documentation - The fluffing lodash manual.

Lodash Cookbook - Free on-line book containing many techniques and tips for working with this amazing library.

Partial Application and Composition - Detailed article on partial application and composition methods in JavaScript.

node-lodash's People

Contributors

tomatau avatar danfriedman avatar

Stargazers

Yaroslav Kuts avatar Oliver Gray avatar Carolina Serrano avatar Maki Kato avatar

Watchers

Chris Powers avatar Darrell Silver avatar Olex Ponomarenko avatar Niki Brown avatar Kat avatar Zachary Zimbler avatar Joe Turner avatar Chris Angelico avatar James Cloos avatar  avatar Thomas Peterson avatar Jasjit Singh avatar Jason avatar  avatar Carlos Edo avatar David Coulter avatar Andrew Baylis avatar Derek Fogge avatar SnareChops avatar Robert Wilson avatar  avatar Eliz Par avatar Grae Drake avatar  avatar  avatar  avatar Kara Leary avatar  avatar Varun Rajan avatar  avatar  avatar Zac Ellington avatar Rick Lopez avatar  avatar Chen Atlas avatar Austen Weinhart avatar Bill Cullen avatar  avatar  avatar  avatar Tauhida Parveen avatar Ben Aronowicz avatar  avatar  avatar

Forkers

gcaliene oligray

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.