Month 1: January, 2018
Prior to my starting mid-Week 3
- https://github.com/LambdaSchool/Precourse (PR review???)
- https://github.com/LambdaSchool/Pre-Course-Git-Fu - Is this still issued to students?
- https://github.com/LambdaSchool/JavaScript-I-Mini
- https://github.com/LambdaSchool/JavaScript-I
- https://github.com/LambdaSchool/JavaScript-II-Mini
- https://github.com/LambdaSchool/JavaScript-II
- https://github.com/LambdaSchool/Sprint-Challenge--JavaScript
- https://github.com/LambdaSchool/Data-Structures-I
- https://github.com/LambdaSchool/LS-Data-Structures-I-Solution (PR review???)
- https://github.com/LambdaSchool/Data-Structures-II
- https://github.com/LambdaSchool/LS-Data-Structures-II-Solution (PR review???)
- https://github.com/LambdaSchool/Sprint-Challenge--Data-Structures
- reverseString
- longestString
- reverseCase
- reverseNumber
- moneyFormat
- stringToCamelCase
- evenOccurences
- romanNumerals
- stringCompression
- collatzSequence
- https://github.com/LambdaSchool/HTML-CSS-mini
- https://github.com/LambdaSchool/LS-Web-Intro-I (???)
- https://github.com/LambdaSchool/DOM-JavaScript-mini
- https://github.com/LambdaSchool/DOM-JavaScript-mini-Solution (PR review???)
- https://github.com/LambdaSchool/Sprint-Challenge-DOM-Javascript
Code Challenge 11: Consecutive Strings w/Patrick Kennedy
Sprint Challenge: DOM & Javascript
- https://github.com/lambdaschool/preprocessing-one
- https://github.com/LambdaSchool/Preprocessing-2
- https://github.com/LambdaSchool/responsive-web-design
- https://github.com/LambdaSchool/Sprint-Challenge--Responsive-Less
- https://codepen.io/joshlambda/pen/xYwoYe?editors=1100
Posted in Slack, Sunday prior: https://lambdaschoolstudents.slack.com/archives/C8ZM4HHD3/p1517169440000109
Setting up for LESS
Q: Why LESS and not SASS or another preprocessor?
A: Learning one will be almost identical to the other but SASS compiles on Ruby and to install Ruby for PC and MAC would have been an unwanted side effect for teaching. You will find that the time spent in LESS will prepare you for any pre processor.
*Q: I have node installed, but when I try to install LESS or run any commands I get an error: *
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
A: This is because of where your files for the node modules on your computer are stored. The quick fix is to simply run "sudo" in front of your commands to override the permission error.
Example:
$ sudo npm install -g less
This command, known as "super user do" will grant the correct permissions after you enter a password.
For a more permanent fix, you can follow this guide on the npm website:
https://docs.npmjs.com/getting-started/fixing-npm-permissions
Q: The pre course video talks about using jet brains IDE to further optimize my LESS build but I don't have that IDE. What gives?
A: Don't worry about the IDE. That was just a helpful tip and trick. We will be going over every detail in our guided demo. Just get LESS installed and attempt to write a few lines of LESS so you're familiar with it. Don't stress!
- Required: https://htmlmag.com/article/an-introduction-to-css-preprocessors-sass-less-stylus
- Documentation: http://lesscss.org/3.x/
- Install video (my version will be coming soon): https://www.youtube.com/watch?v=YQYJUeokqOY
- Read this first: https://www.sitepoint.com/a-comprehensive-introduction-to-less-mixins/
- After you have a decent handle on them, go try them out on your own!
- Here are some examples to get your started:
- https://css-tricks.com/snippets/css/useful-css3-less-mixins/
- I looked for a super short and succinct video on LESS and this is a great review in practice:
- https://www.youtube.com/watch?v=EU1sUpPGIb4
- Reading and watching for tomorrow's Responsive Web Design (RWD) Intro
- Responsive web design tutorial - really well done: https://www.youtube.com/watch?v=BIz02qY5BRA
- W3 Schools! Seriously, good intro here 😉 https://www.w3schools.com/css/css_rwd_intro.asp
- Optional reading (recommended if you really like design): https://www.smashingmagazine.com/2017/11/comprehensive-guide-web-design/
- Get familiar with em, rem, and px! https://engageinteractive.co.uk/blog/em-vs-rem-vs-px
- Optional extended reading on units: https://benfrain.com/just-use-pixels/ (edited)
- Percent based Layouts: https://youtu.be/epa5QFFpGHI
- Exercise 1: https://codepen.io/bigknell/pen/eVNoVp?editors=1100
- Exercise 2: https://codepen.io/bigknell/pen/qxdgYJ?editors=1100
- ALSO:
- https://www.smashingmagazine.com/2017/11/comprehensive-guide-web-design/
- https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
- http://jonibologna.com/flexbox-cheatsheet/
- Bootstrap example: https://codepen.io/bigknell/pen/QQbzjz?editors=1010
Code Challenge 12: Sum of Digits w/Patrick Kennedy
CSS Preprocessor Intro w/Josh Knell
CSS Preprocessor Intro Q&A w/Josh Knell
Code Challenge 13: Common Elements w/Satish Vattikuti
CSS Preprocessor 2 w/Josh Knell
CSS Preprocessor 2 Q&A w/Josh Knell
Code Challenge 14: Bubble Sort w/Satish Vattikuti
Responsive Web Design: Guided Demo w/Josh Knell
Responsive Web Design: Q&A w/Josh Knell
Code Challenge 15: Sort Strings w/Satish Vattikuti
Responsive Web Design - Percent Based Layout w/Josh Knell
Responsive Web Design II: Guided Demo w/Josh Knell
Responsive Web Design II: Q&A w/Josh Knell
Sprint Challenge Repository on GitHub: Responsive LESS
Responsive Web & LESS Sprint Challenge Solution w/Josh Knell
Intro to Slack command: /question
w/Patrick Kennedy
Month 2: February, 2018
- React I Pre-Class Video w/Sean Chen 46 min
- https://reactjs.org/docs/thinking-in-react.html
- https://github.com/LambdaSchool/React-I-Mini-Sprint
- https://github.com/LambdaSchool/React-I
- https://github.com/LambdaSchool/React-II
- https://github.com/LambdaSchool/Sprint-Challenge---React
Code Challenge 16: To Binary String w/Patrick Kennedy
Guided Demo Part 1 - First steps with React and create-react-app w/Luis Hernandez
Git windows installation adding Unix tools to Command Prompt w/Luis Hernandez
Q and A, class components and introduction to state w/Luis Hernandez
Code Challenge 17: Prime List w/Satish Vattikuti
Guided Demo Part 2 - Add and Remove examples w/Luis Hernandez
Code Challenge 18: Days Between w/Manisha Lal
Guided Demo Part 3 - Styling React Components w/Luis Hernandez
How to create a GitHub repository and connect it to an application built with create-react-app w/Luis Hernandez
Q and A Part 3 w/Luis Hernandez
Code Challenge 19: Expanded Numbers w/Tyge Johnson
Guided Demo Part 4 - PropTypes, defaultProps and Lifecyle hooks w/Luis Hernandez
Q and A Part 4 - Review from Scratch w/Luis Hernandez
Brown Bag w/Adam Nash: Personal Finance for Engineers
Sprint Challenge Review w/Luis Hernandez
- Pre-Class Video: https://youtu.be/ENNS0YeCLA0
- https://codeburst.io/javascript-promises-explained-with-simple-real-life-analogies-dd6908092138
- https://github.com/LambdaSchool/HTTP-Mini-Sprint
- https://github.com/LambdaSchool/HTTP-AJAX
- https://github.com/LambdaSchool/Client-Side-Routing
- https://github.com/LambdaSchool/Sprint-Challenge-Routing-Axios
Code Challenge 20: Rock, Paper, Scissors w/Patrick Kennedy
Guided Demo - Introduction to HTTP Ajax and Promises w/Luis Hernandez
Q&A w/Satish, Wesley and Patrick
Code Challenge 21: Merged Objects w/Satish Vattikuti
Guided Demo Part 2 - Implementing Post and Pair Programming Demo w/Luis Hernandez
Q&A - Implementing Delete and Lifting State Up w/Luis Hernandez
Code Challenge 22: Is Twin Prime? w/Manisha Lal
Guided Demo - Introduction to React Router w/Luis Hernandez
LECTURE w/Luis Hernandez
Code Challenge 23: Insertion Sort w/Tyge Johnson
Q&A - React Router w/Luis Hernandez
Sprint Challenge Repository on GitHub: Routing Axios
Brown Bag w/Sean Chen: Parallel Algorithm Design
Sprint Challenge Review w/Luis Hernandez: React Router and AJAX Update/Put
change
- Pre Class video: https://youtu.be/Ozx4FH4iKWc
- https://github.com/LambdaSchool/Redux-I-Mini
- https://github.com/LambdaSchool/Redux
- https://github.com/LambdaSchool/Redux-II
- https://github.com/LambdaSchool/Sprint-Challenge--Redux
- Pre class videos PLEASE watch this video in this Tutorial Series. And then watch #6
- Async Actions in Redux
- Some delightful docs!
Code Challenge 24: Operators w/Patrick Kennedy
Introduction to Redux I - Immutability w/Ivan Mora
Redux I - Q&A w/Ivan Mora
Code Challenge 25: Equal Sides w/Satish Vattihuti
Redux I mini - Solution w/Ivan Mora
GitHub "Collaboration" & Pair Programming w/Tai Chulikavit, Boomer & Patrick Kennedy
Redux I - Q&A w/TAs
Code Challenge 26: Check Matching Leaves w/Manisha Lal
Redux I Solution Lecture & Redux II Lecture w/Sean Chen
Redux-II Q&A 1 w/Sean Chen
Code Challenge 27: Markdown Tables w/Patrick Kennedy
Redux II Solution Lecture w/Sean Chen
- http://ls-training-kit.netlify.com/cs-master/sprints/recvfiumbzbczllxc
- https://github.com/LambdaSchool/front-end-project-week
- Intro to Agile and Trello
- Pomodoror technique: https://francescocirillo.com/pages/pomodoro-technique
Code Challenge 28: Quick Sort w/Matt Jackson
Front End Project Week - Guided Instruction w/Josh Knell
Git Commits and Pep Talk w/Josh Knell
Pomodoro - Tomato... time tracking! w/Josh Knell
Weekly Scrum Agile w/Josh Knell
Month 3: March, 2018
- Karthik Intro Video: CS1 Node.js and Express
- https://github.com/LambdaSchool/Node-Express
- https://github.com/LambdaSchool/node-express-mini
- https://github.com/LambdaSchool/node-express-mini-finished (solution)
- https://github.com/LambdaSchool/Node-Express-Lab
- https://github.com/LambdaSchool/node-express-lab-finished (solution)
Code Challenge 29: Merge Sort w/Dylan Scheidt
Node - Introduction Lecture w/Ivan Mora
Node - Introduction Q&A w/TAs
Code Challenge 30: Breadth First Search w/Satish Vatikuti
Node - Express I - Mini Solution w/Ivan Mora
Code Challenge 31: Queue Stack w/Matthew Jackson
Third Party APIs - Intro Lecture and assignment w/Ivan Mora
Code Challenge 32: Largest Contiguous Sum w/Tyge Johnson
Node-Express-Gmaps - Day I Lab Solution Lecture w/Ivan Mora
LECTURE w/TAs
Sprint Challenge Review w/Ivan Mora
- Pre-Class video: https://youtu.be/mc26S-0FeSA
- MongoDB Installation Docs - follow the instructions to install the Community Edition for your platform
- https://docs.mongodb.com/manual/installation/
- https://www.mongodb.com/download-center?jmp=tutorials#community
- NOTE: Windows users - do not select "Compass" as a part of th installer per: https://www.youtube.com/watch?v=l8Ij6hVQsBk&feature=youtu.be
- Robo 3T - Graphical User Interface tool for MongoDB
- MongoDB Compass - Graphical User Interface tool created by the developers of MongoDB, install the Community Edition.
- MongooseJS - MongoDB Object Document Mapper for Node.js
- MongooseJS documentation on Queries
- MongoDB documentation on Queries
- https://github.com/LambdaSchool/mongo-I-mini
- https://github.com/LambdaSchool/Mongo-I
- https://github.com/LambdaSchool/Mongo-II
- https://github.com/LambdaSchool/Mongo-III
- https://github.com/LambdaSchool/mongo-iv
- https://github.com/LambdaSchool/Sprint-Challenge-Mongo
Code Challenge 33: Reverse Linked List w/Matt Jackson
Guided Demo 1 w/Luis Hernandez
Windows Install Troubleshooting w/Luis Hernandez
Guided Demo 2 w/Luis Hernandez
Code Challenge 35: Linked List Cycle w/SPEAKER
Guided Demo 3 - Relationships w/Luis Hernandez
Code Challenge 36: Balanced Brackets w/SPEAKER
Guided Demo 4 - Importing data, linking and queries w/Luis Hernandez
Review and Q&A w/Luis Hernandez
Sprint Challenge Review w/Luis Hernandez
- Pre-Class video: https://youtu.be/lcTNZXJVwd4
- https://github.com/LambdaSchool/Auth-Mini
- https://github.com/LambdaSchool/Auth
- Client Authentication Prep Video
- https://github.com/LambdaSchool/Client-Auth-Mini
- https://github.com/LambdaSchool/Client-Auth
- https://github.com/LambdaSchool/Sprint-Challenge-Authentication
Code Challenge 37: Get All Product Except At Index w/Patrick Kennedy
Authentication with BCrypt Middleware and Sessions w/Ryan Hamblin
Auth-Mini Solution + QA w/Ryan Hamblin
Code Challenge 38: Largest Difference w/Matthew Jackson
Auth/pre hooks and methods and RegEx 'lite' w/Ryan Hamblin
Code Challenge 39: Armstrong Numbers w/Tyge Johnson
Cors w/Ryan Hamblin
Discusson And Demo on HOC w/Ryan Hamblin
Code Challenge 40: Route Between Nodes w/Manisha Lal
Client Auth w/ Sessions SOLUTION w/Ryan Hamblin
JSON Web Tokens w/Ryan Hamblin
Sprint Challenge Repository on GitHub: Authentication
Auth - Sprint Challenge Solution w/Ryan Hamblin
Brown Bag w/Ryan Hamblin: Imposter Syndrome
- Pre-Class video: https://youtu.be/UdIvNJA2PwI http://chaijs.com/ https://mochajs.org/ https://devhints.io/sinon-chai https://github.com/LambdaSchool/Testing
- https://tk.lambdaschool.com/cs-master/sprints/recxv0jwyeyd6y2jq
- https://github.com/LambdaSchool/Testing
- https://github.com/LambdaSchool/React-Testing
- https://github.com/LambdaSchool/Server-Testing-Mini
- https://github.com/LambdaSchool/Server-Testing
- https://github.com/LambdaSchool/Sprint-Challenge--Testing
Code Challenge 41: Sum And Product w/Matt Jackson
Client-Side Testing Lecture w/Sean Chen
Client-Side Testing Q&A w/Sean Chen
Code Challenge 42: Chained Functions w/Tyge Johnson
React Testing Lecture w/Sean Chen
Code Challenge 43: Stack Machine w/Satish Vatikuti
Server Testing Lecture w/Sean Chen
Server Testing Q&A on before() and after() w/Sean Chen
- Server testing mini code: https://gist.github.com/seanchen1991/f2431535c3a42af3919e5b21ee4fa11c
Code Challenge 44: Prime Reduction w/Manisha Lal
Server-Testing Solution Lecture w/Sean Chen
- Link to solution repository: https://github.com/ryanhca/testing-a-server
Brown Bag w/Leon Bates: Refactoring .then, async, & await
Sprint Challenge -- Testing Solution Lecture w/Sean Chen
Month 4: April, 2018
- https://tk.lambdaschool.com/cs-master/sprints/recwkcwui91eg1s8q
- https://tk.lambdaschool.com/cs-master/modules/reclxlvbkj28kntn8
Backend Project Week Kickoff w/Sean Chen
Basic MongoDB Schema and Express Server w/Patrick Kennedy
Backend Project Week Instructor Session 2 w/Sean Chen
Brown Bag w/Leon Bates: Refactoring .then, async, & await
Backend Project Week Instructor Session 3 w/Sean Chen
CS7 Back End Project Demo w/Sean Chen
- Beej's introduction: https://lambdaschoolstudents.slack.com/archives/G8QF444TG/p1523057832000187
- Precourse viddy: https://www.youtube.com/watch?v=osLzed5ExFs&feature=youtu.be
- Precourse viddy: https://www.youtube.com/watch?v=NwimiPFMzp4&feature=youtu.be
- Overview: https://tk.lambdaschool.com/cs-master/sprints/recndtno1v8odbbpb
- Mon/Tue: https://tk.lambdaschool.com/cs-master/modules/recsujbrrfgbfucrx
- Wed/Thu: https://tk.lambdaschool.com/cs-master/modules/recvqukzz23ntj20g
- https://github.com/LambdaSchool/Computer-Architecture-One
- https://github.com/LambdaSchool/Sprint-Challenge--Computer-Architecture
Code Challenge ##: Deep Equality w/Patrick Kennedy
Computer Architecture #1 w/Beej Jorgensen
Code Challenge ##: CODE_CHALLENGE w/Tyge Johnson
LECTURE w/Beej Jorgensen
Code Challenge ##: CODE_CHALLENGE w/Matt Jackson
LECTURE w/Beej Jorgensen
LECTURE w/Beej Jorgensen
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC <---- Eileen Introduction to C Pointers
Sprint Challenge Review w/Beej Jorgensen
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
Month 5: May, 2018
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
Month 6: June, 2018
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
Month 7: July, 2018
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Sprint Challenge Repository on GitHub: NEW_SPRINT_CHALLENGE
Brown Bag w/SPEAKER: TOPIC
Sprint Challenge Review w/SPEAKER
- GitHub Repositories
LECTURE w/SPEAKER
LECTURE w/SPEAKER
Hackathon 2: Presentations w/SPEAKER
- Pre-Class video:
- GitHub Repositories
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Code Challenge ##: CODE_CHALLENGE w/SPEAKER
LECTURE w/SPEAKER
Final Hoorah! w/SPEAKER: TOPIC
Publc Demo w/SPEAKER
Code Challenges
Consecutive Strings Solution
/*
You are given an array of strings called arr and an integer k.
Your task is to return the longest string consisting of k consecutive
strings from the array.
n being the length of the string array, if n = 0 or k > n or k <= 0 return "".
*/
function longestConsecutive(arr, k) {
// n being the length of the string array, if n = 0 or k > n or k <= 0 return "".
// n = arr.length
if (arr.length === 0 || arr.length < k || k <= 0) return '';
// return the longest string consisting of k consecutive strings from the array.
return arr
.map((value, index) => (
arr.slice(index, index + k).join('')
))
.reduce((longest, current) => (current.length > longest.length) ? current : longest);
}
// TEST SUITE - swEEt!
// console.log(longestConsecutive([], 1), "empty string") // <--- '' - arr.length === 0
// console.log(longestConsecutive(["one"], 2), "empty string") // <--- '' - arr.length < k
// console.log(longestConsecutive(['something'], -1), "empty string") // <--- '' - k <= 0
// const array = ['1', '22', '333', '55555', '4444', 'xx', '666666', 'ggg', 'q', 'kk'];
// console.log(array.length); // <--- 10
// console.log(array.slice(3, 6)); // <--- [ '55555', '4444', 'xx' ]
// console.log(array.join('')); // <--- 122333555554444xx666666gggqkk
// console.log(array.map((value, index) => (array.slice(index, index + 2).join('')))); // <--- ugly
// console.log(array.reduce((longest, current) => current.length > longest.length ? current : longest)); // <--- six sixes
// console.log(longestConsecutive(["zone", "abigail", "theta", "form", "libe", "zas"], 2)) // <--- "abigailtheta"
// console.log(longestConsecutive(["zone", "abigail", "theta", "antidisestablishmentarianism", "form", "libe", "zas"], 3)) // <--- abi theta anti
// console.log(longestConsecutive(["zone", "abigail", "theta", "antidisestablishmentarianism", "capybara", "form", "libe", "zas"], 3)) // <--- theta anti capy
/*
RESOURCES: google search "MDN {method name}", W3 schools, Free Code Camp
ARRAY METHODS
SLICE: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
JOIN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join
MAP: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
REDUCE: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
ALSO GOOD: https://medium.freecodecamp.org/reduce-f47a7da511a9
*/
- If ANY one of the variables evaluates to
true
, then the entire proposition evaluates totrue
. - There are three terms:
phi
,psi
&fry
. - Each term has two possible states:
true
orfalse
. - The total number of possible combination of three terms which each have two possible states is...?
- Number of states (either true or false) raised to the power of the number of terms (phi, psi & fry), i.e. 23, or (2 * 2 * 2), a.k.a. eight:
# | phi | psi | fry | "phi inclusive_or psi inclusive_or fry" |
---|---|---|---|---|
1) | T | T | T | True |
2) | T | T | F | True |
3) | T | F | T | True |
4) | T | F | F | True |
5) | F | T | T | True |
6) | F | T | F | True |
7) | F | F | T | True |
8) | F | F | F | False |
- Just a quick explanation of the difference between exclusive and inclusive or logic.
- An exclusive "or" operator evaluates to true when ONLY one of the terms (operands) is true.
- i.e. "I will have either a cheese burger, or pizza, but not both"
Φ | Ψ | "Φ exclusive_or Ψ" |
---|---|---|
T | T | False |
T | F | True |
F | T | True |
F | F | False |
Sum Of Digits Solutions
/*
* Sum Of Digits
* Write a function called sumOfDigits that given a positive integer, returns the sum of its digits.
* Assume all numbers will be positive.
*
* Input: 23 >>>function>>> Output: 5
* Input: 496 >>>function>>> Output: 19
*/
// SOLUTION 1 - everyone loves for loops!
function sumOfDigits (num) {
const integerStrings = ('' + num).split(''); // does the same thing as the next line
// const integerStrings = String(num).split(''); // I find this reads better
console.log(typeof(integerStrings)) // <--- 'object' (JA arrays are objects - Everything Is Objects!!!)
const len = integerStrings.length;
console.log(integerStrings); // <--- should return an array of strings
// declaring variables to be used in the for loop
let i = 0,
sum = 0;
// For-Loop Love!
for (i; i < len; i++) {
sum += Number(integerStrings[i]); // <--- turns the strings into type: integers
console.log(sum); // <--- sum of adding up all ints in the array of ints
}
return sum;
}
// SOLUTION 2 - using map() and reduce()
function sumOfDigits (num) {
const stringIntegers = String(num).split('');
console.log(`strInts.len: ${stringIntegers.length} & the strInts ${stringIntegers} are: ${typeof(stringIntegers[0])}`);
const integers = stringIntegers.map(num => Number(num));
console.log(`integers: ${integers} are: ${typeof(integers[0])}`);
const sum = integers.reduce((sum, n) => sum + n, 0);
return sum;
}
// CS1 MODEL SOLUTION - w/dot chaining
function sumOfDigits(num) {
const digits = (String(num)).split('')
.map(num => parseInt(num))
.reduce((sum, n) => sum + n);
return digits;
}
// MODEL SOLUTION - just return it!
function sumOfDigits(num) {
return (String(num)).split('')
.map(num => parseInt(num))
.reduce((sum, n) => sum + n);
}
/* eslint no-console: 0 */
// TEST SUITE
const x = 12345;
console.log(sumOfDigits(x)); // ~~~> 15
console.log(sumOfDigits(23)); // ~~~> 5
console.log(sumOfDigits(496)); // ~~~> 19
console.log(typeof(sumOfDigits(496))); // ~~~> number
console.log(typeof(Number(x))); // <--- number
console.log(typeof(String(x))); // <--- string
console.log(typeof(parseInt(x))); // <--- number
console.log(String(x).split('')); // <--- [ '1', '2', '3', '4', '5' ]
To Binary Strings
/*
Given a positive (or 0) number, return a string of 1's and 0's representing it's binary value:
toBinaryString(6) should return "110" (no leading 0).
Use of the native method number.toString(2); is disallowed.
*/
// A console.log() heavy solution
function toBinaryString(number) {
let r = '';
while (number > 0) {
console.log(`number starts: ${number}`);
const bit = (Math.floor(number % 2) !== 0) ? '1' : '0';
console.log(`bit : ${bit}`);
r = bit + r;
console.log(`the return is: ${r} <--- it's GROWING`);
number = Math.floor(number / 2);
console.log(`number is now: ${number}\n`);
}
console.log('COUNTING IN BINARY IS SO MUCH FUN!!!!!');
return r;
}
// // Satish
// function toBinaryString(number) {
// if (number === 0) return 0;
// let res = '';
// while (number > 0) {
// res = (number % 2) + res;
// number = Math.floor(number / 2);
// }
// return res;
// }
// // Repli.it Model Solution
// function toBinaryString(number) {
// let r = '';
// while(number > 0) {
// r = number % 2 + r; // r is number remainder 0 or 1 in string
// number >>= 1; // number >>= 1; what does that mean
// }
// return r || "0";
// }
// TEST SUITE
// console.log(toBinaryString(0)); // <--- 0
// console.log(toBinaryString(1)); // <--- 1
// console.log(toBinaryString(2)); // <--- 10
// console.log(toBinaryString(3)); // <--- 11
// console.log(toBinaryString(4)); // <--- 100
// console.log(toBinaryString(5)); // <--- 101
// console.log(toBinaryString(6)); // <--- 110
// console.log(toBinaryString(7)); // <--- 111
// console.log(toBinaryString(8)); // <--- 1000
// console.log(toBinaryString(9)); // <--- 1001
// console.log(toBinaryString(10)); // <--- 1010
// console.log(toBinaryString(11)); // <--- 1011
// console.log(toBinaryString(12)); // <--- 1100
console.log(toBinaryString(13)); // <--- 1101
// console.log(toBinaryString(14)); // <--- 1110
// console.log(toBinaryString(15)); // <--- 1111
// console.log(toBinaryString(16)); // <--- 10000