- Manage app stability in Production
- this means as few surprises as possible for the users
- Improve documentation around changes being made
- this is so that in the future it's easier to track why changes were made
- Make it easier to test changes as they're being integrated and deployed
- Utilize available tools as fully as possible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Microwave | |
Power Off | |
power switch -> Power On | |
Power On | |
Door Open | |
close -> Door Closed | |
Door Closed | |
Cooking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Microwave | |
Power Off | |
power switch -> Power On | |
Power On | |
Door Open | |
close -> Door Closed | |
Door Closed | |
Cooking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const typeOf = ob => ob.toString() | |
const forEach = (fn, l) => typeOf(l) === '[object Object]' | |
? forEach(k => fn(l[k], k), Object.keys(l)) | |
: Array.from(l).forEach(fn) | |
export const patch = (elm, node) => { | |
if(elm === node) return elm | |
if(typeOf(elm) === '[object Text]') { | |
elm.textContent = node.textContent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type EventsWithFilters = Record< | |
string, | |
{isSelected: boolean; filters: Filters} | |
> | null | |
type Filters = Record<string, {isSelected: boolean; values: Values}> | null | |
type Values = Record<string, boolean> | null | |
type SelectedFilters = { | |
event: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface superType { | |
a: string, | |
b: number, | |
} | |
interface subType extends superType { | |
c: string | number | |
} | |
declare const xs: Array<superType | null> | Array<subType> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type key = string | |
type Records = Record<key, boolean> | |
const records: Records = { | |
foo: false, | |
bar: false | |
} | |
// key -> ((A -> B) -> Records -> Records) | |
const setter = R.converge( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const traceOutput = (fn: any, message: string = '') => ( | |
...args: unknown[] | |
) => { | |
const result = fn(...args) | |
console.log(typeof fn) | |
console.log(message, result) | |
return result | |
} |
NewerOlder