YouTube video: https://www.youtube.com/watch?v=r-8isv_TnVA
Stackblitz: https://stackblitz.com/edit/js-mbehz9?file=index.js
import { useCallback, useMemo } from 'react'; | |
import generateHash from './generateHash.js'; | |
export type Identify = (name: string) => string; | |
function useIdentify(): Identify { | |
const ids = useMemo(() => new Map<string, string>(), []); | |
return useCallback((name) => { | |
if (!ids.has(name)) { |
YouTube video: https://www.youtube.com/watch?v=r-8isv_TnVA
Stackblitz: https://stackblitz.com/edit/js-mbehz9?file=index.js
I made a list of 20 things I might want out of a monorepo tool for a Design System to use as a basis for comparing some of the options including Lerna, Northbrook, and Rush.
Port of this python code in Javascript.
LSH from Wikipedia:
Locality-sensitive hashing (LSH) reduces the dimensionality of high-dimensional data. LSH hashes input items so that similar items map to the same “buckets” with high probability (the number of buckets being much smaller than the universe of possible input items). LSH differs from conventional and cryptographic hash functions because it aims to maximize the probability of a “collision” for similar items. Locality-sensitive hashing has much in common with data clustering and nearest neighbor search.
More explanation:
(function() { | |
var snowflakes = [], | |
moveAngle = 0, | |
animationInterval; | |
/** | |
* Generates a random number between the min and max (inclusive). | |
* @method getRandomNumber | |
* @param {Number} min | |
* @param {Number} max |
Once upon a time…
I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).
I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).
It seems inevitable to throw Domain Driven Design (DDD) in to the mix.