3 ms·
> I tend to start by writing a few basic usage examples and documenting it This is exactly what I do. Before I even think about the internals of a function, mo
by hliyan 6y ago
> I tend to start by writing a few basic usage examples and documenting it
This is exactly what I do. Before I even think about the internals of a function, module or endpoint, I imagine that it exists in the ideal form that I or any other programmer would want, and then write a few usage examples. Then I pick the best one and implement it.
- sethammons 6y agoDocumentation driven design. I nearly always start at the exposed API and try to make it make sense, then design code and models that enable that interface. The API is your product.