Skip to content

Instantly share code, notes, and snippets.

View mdang's full-sized avatar

Mike Dang mdang

View GitHub Profile
@mdang
mdang / PYTHON_IMDB_STARTER.ipynb
Last active December 24, 2021 12:02
Exercise: Python IMDB (Starter)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdang
mdang / PYTHON_IMDB_SOLUTION.ipynb
Last active January 24, 2017 15:21
Exercise: Python IMDB (SOLUTION)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mdang
mdang / PYTHON_FUNCTION_PRACTICE.md
Last active January 10, 2023 15:09
Exercise: Python Function Practice

Python Function Practice

Create the following functions

1. A recipe you are reading states how many grams you need for the ingredient. Unfortunately, your store only sells items in ounces. Create a function to convert grams to ounces.

ounces = 28.3495231 * grams

@mdang
mdang / PYTHON_FUNDAMENTALS.md
Last active January 24, 2017 15:30
Lesson: Python Fundamentals

Python Fundamentals

Learning Objectives

Built-in Types

Falsy Values

  • None
  • False
@mdang
mdang / OOP_PYTHON.md
Last active September 22, 2023 07:16
Lesson: OOP Python

OOP Python

Learning Objectives

  • Create a function that takes arguments
  • Create instances of an object from a custom class
  • Create a module and import functions into a file
  • Explain why design patterns exist and why they're useful

User Defined Functions

@mdang
mdang / WEBSITE_AUTH.md
Last active December 17, 2020 18:48
Lesson: Website Auth

Website Auth

Learning Objectives (Cookies + Sessions):

  • Describe how HTTP cookies work
  • List common uses and limitations of cookies
  • Explain why the statelessness of HTTP necessitates sessions & cookies
  • Describe how sessions work
  • Describe where a session exists in a client/server interaction
  • Demonstrate how cookies are sent back and forth between client and server
@mdang
mdang / CODEWARS.md
Created December 5, 2016 18:23
Exercise: CodeWars

Codewars

25 min

Sign up for an account on Codewars if you don't already have one.

Attempt making the tests pass for three different challenges with a level 8 kyu.

@mdang
mdang / MOCHA_CHAI_TIC_TAC_TOE.md
Last active December 5, 2016 18:26
Exercise: Mocha, Chai + Tic Tac Toe

Mocha, Chai: Tic Tac Toe

15 min

Think about the Tic Tac Toe project we had. Think through what tests we could write for it now that we know more about testing.

Write out the describe and it blocks, don't worry about including the functions to actually test it.

describe('Tic Tac Toe test suite', function() {
@mdang
mdang / MOCHA_CHAI_ARRAY_TESTS.md
Last active December 5, 2016 18:19
Exercise: Mocha/Chai Array tests

Mocha, Chai: Array Tests

20 min

Our test suite for testing built-in Array methods is far from complete. Let's add a few more.

Write tests for the following array methods:

  1. join(':')
  2. sort()
@mdang
mdang / TESTING_MOCHA_CHAI.md
Last active June 3, 2022 19:04
Testing: Mocha and Chai

Testing with Mocha/Chai

Lesson intro adapted from Gerry Mathe in London

Learning Objectives

  • Explain why we want to write tests for our code
  • Explain the difference between unit tests and acceptance tests
  • Explain what TDD is
  • Explain what BDD is