Slide 1

Slide 1 text

Parallelism and Symmetry Alex Tercete @alextercete

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Writing

Slide 5

Slide 5 text

Verb forms

Slide 6

Slide 6 text

Olympic athletes usually like practicing, competing, and to eat ice cream sandwiches. DON'T Alice Underwood @ Grammarly

Slide 7

Slide 7 text

Olympic athletes usually like practicing, competing, and eating ice cream sandwiches. or Olympic athletes usually like to practice, compete, and eat ice cream sandwiches. DO Alice Underwood @ Grammarly

Slide 8

Slide 8 text

Nouns vs. verbs

Slide 9

Slide 9 text

For dinner we like lamb chops and to fry brussel sprouts. DON'T Alice Underwood @ Grammarly

Slide 10

Slide 10 text

For dinner we like lamb chops and brussel sprouts. or For dinner we like to grill lamb chops and fry brussel sprouts. DO Alice Underwood @ Grammarly

Slide 11

Slide 11 text

Noun number

Slide 12

Slide 12 text

Public transit such as buses or a train can help reduce air pollution. DON'T Alice Underwood @ Grammarly

Slide 13

Slide 13 text

Public transit such as buses or trains can help reduce air pollution. DO Alice Underwood @ Grammarly

Slide 14

Slide 14 text

Coding

Slide 15

Slide 15 text

Collections

Slide 16

Slide 16 text

DON'T function getThings(): Thing[] { const things = getFirstHalfOfThings(); things.push(...getSecondHalfOfThings()); return things; }

Slide 17

Slide 17 text

DON'T function getThings(): Thing[] { const things = getFirstHalfOfThings(); const secondHalfOfThings = getSecondHalfOfThings(); things.push(...secondHalfOfThings); return things; }

Slide 18

Slide 18 text

DON'T function getThings(): Thing[] { const things = getFirstHalfOfThings(); const secondHalfOfThings = getSecondHalfOfThings(); return things.concat(secondHalfOfThings); }

Slide 19

Slide 19 text

DO function getThings(): Thing[] { const things: Thing[] = []; things.push(...getFirstHalfOfThings()); things.push(...getSecondHalfOfThings()); return things; }

Slide 20

Slide 20 text

DO function getThings(): Thing[] { const firstHalf = getFirstHalfOfThings(); const secondHalf = getSecondHalfOfThings(); return firstHalf.concat(secondHalf); }

Slide 21

Slide 21 text

DO function getThings(): Thing[] { const firstHalf = getFirstHalfOfThings(); const secondHalf = getSecondHalfOfThings(); return [...firstHalf, ...secondHalf]; }

Slide 22

Slide 22 text

Chains

Slide 23

Slide 23 text

DON'T function getStuffName(): Promise { return fetchThing().then(convertToStuff) .then(stuff => stuff.name); }

Slide 24

Slide 24 text

DO function getStuffName(): Promise { return fetchThing() .then(convertToStuff) .then(stuff => stuff.name); }

Slide 25

Slide 25 text

DO function getStuffName(): Promise { return fetchThing() .then(thing => convertToStuff(thing)) .then(stuff => stuff.name); }

Slide 26

Slide 26 text

DO function getStuffName(): Promise { return fetchThing() .then(thing => convertToStuff(thing)) .then(stuff => getName(stuff)); }

Slide 27

Slide 27 text

DO function getStuffName(): Promise { return fetchThing() .then(convertToStuff) .then(getName); }

Slide 28

Slide 28 text

Exports

Slide 29

Slide 29 text

const thing = createThing(); export default thing;

Slide 30

Slide 30 text

DON'T const thing = createThing(); export const thingWithSomething = createThingWithSomething(); export default thing;

Slide 31

Slide 31 text

DON'T export default const thing = createThing(); // Doesn't compile export const thingWithSomething = createThingWithSomething();

Slide 32

Slide 32 text

DO const thing = createThing(); const thingWithSomething = createThingWithSomething(); export default thing; export { thingWithSomething };

Slide 33

Slide 33 text

DO const thing = createThing(); const thingWithSomething = createThingWithSomething(); export { thing as default, thingWithSomething };

Slide 34

Slide 34 text

Thomas Hawk