Skip to content

Commit 7904902

Browse files
committed
Separate sentences on the generalize issues.
1 parent a7d781f commit 7904902

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: DEVELOPMENT.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ When working on a feature, the order you work on things matter. Think of a featu
6666
### Should I make my code more general?
6767
Sometimes we consider adding more flexibility to our current code in order to make future changes easier or to make a piece of code usable for some slightly different scenarios. This process has a couple issues:
6868

69-
- **The extra code you write may not be used at all**
70-
The other scenarios where the code piece will be needed may never come, but you may have spent 4 more hours trying to make your code work for all future scenarios that will not exist.
69+
- **The extra code you write may not be used at all.**
70+
The other scenarios where the code piece will be needed may never come, but you may have spent 4 more hours trying to make your code work for all future scenarios that will not exist.
7171

72-
- **You may lose a lot more time on a task that shouldnt normally take that long**
72+
- **You may lose a lot more time on a task that shouldnt normally take that long.**
7373
Yeah, of course this is ususally answered with the "I'm saving a lot of time for later" response, but you never know the actual amount of time you're saving for the future. If you need to do something ASAP, dont waste time today to save you some unknown time tomorrow.
7474

75-
- **You may not be aware of what things need to be common between scenarios**
75+
- **You may not be aware of what things need to be common between scenarios.**
7676
Writing code for one scenario may not give you enough information about the common things among all the future scenarios. Usually the magic number of cases is 3, after you copy and modify a piece of code for the third time you should know in that moment what needs to be in all scenarios and extract that in a class or any other extensible code statement.
7777

7878
#### When to generalize:

0 commit comments

Comments
 (0)