File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,16 @@ def test_buzz_divisor_is_5(fizzbuzz_db):
5353FizzbuzzFn = Callable [[int ], str ]
5454
5555# todo: move this production code to another file later:
56+ ## grab all rules and sort them by divisor and loop through (rather than being hardcoded)
57+ #failing test to surface something
5658def make_fizzbuzz (db ) -> FizzbuzzFn :
5759 def fizzbuzz_fn (number ):
60+ # get the rules from DB sorted by the divisor
61+ rules = db .fizzbuzz_rules .find ().sort ("divisor" , 1 )
62+ for rule in rules :
63+ print (rule )
64+ # loop through each rule and append the word if the input number is divisible by the divisor
65+ #retrun the number as a string
5866 divisor = 5
5967 word = db .fizzbuzz_rules .find_one ({"divisor" : divisor })["word" ]
6068 if number == divisor :
Original file line number Diff line number Diff line change @@ -125,6 +125,23 @@ Nitsan
125125- Liked how we uncovered the bug for the new test, i.e., duplicate test with new rule; resulted in different failure.
126126- Is this a refactoring, or are we adding functionality? Duplication can be refactored. Mainly we are still adding functionality.
127127
128+ ### Retro 5
129+
130+ Diana
131+ - was very important to write the comments and pseudo-code
132+ - just followed it
133+ - did not understand the intention w/o the comments; fine following
134+ - amazing - ChatGPT gave us something too verbose; still learned from it
135+
136+ Joel
137+ - like our progress
138+ - found it easier to state intentions with comments / pseudo-code; capturing on the screen makes it easier to follow
139+ - enjoyed the session!
140+
141+ Nitsan
142+ - Like doing fizzbuzz with db - so many considerations; very interesting to manage everyone's understanding
143+ - Don't have a clear idea how to go about it, but like exploring different directions together
144+
128145### Final Retro
129146
130147### How we spent our time today:
You can’t perform that action at this time.
0 commit comments