Company on-site, June 2022
Steve Olsen
who would????
Lazy
No rules
No team
No time
Get 'er done!
Pew pew pew!
"
"
of the cowboy code calamity
Person 1
Person 2
Person 3
Are you up to the challenge?
App: "Funnierz JOKES"
code things
(verbs, nouns, prefixes, positive bools, etc.)
eg. *.component.tsx == redundant info!
eg. const user; const userData; const userDetails
eg. onX; handleX; enableX; setX; getX; findX;
eg. hasX; isX; isNotX; filteredX; rawX; scrubbedX;
filesystem things
(files, directories)
parent namespaces are assumed by children
kabab or camelcase -- pick one
vocab -- pick one name per concept / entity
Q: How many lines (or statement) should a function have?
import type { Options } from "./types"
import target from "./text-manipulation"
// function signature: (jokes: string[], opts: Options)
describe("text-manipulation", () => {
let fixture: string[]
let opts: Options
beforeEach(() => {
fixture = ["Hi there.", "THIS IS NOT a drill!"]
opts = {}
})
it("should add exclamations", () => {})
it("should add lols", () => {})
it("should make all caps", () => {})
})
is served
OPTIMIZED (<5%)
MAINTAINABLE (>90%)
WORKING (<5%)
refactor, test
heavy test
(5 minute examples, skip over)
"
"
Don't be that cowboy!
Improve at your craft.
Questions?
Don't settle; make it clean.