Aristotle Pagaltzis wrote on 2/23/08 7:02 AM:
* Mark Knoop <suppressed> [2008-02-21 08:20]:I have also taken note of the point about creating testable classes. As an OO newbie much of my time recently has been spent deliberating over how to design my classes, what to encapsulate where, what return values to use for methods etc. and I suspect that developing with testing in mind will actually help rationalize these matters.Very helpful in this regard is doing test-first development. It takes a bit of time to get the hang of it, because it requires some imagination: you don’t normally think in terms of how a non-existent API would look like. The benefit is that it forces you to write code that *uses* an interface before you write the code that *implements* it; this way, it drives you toward designing your interfaces from the perspective of a user rather than from the perspective of the implementer. As a result, they’ll tend to be much more usable, regardless of how deeply you understand what makes an interface better and how much of a conscious effort you make to apply your understanding.
very good advice. I've been trying to practice that approach the last few years. I actually start with the POD first, since that forces me to think entirely from the user's perspective, and then make my SYNOSIS my first test.
-- Peter Karman . http://peknet.com/ . suppressed ##### CGI::Application community mailing list ################ ## ## ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ## ## ## ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ## ## ################################################################
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.