As I go along with "Concepts, Techniques and Models of Computer Programming by Peter Van Roy and Seif Haridi", I'll be putting my thoughts and solution to the exercises(ones that I'm able to crack :) ) here. Please let me know if any of the code snippets presented in solutions give errors as I might have made a mistake in correctly copying the code or something else.

Sunday, March 22, 2009

Ch8, Ex10

The reason that sum is locking all the cells is that its calculating the whole sum in one big transaction and in the growing phase of this transaction it locks all the cells and keep them all locked unless whole sum is calculated. So, the strategy is to simply break the calculation of full sum into partial sums. Here is the code..