scwebd
3/21/2019 - 9:06 PM

day3

*==== @channel Resources and a Video Walkthrough from Today's Class: ====================*

*Understanding the basics of Node.js* (concepts, pros, cons): https://medium.com/prod-io/understanding-the-basics-of-node-js-99e01c5d844f

*process.env: What it is and why/when/how to use it effectively:* https://codeburst.io/process-env-what-it-is-and-why-when-how-to-use-it-effectively-505d0b2831e7

*Understanding module.exports and exports in Node.js:* https://www.sitepoint.com/understanding-module-exports-exports-node-js/

*JavaScript Modules: A Beginner's Guide:* https://medium.freecodecamp.org/javascript-modules-a-beginner-s-guide-783f7d7a5fcc

*JavaScript: What Are Template Literals?* https://codeburst.io/javascript-what-are-template-literals-5d08a50ef2e3

*More Info on Template Literals:* https://css-tricks.com/template-literals/

*Node Calculator Video Walkthrough (<<< watch it and code it again!):* https://www.youtube.com/watch?v=JH28RCouqfw
*==== @channel Resources from Today’s Class: =====================*
 
*Node FS (File System) Documentation:* https://nodejs.org/api/fs.html
 
*How do I read files in Node:* https://docs.nodejitsu.com/articles/file-system/how-to-read-files-in-nodejs/

*Using Promises* (like `.then()` and `.catch()`): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises

*The `.catch()` method:* https://www.codingame.com/playgrounds/347/javascript-promises-mastering-the-asynchronous/the-catch-method

*UTF-8 Info:* https://en.wikipedia.org/wiki/UTF-8
 
*JavaScript `.toFixed()`* (allows you to specify the number of decimal points on a number): https://www.w3schools.com/jsref/jsref_tofixed.asp
 
*Axios npm package* (what we use to mimic an AJAX-like functionality on the back-end): https://www.npmjs.com/package/axios
 
*Array `.slice()` method* (use this to make a partial or full copy of an array, ie use `process.argv.slice(2)` to get an array with ONLY user input): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
*==== @channel Resources and a Few Video Walkthroughs from Today’s Class: =============*
 
*JavaScript `.sort()` array method* (with info on compare functions to sort numerically): https://www.w3schools.com/js/js_array_sort.asp

*More info on the `.sort()` compare method we used this morning:* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description

*JavaScript array method reference:* https://www.w3schools.com/jsref/jsref_obj_array.asp

*Lindsay’s array method practice activities:* https://github.com/lnchapin/arraymethods
_(practice makes perfect!)_
 
*Everything You Wanted To Know About package-lock.json But Were Too Afraid To Ask:* https://medium.com/coinmonks/everything-you-wanted-to-know-about-package-lock-json-b81911aa8ab8
 
*Working with Environment Variables in Node.js* (gives you more insight into .env/keys for the Liri HW): https://www.twilio.com/blog/2017/08/working-with-environment-variables-in-node-js.html
 
*Inquirer Documentation:* https://www.npmjs.com/package/inquirer

*Inquirer Example Code* (includes examples with `validate` and `when`): https://searchcode.com/codesearch/view/98875892/
 
*Building Command Line CLIs with Inquirer.js Video Walkthrough:* https://www.youtube.com/watch?v=JJqriV7Q9og

*Node Geocoder Video Walkthrough:* https://www.youtube.com/watch?v=G9CtacWgYho
==== @channel Resources from Today’s Class: ====================

Understanding the basics of Node.js (concepts, pros, cons): https://medium.com/prod-io/understanding-the-basics-of-node-js-99e01c5d844f

process.env: What it is and why/when/how to use it effectively: https://codeburst.io/process-env-what-it-is-and-why-when-how-to-use-it-effectively-505d0b2831e7

Understanding module.exports and exports in Node.js: https://www.sitepoint.com/understanding-module-exports-exports-node-js/

JavaScript — WTF is ES6, ES8, ES 2017, ECMAScript… ? https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c

When NOT to Use Arrow Functions: https://dmitripavlutin.com/when-not-to-use-arrow-functions-in-javascript/
==== @channel Resources from Today’s Class: ====================

JavaScript — WTF is ES6, ES8, ES 2017, ECMAScript… ? https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c

When NOT to Use Arrow Functions: https://dmitripavlutin.com/when-not-to-use-arrow-functions-in-javascript/

JavaScript ES6+: var, let, or const? https://medium.com/javascript-scene/javascript-es6-var-let-or-const-ba58b8dcde75

Array Map, Filter and Reduce in JS: https://atendesigngroup.com/blog/array-map-filter-and-reduce-js

ES6 In Depth: Iterators and the for-of loop: https://hacks.mozilla.org/2015/04/es6-in-depth-iterators-and-the-for-of-loop/

Spread Operator vs Rest Parameter (a visual explanation): https://pbs.twimg.com/media/DklaSVIWwAEdRXE.jpg:large

7 Tricks with Resting and Spreading JavaScript Objects: https://blog.bitsrc.io/6-tricks-with-resting-and-spreading-javascript-objects-68d585bdc83

A Dead Simple Intro to Destructuring JavaScript Objects: https://wesbos.com/destructuring-objects/

What You Should Know About ES6 Maps: https://hackernoon.com/what-you-should-know-about-es6-maps-dc66af6b9a1e
==== @channel Resources from Today’s Class: ====================

The Object-Oriented Programming vs Functional Programming debate, in a beginner-friendly nutshell: https://medium.com/@sho.miyata.1/the-object-oriented-programming-vs-functional-programming-debate-in-a-beginner-friendly-nutshell-24fb6f8625cc

Callback Hell (and how to fix it!): http://callbackhell.com/

JavaScript Promises for Dummies (NOTE: you are NOT dummies): https://scotch.io/tutorials/javascript-promises-for-dummies

How to Chain Multiple Promises: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#Chaining

Async/Await for Beginners— Understanding Asynchronous Code in JavaScript: https://medium.com/javascript-in-plain-english/async-await-for-beginners-understanding-asynchronous-code-in-javascript-748b57ae94e2

A Beginner’s Guide to Async/Await in JavaScript (a little more in-depth): https://itnext.io/a-beginners-guide-to-async-await-in-javascript-97750bd09ffa 

Methods Within Constructor vs Prototype in JavaScript: https://www.thecodeship.com/web-development/methods-within-constructor-vs-prototype-in-javascript/
==== @channel Resources from Today’s Class: ====================

Methods Within Constructor vs Prototype in JavaScript: https://www.thecodeship.com/web-development/methods-within-constructor-vs-prototype-in-javascript/

The Beginner’s Guide to JavaScript Default Parameters: https://www.javascripttutorial.net/es6/javascript-default-parameters/

Understanding JavaScript Prototypes: https://www.pluralsight.com/blog/software-development/understanding-javascript-prototypes

A Beginner’s Guide to JavaScript Prototypes: https://tylermcginnis.com/beginners-guide-to-javascript-prototype/

Jest Testing Framework: https://jestjs.io/

What is the difference between a test runner, testing framwork, assertion library, and a testing plugin? http://amzotti.github.io/testing/2015/03/16/what-is-the-difference-between-a-test-runner-testing-framework-assertion-library-and-a-testing-plugin/

What are Unit Testing, Integration Testing and Functional Testing? https://codeutopia.net/blog/2015/04/11/what-are-unit-testing-integration-testing-and-functional-testing/

The Absolute Beginner’s Guide to Test Driven Development, with a Practical Example: https://medium.com/@bethqiang/the-absolute-beginners-guide-to-test-driven-development-with-a-practical-example-c39e73a11631

Unit Testing and the Arrange, Act and Assert (AAA) Pattern: https://medium.com/@pjbgf/title-testing-code-ocd-and-the-aaa-pattern-df453975ab80
==== @channel Resources from Today’s Class: ====================

Colors NPM package (package to make your console output colorful/styled): https://www.npmjs.com/package/colors

Make Console.log() output colorful and stylish in browser & node: http://voidcanvas.com/make-console-log-output-colorful-and-stylish-in-browser-node/

Mock Functions in Jest: https://jestjs.io/docs/en/mock-functions

Disguise-Driven Testing: Jest Mocks in Depth: https://ponyfoo.com/articles/disguise-driven-testing-jest-mocks-in-depth

How to Mock Using Jest.spyOn: https://blog.echobind.com/how-to-mock-using-jest-spyon-d13d57a8434d

How to Hide API Keys/Database Passwords in Node: https://du.bootcampcontent.com/denver-coding-bootcamp/DU-DEN-FSF-FT-12-2019-U-C/tree/master/Resources/Protecting-API-Keys-In-Node

Example of Replicating the extends Functionality in ES5 Constructors (look under ‘Extending Classes’; tldr: it’s complicated): https://www.accelebrate.com/blog/javascript-es6-classes-and-prototype-inheritance-part-1-of-2/

Example of One Convoluted Way You Could Inherit from Multiple Classes: https://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/#subclassfactorieswiththisoneweirdtrick
(^^^ @Allison Bradley, I think you had asked about this; it can be done but it’s clunky. ^^^)

I’ve also attached the class/extends code I demoed today (Product, Garment, and Book Classes)…