CS133-lecture-20210307

Make your code suck less #

image_2021-03-07-10-40-55 image_2021-03-07-10-41-22 image_2021-03-07-10-42-33 image_2021-03-07-10-43-05 image_2021-03-07-10-43-28 image_2021-03-07-10-43-53

12. Schedule time to lower technical debt #

image_2021-03-07-10-43-59 image_2021-03-07-10-44-31 image_2021-03-07-10-46-46 image_2021-03-07-10-47-24 image_2021-03-07-10-47-39 image_2021-03-07-10-47-50

11. Favor high cohesion #

image_2021-03-07-10-50-53 image_2021-03-07-10-51-32 image_2021-03-07-10-52-01

10. Favor loosing coupling #

image_2021-03-07-10-52-35 image_2021-03-07-10-52-44 image_2021-03-07-10-52-53 image_2021-03-07-10-53-46 image_2021-03-07-10-54-29

9. Program with intention #

image_2021-03-07-10-55-24 image_2021-03-07-10-55-57 image_2021-03-07-10-56-24 image_2021-03-07-10-57-48

8. Avoid primitive obsession #

image_2021-03-07-10-58-03 image_2021-03-07-10-59-08 image_2021-03-07-10-59-38 image_2021-03-07-10-59-46 image_2021-03-07-11-00-13 image_2021-03-07-11-01-16 image_2021-03-07-11-01-26 image_2021-03-07-11-01-47 image_2021-03-07-11-02-39 image_2021-03-07-11-03-53 image_2021-03-07-11-04-33 image_2021-03-07-11-04-43 image_2021-03-07-11-04-55 image_2021-03-07-11-05-18

7. Prefer clear code over clever code #

image_2021-03-07-11-07-28 image_2021-03-07-11-08-58 image_2021-03-07-11-09-25 image_2021-03-07-11-09-41 image_2021-03-07-11-09-55

6. Apply Zinsser’s principle on writing #

image_2021-03-07-11-11-03 image_2021-03-07-11-11-07 image_2021-03-07-11-11-37

5. Comment why, not what #

image_2021-03-07-11-14-21 image_2021-03-07-11-14-47 image_2021-03-07-11-15-01 image_2021-03-07-11-15-12 image_2021-03-07-11-15-30 image_2021-03-07-11-17-03 image_2021-03-07-11-18-03 image_2021-03-07-11-18-23 image_2021-03-07-11-18-41

4. Avoid long methods – Apply SLAP #

image_2021-03-07-11-19-06 image_2021-03-07-11-19-13 image_2021-03-07-11-20-07 image_2021-03-07-11-20-26

3. Give good meaningful names #

image_2021-03-07-11-22-04 image_2021-03-07-11-25-35 image_2021-03-07-11-26-50 image_2021-03-07-11-27-20 image_2021-03-07-11-27-52

2. Do tactical code reviews #

image_2021-03-07-11-29-43

Never say whats wrong, always say what can be better.

image_2021-03-07-11-33-54 image_2021-03-07-11-34-19

1. Reduce state and state mutation #

image_2021-03-07-11-34-33

Start with methods and the fields (and getters/setters) will fall into place.

image_2021-03-07-11-35-52 image_2021-03-07-11-37-13 image_2021-03-07-11-38-16

Recap #

image_2021-03-07-11-38-54 image_2021-03-07-11-42-42