- Laws:
- Dont write any PROD code until you have a failing unit test
- Stop writing the test as soon as it fails (including compiling errors)
- Stop writing PROD code as soon as the test passes
- Cycle:
- Red
- Green
- Refactor
- Write degenerate tests first
- Differences beetween libraries and frameworks
- Application calls subroutines libraries
- Framework calls application
- Component: independant deployable library
- When designing components is important to identify actors in order to split responsibilities
- When describing behavior modules avoid saying low level words, instead use abstractions
- Good episode in how to design modules
- Rigidity: difficult to make changes (small change causes a cascade of subsequent changes)
- Fragility: a single change causes breaks in many places
- Inseparability: no reusability
- Opacity: code is hard to understand
- Make sure you communicate intent
- Avoid disinformation
- Use pronounceable names
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
// The methods of Appearance.StatusBar can be used to hide and show the status bar on iOS. | |
// As mention in other places, this is more like hack than a solution. I personally don't like it. | |
// However if on your application you are making use of navigationBar or similar components, | |
// hidding the statusBar on the right way (overriding `prefersStatusBarHidden`) will mess with your constraints. | |
// For more details please refer to this answer and its comments: https://stackoverflow.com/a/44066303/8483739 | |
struct Appearance { | |
private init() {} | |
} |
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
# Listing every single rule as v0.38.2 with the purpose of linting following `incremental code stylist`. | |
disabled_rules: # rules enabled by default, comment to enable | |
- block_based_kvo | |
- class_delegate_protocol | |
- closing_brace | |
- closure_parameter_position | |
- colon | |
- comma | |
- compiler_protocol_init |