Dear all,
I’ve written documentation for all new Packet classes and that paid back! By making me think again what the functions are supposed to do and comparing it with what they actually do, I could figure out how to improve the current implementation in Generics::Packets and helped me find a bug in BitTorrent::Packets::Packet. Next would be to write the unit tests for each of the packet classes. According to test driven development, tests are the first thing one should write but I failed to do so this time. I guess I was too eager to do the implementation ;-). I’ll try to write the tests for BinaryWriter first and then implement it though. I need BinaryWriter to order to be able to test completely the packet classes.
I think we need to start thinking more about pre and post conditions – document them and assert them all.
The attached patch contains only the changes since my last published patch. If you want to keep track of my latest work on the BitTorrent packets, branch from http://bzr.calitko.org/developers/peter/calitko-BitTorrent . The revision which contains the docs is 70.
Any feedback is welcome!
Regards,
Peter
