Skip to content

Instantly share code, notes, and snippets.

View colevandersWands's full-sized avatar

Evan Cole colevandersWands

View GitHub Profile
@colevandersWands
colevandersWands / baked_squash.py
Last active October 12, 2023 08:48
baked squash pseudocode recipes
"""A simple recipe for baked squash, delicious."""
# gather ingredients
squash = "🎃"
spices = ["coriander", "ginger", "black pepper", "allspice"]
veggies = ["much garlic", "onion"]
marinade_bases = ["olive oil", "maple syrup"]
# prepare the marinade
// #todo
'use strict';
// NaN is a strange thing in JavaScript
// if you are not careful about types in your programs ...
// ... NaN will come to get you!
console.log('--- Comparing with ===');
@colevandersWands
colevandersWands / skin-deep.js
Last active March 3, 2022 13:17
similar code, different notional machines
"use strict";
/*
similar looking code with substantially different notional machines
a student will want to study the "cooler" one (DOM, API calls, ...)
without recognizing the extra orders of magnitude in complexity
they may be able to make the code work, but missed nuance below the surface
seen with a strong JS notional machine these programs are very different
*/
@colevandersWands
colevandersWands / README.md
Last active December 1, 2021 15:36
identifying syntax

Identifying

In these exercises you will be given a small program and be asked to identify each piece of syntax with a comment, like this:

// prim SC
'use strict';

// kw id oper prim SC
export const log = (thing) => (console.log(thing), thing);
@colevandersWands
colevandersWands / mirror-quiz.md
Last active November 4, 2021 16:18
testing code tags in a summary

#todo

Mirrorize

Which line can be placed in the blank to make a loop that mirrors the input? There may be more than 1 correct answer!

'use strict';
@colevandersWands
colevandersWands / component.js
Created October 21, 2021 09:18
testing custom events in components
import { addNumberEvent } from './custom-event.js';
/**
* Returns a number input with your initial value set.
*
* @param {number} initialValue - The initial value for this input.
* @returns {HTMLInputElement} - The rendered input element.
* @fires CustomEvent#addNumber
*/
export const numberInputComponent = (initialValue = 0) => {
@colevandersWands
colevandersWands / variable-question.md
Created September 9, 2021 08:52
address specific misconceptions in markdown MCCs
'use strict';

let thing = 'dog';

console.log(thing);

thing = 'cat';
// - I disappear and leave you
// - you didn’t disappear
// - well, i did and than appeared again. the void does not accept me, sir
console.assert(void 'me', 'the void accepts me');
@colevandersWands
colevandersWands / review.md
Created April 16, 2021 07:27
a review file or folder in each module