In programming major applications such as finance there is a need to ensure within the transactions and the database operations that mistakes do not occur.
The classic example is a transfer between two accounts:
def transfer(from, to, amount)It is vital that the above method (example provided by Tate and Hibbs) does not fail after the debit. In Rails the
transactionmethod help to prevent 'digital accidents' as follows:
def transfer(from, to, amount)
transactionis itself a method built into Rail's Active Record that helps to maintain the integrity of transactions. Which brings me to 'care'. ...
There are several blog posts here since you reach a stage in your career when the hard fought lessons of yesteryear have to be faced again but this time like after dinner wind.
There are many possible
care transactionsthat arise.
Many have a specific context and frequently these are conjoined:
- relationships - trust
- responsibility - transfer
- care environment
- record (paper, electronic)
care transactionconsider these:
def transfer(from, to, care_plan)Wherever, whenever, whatever and whoever your transactions involve, take care of them and remember in health and social care (esp.) outcomes add up.
def transfer(from, to, day_care)
Don't forget to look after the however: the information, the knowledge, the promises ....
def transfer(from, to, promise_plan_of_action)Reference: Bruce Tate, Curt Hibbs (2006) Ruby on Rails: Up and Running, O'Reilly, p.35.