writing java doc, validation, test when coding or after coding. what's better
somebody told me I should writing java doc,parameter validation,testing when coding. But in fact, I like to write them after all basic code completed. So my question is what's better?

writing java doc, validation, test when coding or after coding. what's better
===

somebody told me I should writing java doc,parameter validation,testing when coding. But in fact, I like to write them after all basic code completed. So my question is what's better?
