LIST

Journal: Object Calisthenics + TDD + Advent of Code - day 4

journal for Practice_ Object Calisthenics + TDD + Advent of Code Things that are easy to procrastinate: tests as documentation package structure of code package structure of tests (I keep nesting fixtures in one test class) independent test fixtures Do more of: tests as documentation as early as possible tell a story test independent fixtures Parsing as a separate fixture (and code more modular) Wrap objects at Red-design Try next:...

January 28, 2021

Journal: Object Calisthenics + TDD + Advent of Code - day 2

For Practice_ Object Calisthenics + TDD + Advent of Code I’m falling into this pattern: Red Green asap (fake it) Refactor (until you make it) Refactor Express intention Extract method, giving it a name that tells the intention, but the implementation looks more like a green asap Change implementation to match expressed intention Object Calisthenics rules often broken in the previous refactors: No properties Wrap all strings and primitives First Class Collections So before I did as little ’express intention’ as possible....

December 30, 2020

Retro: Object Calisthenics + TDD + Advent of Code - day 2

retro for Practice_ Object Calisthenics + TDD + Advent of Code Small retro (end of part 1) How did it feel? This was hard to answer in the moment, because I was feeling really lethargic, so everything felt that way What went well & should do more of? Even though I was feeling lethargic, the flow was still there Using specific lombok annotations (@AllArgsConstructor and sometimes @EqualsAndHashCode), instead of catch-all (@Value) use smaller scope tests, so they fail for only 1 reason Big retro (end of part 2) Were my expectations correct?...

December 30, 2020

Journal: Object Calisthenics + TDD + Advent of Code - day 1

journal for Practice_ Object Calisthenics + TDD + Advent of Code Remark about (5) One Dot Per Line Constructors should count as a dot, as if they were written like this: ExpensePair.new(...) final ExpensePair firstPair = new ExpensePair(expenses.get(0), expenses.get(1)); final Expense firstExpense = expenses.get(0); final ExpensePair firstPair = new ExpensePair(firstExpense, expenses.get(1)); final Expense firstExpense = expenses.get(0); final Expense second = expenses.get(1); final ExpensePair firstPair = new ExpensePair(firstExpense, second); Remark about (5) One Dot Per Line works well with 7) Keep All Entities Small this forces me to extract variables but that quickly bumps into 7) Keep All Entities Small (5 lines/method) forcing an extract method or forcing a better design...

December 24, 2020

Model: Object Calisthenics

Only One Level Of Indentation Per Method Don’t Use The ELSE Keyword Wrap All Primitives And Strings First Class Collections One Dot Per Line Don’t Abbreviate Keep All Entities Small 10 files/package 50 lines/class 5 lines/method 2 arguments/method No Classes With More Than Two Instance Variables No Getters/Setters/Properties sources Article_ Object Calisthenics - William Durand Book_ Agile Technical Practices Distilled - Pedro, Marco, Alessandro

December 24, 2020

Retro: Object Calisthenics + TDD + Advent of Code - day 1

retro for Practice_ Object Calisthenics + TDD + Advent of Code Small retro (end of part 1) How did it feel? at first, slow with having to check the rules at first, irritating because the constraints chafing me soon, surprisingly good: I could feel the constraints pushing me towards better design What went well & should do more of? ‘remove duplication’ to draw out functionality without having to triangulate, feels so good!...

December 24, 2020

Practice: Object Calisthenics + TDD + Advent of Code

Goal Practice while doing advent of code exercises. Object Calisthenics TDD refactoring What is Object Calisthenics**?** Model_ Object Calisthenics Why Object Calisthenics**?** Code written in this style, should be easier to change easier to understand easier to test easier to reuse This should cause code to be adaptable / agile / maintainable What is TDD Red: write a failing test Green: in the quickest way possible Refactor: cleanup code cleanup tests Refactor ideas...

December 18, 2020