Skip to content

Commit 1a33542

Browse files
MichaelRWolf4dsherwoodnitsanavni
committed
. d New retro notes (including CyberDojo link and files)
Co-Authored-By: 4dsherwood <4dsherwood@users.noreply.github.com> Co-Authored-By: Nitsan Avni <nitsanav@gmail.com>
1 parent 6021b91 commit 1a33542

File tree

4 files changed

+213
-0
lines changed

4 files changed

+213
-0
lines changed

session-notes/2024-10-17/Prompt.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
### role
2+
you are an expert python programmer,
3+
assisting me to create a library called Financial Transactions
4+
and a collection called financial transaction log
5+
6+
we will create tests first,
7+
then we will create code that passes those tests
8+
9+
## stack
10+
11+
python
12+
pytest
13+
14+
### requirements
15+
16+
## transaction class
17+
18+
'Transaction' Class HAS-A
19+
- Date
20+
- Payee
21+
- Amount
22+
- Institution
23+
24+
# Task
25+
26+
## Step 1 - Done
27+
28+
Only do this: Create a test that describes `Transaction`
29+
**Only create the test!!**
30+
we can create a transaction and verify it has the correct values in each field
31+
Do not create the production code
32+
33+
Done, with the following error:
34+
```
35+
# Create a Transaction object (to be implemented)
36+
> transaction = Transaction(transaction_date, payee, amount, institution)
37+
E NameError: name 'Transaction' is not defined
38+
```
39+
40+
## Step 2 - Done
41+
42+
Now make the test pass in the simplest way
43+
Current error:
44+
```
45+
# Verify the values
46+
> assert transaction.date == transaction_date
47+
E AttributeError: 'Transaction' object has no attribute 'date'
48+
```
49+
50+
## TODO: Step 3 - more tests
51+
52+
**Just** add the following tests please:
53+
Given a bad date - throw an exception
54+
Given a bad amount (zero, non number, more?) - same
55+
56+
Just write the new tests. Don't rewrite the whole code.
57+
58+
## For later:
59+
60+
empty payee - same
61+
empty institution
62+
63+
# Example Data
64+
65+
Date: 2024-10-17
66+
Payee: Acme Inc.
67+
Amount: 200.00$
68+
Institution: TrueRocks
69+
70+
## here is the current code
71+
```
72+
import pytest
73+
from datetime import date
74+
75+
76+
class Transaction:
77+
def __init__(self, transaction_date, payee, amount, institution):
78+
self.date = transaction_date # Update to match the test
79+
self.payee = payee
80+
self.amount = amount
81+
self.institution = institution
82+
83+
84+
def test_transaction_creation():
85+
# Example data
86+
transaction_date = date(2024, 10, 17)
87+
payee = "Acme Inc."
88+
amount = 200.00
89+
institution = "TrueRocks"
90+
91+
# Create a Transaction object
92+
transaction = Transaction(transaction_date, payee, amount, institution)
93+
94+
# Verify the values
95+
assert transaction.date == transaction_date
96+
assert transaction.payee == payee
97+
assert transaction.amount == amount
98+
assert transaction.institution == institution
99+
```
100+

session-notes/2024-10-17/retro.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Retro
2+
3+
Chat workflow
4+
5+
Michael
6+
7+
- a great exercise
8+
- distinguishing between two things we're editing:
9+
- spec / prompt
10+
- the markdown is the source, the chat is the code generator - like source and compiler
11+
- we're now meat robots for the artificial intellignce,
12+
we should automate ourselves out of this loop
13+
- full spec vs. incremental spec
14+
15+
Diana
16+
17+
- Enjoyed this practice
18+
- bad connection / bad audio - makes things harder
19+
- workflow worked great: having one dedicated "gpt-runner"
20+
- full round trip of code generation: if you change the code it doesnt come back in...
21+
22+
Nitsan
23+
ROund trip dev
24+
25+
Instead of you having to copy and paste
26+
Reference the file and then tool will insert the updated code into the prompt
27+
28+
I built the tool typist tool
29+
As a pipeline of components
30+
And you can pick and shoes which parts to use
31+
32+
The expand component
33+
34+
It expands files, and it also expands
35+
36+
The
37+
It can use a diff tool
38+
So you can see the changes and MAKE the choice of where to apprive or discard
39+
40+
41+
42+
Team workflow
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import pytest
2+
from datetime import date
3+
4+
5+
class Transaction:
6+
def __init__(self, transaction_date, payee, amount, institution):
7+
self.date = transaction_date # Update to match the test
8+
self.payee = payee
9+
self.amount = amount
10+
self.institution = institution
11+
12+
13+
def test_transaction_creation():
14+
# Example data
15+
transaction_date = date(2024, 10, 17)
16+
payee = "Acme Inc."
17+
amount = 200.00
18+
institution = "TrueRocks"
19+
20+
# Create a Transaction object
21+
transaction = Transaction(transaction_date, payee, amount, institution)
22+
23+
# Verify the values
24+
assert transaction.date == transaction_date
25+
assert transaction.payee == payee
26+
assert transaction.amount == amount
27+
assert transaction.institution == institution
28+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Session Date: 2024-10-17
2+
3+
## Agenda
4+
5+
- [ ] HH:00 **Bond:** Bonding
6+
- [ ] **Facilitator:** Identify who facilitates and record [here](#facilitated-by)
7+
- [ ] **Time-Archivist:** Identify who keeps records times for sections [below](#how-we-spent-our-time-today)
8+
- [ ] **Co-Authors:** Update the [Co-Authors](#co-authors)
9+
- [ ] **Welcome Newcomers:** If we have any newcomers review our [onboarding notes](../docs/onboarding-notes.md)
10+
- [ ] HH:25 **Decide on What to Code** by 25 min after the hour; choose either:
11+
- continue with [last session's WIP](../docs/backlog.md#doing-wip)
12+
- new kata
13+
- well refined backlog item
14+
- new item - "follow the energy" - something else that can be coded by the mob
15+
- [ ] put today's plan into [doing WIP](../docs/backlog.md#doing-wip)
16+
- [ ] HH:30 **Code:** Get to coding by 30 min after the hour
17+
- [ ] setup the mobtime Timer
18+
NOTE: to open mob timer manually find "mobtime" in [this file](../.gitpod.yml)
19+
- [ ] Everyone: turn on mob timer sounds 📣
20+
- [ ] Add "Retro" as the last participant in the timer
21+
- [ ] Append "(Facilitor)" to the name of the participant who is facilitating
22+
- [ ] Code
23+
- [ ] 10m mid-session retro
24+
- [ ] More code
25+
- [ ] 10m retro
26+
- [ ] **Process improvement:** Improving process (e.g. the .md files)
27+
- The process is defined by the [template](./session-notes-YYYY-MM-DD.md)
28+
- [ ] **Backlog refinement**
29+
- [ ] **Retro:** Final longer retro (consider: aim to start 30 min before end time)
30+
- [ ] Done by end of 3 hour (consider: aim to finish 10 min early)
31+
32+
## The work
33+
34+
We worked on incorporating ChatGPT as an equal team member, using Michael's rememberance of how to create `Tranwsaction` class using a test-first approach.
35+
36+
## CyberDojo
37+
38+
Our work was
39+
- in (ephemeral) ChatGPT (on Nitsan's accont)
40+
- in CyberDojo - https://cyber-dojo.org/kata/edit/GnHNk7 we created the following files, which have been added to a subdirectory to the RPG repo
41+
- `test_transaction.py`
42+
- `Prompt.md`
43+
- `retro.md`

0 commit comments

Comments
 (0)