mixelpixel / CS7

An archive of daily lectures and fun!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CS7: DAY by DAY

CS7 Lambda


!EASTER EGGS: Click on the ▶︎ black ▶︎ triangles ▶︎ to reveal EASTER EGGS!

Overview

Google Calendar Week Example

  • The CS7 Calendar is available on Google Calendars per invite.

CS& Google Calendar

Lambda School Sprint Structure

Lambda School Sprint Structure


Day by day, week by week, month by month, we learn!

Month 1: January, 2018

Prior to my starting mid-Week 3

THIS LIST IS JUST AN EDUCATED GUESS RIGHT NOW

Pre-Coursework


Week 1: Jan. 8 - 12

JavaScript I - IV


Week 2: Jan. 16 - 19 (1/15: MLK Jr.)

Data Structures


Code Challenges 1 through 10

  1. reverseString
  2. longestString
  3. reverseCase
  4. reverseNumber
  5. moneyFormat
  6. stringToCamelCase
  7. evenOccurences
  8. romanNumerals
  9. stringCompression
  10. collatzSequence


Week 03: Jan. 22 - 26

HTML/CSS and DOM Manipulation w/Ivan Mora

Day 10: Mon, Jan. 22


Day 11: Tue, Jan. 23


Day 12: Wed, Jan. 24


Day 13: Thu, Jan. 25


Day 14: Fri, Jan. 26

Sprint Challenge: DOM & Javascript

Sat, Jan. 27


Week 04: Jan. 29 - Feb. 2

Responsive Design and CSS Pre-Processors w/Josh Knell

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!

Day 1 - Preprocessors Intro
Day 2 - Preprocessors Advanced
Day 3 - Responsive Web Design Intro
Day 4 - Responsive Web Design Advanced

Day 15: Mon, Jan. 29


Day 16: Tue, Jan. 30

CSS Preprocessor 2 w/Josh Knell


Day 17: Wed, Jan. 31


Day 18: Thu, Feb. 1


Day 19: Fri, Feb. 2


Month 2: February, 2018

Week 05: Mon. Feb 5 - 9

React 1 w/Luis Hernandez

Assignments

Day 20: Mon, Feb. 5


Day 21: Tue, Feb. 6


Day 22: Wed, Feb. 7

Q and A Part 3 w/Luis Hernandez


Day 23: Thu, Feb. 8


Day 24: Fri, Feb. 9

Brown Bag w/Adam Nash: Personal Finance for Engineers

Sprint Challenge Review w/Luis Hernandez


Week 06: Feb. 12 - 16

React 2 w/Luis Hernandez

Assignments

Day 25: Mon, Feb. 12

Q&A w/Satish, Wesley and Patrick


Day 26: Tue, Feb. 13


Day 27: Wed, Feb. 14

LECTURE w/Luis Hernandez


Day 28: Thu, Feb. 15

Q&A - React Router w/Luis Hernandez


Day 29: Fri, Feb. 16

Brown Bag w/Sean Chen: Parallel Algorithm Design

Sprint Challenge Review w/Luis Hernandez: React Router and AJAX Update/Put


change

Week 07: Feb. 19 - 23

Redux w/Ivan Mora & Sean Chen

Assignments

Redux-II prep

Mon, Feb. 19 PRESIDENT'S DAY


Day 30: Tue, Feb. 20

Redux I - Q&A w/Ivan Mora


Day 31: Wed, Feb. 21

GitHub "Collaboration" & Pair Programming w/Tai Chulikavit, Boomer & Patrick Kennedy


Day 32: Thu, Feb. 22

Redux-II Q&A 1 w/Sean Chen


Day 33: Fri, Feb. 23


Week 08 Feb.26 - Mar. 2

Front-End Project w/Josh Knell

Assignments

Prep

Day 34: Mon, Feb. 26


Day 35: Tue, Feb. 27


Day 36: Wed, Feb. 28


Day 37: Thu, Mar. 1

Weekly Scrum Agile w/Josh Knell


Day 38: Fri, Mar. 2


Month 3: March, 2018

Week 09: Mar. 5 - 9

Node w/Ivan Mora

Installation

Assignments

Day 39: Mon, Mar. 5


Day 40: Tue, Mar. 6


Day 41: Wed, Mar. 7


Day 42: Thu, Mar. 8

LECTURE w/TAs


Day 43: Fri, Mar. 9


Week 10: Mar. 12 - 16

MongoDB w/Luis Hernandez

Installation

  1. MongoDB Installation Docs - follow the instructions to install the Community Edition for your platform
  1. Robo 3T - Graphical User Interface tool for MongoDB
  1. MongoDB Compass - Graphical User Interface tool created by the developers of MongoDB, install the Community Edition.
  1. MongooseJS - MongoDB Object Document Mapper for Node.js
  1. MongooseJS documentation on Queries
  1. MongoDB documentation on Queries

Assignments

Day 44: Mon, Mar. 12

Guided Demo 1 w/Luis Hernandez


Day 45: Tue, Mar. 13

Guided Demo 2 w/Luis Hernandez


Day 46: Wed, Mar. 14


Day 47: Thu, Mar. 15

Review and Q&A w/Luis Hernandez


Day 48: Fri, Mar. 16

Sprint Challenge Review w/Luis Hernandez


Week 11: Mar. 19 - 23

Client Authentication w/Ryan Hamblin

Assignments

Day 49: Mon, Mar. 19


Day 50: Tue, Mar. 20


Day 51: Wed, Mar. 21

Cors w/Ryan Hamblin


Day 52: Thu, Mar. 22

JSON Web Tokens w/Ryan Hamblin


Day 53: Fri, Mar. 23

Brown Bag w/Ryan Hamblin: Imposter Syndrome


Week 12: Mar. 26 - 30

Testing w/Sean Chen

Assignments

Day 54: Mon, Mar. 26


Day 55: Tue, Mar. 27


Day 56: Wed, Mar. 28


Day 57: Thu, Mar. 29


Day 58: Fri, Mar. 30

Brown Bag w/Leon Bates: Refactoring .then, async, & await


Month 4: April, 2018

Week 13: Apr. 2 - 6

Project Week - Back End Project w/Sean Chen

Assignments

Day 59: Mon, Apr. 02


Day 60: Tue, Apr. 03


Day 61: Wed, Apr. 04

Brown Bag w/Leon Bates: Refactoring .then, async, & await


Day 62: Thu, Apr. 05


Day 63: Fri, Apr. 06


Week 14: Apr. 9 - 13

Computer Architecture w/Beej Jorgensen

Assignments

Day 64: Mon, MON. 9

Computer Architecture #1 w/Beej Jorgensen


Day 65: Tue, MON. 10

LECTURE w/Beej Jorgensen


Day 66: Wed, MON. 11

LECTURE w/Beej Jorgensen


Day 67: Thu, MON. 12

LECTURE w/Beej Jorgensen


Day 68: Fri, MON. 13

Brown Bag w/SPEAKER: TOPIC <---- Eileen Introduction to C Pointers

Sprint Challenge Review w/Beej Jorgensen


Week 15: Apr. 16 - 20

Intro to C and Operating Systems w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Week 16: Apr. 23 - 27

Processes, System Calls, and Scheduling w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Month 5: May, 2018

Week 17: Apr. 30 - May 4

Theory of Computation/Algorithms w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Week 18: May. 7 - 11

Graphs w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Week 19: May. 14 - 18

Security/Cellular Automata/Capstone Prep w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Week 20: May. 21 - 25

Python/Django I w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Month 6: June, 2018

Week 21: May. 29 - Jun. 1

Python/Django II/Career Development w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

Memorial Day


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Week 22: Jun. 4 - 8

Python/Django III/Career Development w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Week 23: Jun. 11 - 15

Capstone (Progress Demo 1)/Career Development w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Week 24: Jun. 18 - 22

Capstone (Progress Demo 2)/Career Development w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Month 7: July, 2018

Week 25: MON. 25 - 29

Capstone (Brown Bag)/Career Development w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

Brown Bag w/SPEAKER: TOPIC


Week 26: Jul. 2 - 6

HACKATHON #2

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.


Day ##: Thu, MON. ## - BREAK


Day ##: Fri, MON. ## - BREAK


Week 27: Jul. 9 - 13

Capstone(Final/Public Demo)/Career Development w/INSTRUCTOR

  • Pre-Class video:

Assignments

  • GitHub Repositories

Day ##: Mon, MON.

LECTURE w/SPEAKER


Day ##: Tue, MON.

LECTURE w/SPEAKER


Day ##: Wed, MON.

LECTURE w/SPEAKER


Day ##: Thu, MON.

LECTURE w/SPEAKER


Day ##: Fri, MON.

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
 */

Truth Table: Inclusive Or

  • If ANY one of the variables evaluates to true, then the entire proposition evaluates to true.
  • There are three terms: phi, psi & fry.
  • Each term has two possible states: true or false.
  • 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

Exclusive Or (with only two terms)

  • 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

About

An archive of daily lectures and fun!