TDD Exploration for the Project, Take 2
Agile Software Development
Exploratory Programming on the Project
I posted my
for the project, of the sort story you were asked to write
Jason Fried's article.
We discussed some of the project requirements we learned more
about yesterday, when we implemented a simple story or two
about the user recording transactions in the general
Then we explored the system from the other end, where it
produces summary reports. We paired up, took a simple
story, wrote a test, and wrote code. The story:
The user requests a balance sheet as of today.
We assumed a small set of accounts, one or two assets and
one or two liabilities. Some pairs moved on to a second
The user requests an income statement for the current period.
Again, by writing code to solve even one test, the team
learned some new things about the system to be built.
- These reports are about accounts, not transactions.
- Who knows whether an account is an asset or liability?
The account objects may well need to in the future, but
for these stories the code needs only receive a
collection of assets and a collection of liabilities.
- Net worth will be a standing account in the ledger. It
is part of the equilibrium of double-entry accounting,
part of its security mechanism. That is different from
net income as reported on the income statement, which
exists as an account only ephemerally, as part of the
year-end closing process.
- If we had a collection of accounts, we could
use Ruby's iterators to process them. This is the first
hint that we might later want a ledger object.
- Balance sheets and income statements share a common
structure and even common arithmetic. The simplest
thing that could possibly work right now might be
a single, configurable method.
Some students also began to think about how they will end
up representing money. Our exploratory code thus far has
gotten by with strings, but as numbers... they are not
floating point numbers!
- Homework. None today.
- Reading. Version control is important, so I'd
like you to read about another style of VCS, centralized
version control. We will study Subversion (SVN).
- Programming. And keep practicing Ruby. Do NOT
work on the accounting system code form today or yesterday.
Try writing some stuff just for yourself.
Eugene Wallingford .....
May 19, 2010