Skip to content

Instantly share code, notes, and snippets.

View zcaceres's full-sized avatar
👨‍💻
programming

Zach Caceres zcaceres

👨‍💻
programming
View GitHub Profile
@zcaceres
zcaceres / ES6.md
Created March 24, 2017 22:01
ES6 lecture. FSA 1702 – March 27, 2017

ES6

FSA 1702 – March 27, 2017


History

ECMA Script 6 (ES2015). A weird name that arose from a copyright dispute (European Computer Manufacturing Association).

Standardizing and updating the language is meant to make the lives of developers easier and simpler. Never perfectly aligned across browsers, but does get better over time. ES6 still has some unsupported functionality.

@zcaceres
zcaceres / Cryptography-cs-saturday.md
Last active March 31, 2017 03:22
Foundational Ideas in Cryptography March 25, 2017

Cryptography

FSA March 25, 2017

Foundational ideas in Cryptography


Crypto

  • Cryptography: code-making / secret keeping
  • Cryptanalysis: code-breaking / secret revealing
@zcaceres
zcaceres / React-Router.md
Created March 28, 2017 20:50
FSA 1702 – March 28, 2017

React Router

FSA 1702 – March 28, 2017

Simpler Single-Page Applications


The Old Way

  • Make many requests, get your files
  • Make a new request, get a new page
@zcaceres
zcaceres / React-and-Forms.md
Created March 29, 2017 21:54
FSA 1702, March 29, 2017

React & Forms

FSA 1702, March 29, 2017

"Do what you got to do." Because form logic sucks.


Forms

Validation gets really complicated really fast. All sorts of crazy edge cases that create spaghetti.

React to the rescue.

@zcaceres
zcaceres / React-Redux.md
Created March 30, 2017 21:41
FSA 1702, March 30, 2017

React - Redux

FSA 1702, March 30, 2017

Predictable State Container for Javascript Apps

We dispatch actions (an expression of intent). Redux changes our state for us in a store, and returns a new state. We don't change our state directly. Then we can REWIND TIME.


So what the hell does that mean?

State: condition of the app (data) at a particular moment in time

@zcaceres
zcaceres / Machine-Learning.md
Last active April 1, 2017 19:38
FSA 1702 – April 1, 2017 CS Saturday

Machine Learning: CS-Saturday

FSA 1702 – April 1, 2017


Competitive Search and Agents for Games – Minimax

Let's make agents to play deterministic zero-sum game.

Monte Carlo tree search is a non-deterministic extension of this approach.

Deterministic games have 'no excuses' (dice rolls, cards drawn etc). Only the players' moves determine the outcome of the game.

@zcaceres
zcaceres / react-redux-library.md
Last active April 3, 2017 15:15
Simplifying your dispatch, subscribe, unsubscribe, and setStates with react-redux – FSA 1702, April 3 2017

react-redux Library

FSA 1702, April 3 2017

react-redux helps us simplify subscribe, unsubscribe, setState, and dispatch by providing us components 'connected' to our store.

It also optimizes our re-renders by diffing our props changes, just like React diffs our virtual and rendered DOM.


Refactoring to react-redux

Auth

Not Web Security...


Auth Basics

We check passwords against the records in our database.

Authentication – Is this person who they say they are?

How do people stay logged in?

@zcaceres
zcaceres / Nested-Routers-Express.md
Last active April 4, 2024 09:44
Child Routers in Express

Nested Routers in Express.js

Express makes it easy to nest routes in your routers. But I always had trouble accessing the request object's .params when you had a long URI with multiple parameters and nested routes.

Let's say you're building routes for a website www.music.com. Music is organized into albums with multiple tracks. Users can click to see a track list. Then they can select a single track and see a sub-page about that specific track.

At our application level, we could first have a Router to handle any requests to our albums.

const express = require('express');