Monday, October 12, 2009

Refactoring Ruby

I refactored some Ruby code this afternoon. It went faster than I expected. The changes were in the "Excel sheet creator" programs; I changed some modules to classes. (Ruby allows for modules and classes. I had chosen the module approach but really had designed the code for classes, so the change made things simpler and more obvious.) I used my test cases to verify that my programs still work as expected. (They did not immediately after the change, due to syntax errors.) It felt good having the tests in place to verify my work.


No comments:

Post a Comment