Skip to content

Instantly share code, notes, and snippets.

@dfkaye

dfkaye/ideas.md Secret

Last active May 15, 2022 23:41
Show Gist options
  • Select an option

  • Save dfkaye/9f61ac358b3ada5bf68f74a57729bfc8 to your computer and use it in GitHub Desktop.

Select an option

Save dfkaye/9f61ac358b3ada5bf68f74a57729bfc8 to your computer and use it in GitHub Desktop.

20 April 2022

more post ideas

  • embedded workers from blob object URLs - create worker scripts dynamically from blob urls to manage actions off the main thread
  • canceling async processes - workers w/URL.revokeObjectURL, await response pattern, etc.
  • pseudocode notation for algorithms - klepmann post, behavioral programming paper
  • observables vs. streams
  • observable es6 proposal test suite - like String#test
  • CSS grid properties for Tab traversal - from sam calculator blog demo
  • prototype pollution - sources, detection, defenses ( in progress... )
  • validating HTML vs asserting the DOM (or enforcing by CSS, i.e., no selector matches)
  • state transition tuples
    • Using given-when-then or a sequential state transition ( see https://github.com/atomicojs/store ) testing or management function to check specs or models; continued from posts.md ( see https://gist.github.com/dfkaye/01537c58e425ef3480f2844eb4a65580 ).
    • A unit test is a single check of a model's state change.
    • Model checking means generating multiple inputs for multiple changes, potentially.
    • Multiple inputs can be generated using generator functions.
    • Start with initial value, iterate over a range, assert correctness or expected failures, and invariants.
    • At an error, ask the generator to return the range of inputs so far, plus the last problematic input, using generator.next("status" or "complete").
    • We could even pass the unit to the generator and let the generator do the work until it fails in a try-catch and return the range of passing inputs and the failing input.
    • Instead of generating everything incrementally, proceed with fibonacci or fractal input, square roots, basically leaps until a failure occurs, then restrict the range between the last passing input and the failing input.
    • Mocha + BDD use describe(name, function) semantics. A model checker should instead use the function repeatedly against the generator's proposals (SAM pattern sneaking in) and iterate at smaller steps. So instead of describe() we have check(name, function) where function receives the different inputs from the generator and asserts the unit under test returns or transitions safely, fairly, or eventually, or all three (TLA+ sneaking in).
    • Re-visit Matt Baker's reactive.js ( https://github.com/mattbaker/reactive.js ), particularly the README section on cells and spreadsheets; specifically, a value is an expression dependent on one or more values at any point in time.
  • Logicless templates
  • console.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment