Re:Be professional, do TDD
by jimbokun on Wednesday October 27, 2010 @09:25AM
(#1838464)
"If you're doing little comp-sci type things on the server then sure you can do TDD."
Are you implying that your web site does not have any "little comp-sci type things on the server" aspects?
"Add an opacity slider for shapes"
This seems like the kind of thing that probably does have a little comp-sci part to it. Do you have an abstraction for shapes? Maybe a unit test for the API underlying the slider, that validates that all selected shapes now have the opacity value passed from the slider?
Maybe that doesn't fit the design of your code, but I strongly suspect there is some unit testable part of that task. The point being, unit testable things should have unit tests, and most tasks might have some unit testable part.
Are you implying that your web site does not have any "little comp-sci type things on the server" aspects?
"Add an opacity slider for shapes"
This seems like the kind of thing that probably does have a little comp-sci part to it. Do you have an abstraction for shapes? Maybe a unit test for the API underlying the slider, that validates that all selected shapes now have the opacity value passed from the slider?
Maybe that doesn't fit the design of your code, but I strongly suspect there is some unit testable part of that task. The point being, unit testable things should have unit tests, and most tasks might have some unit testable part.