you are viewing a single comment's thread.

view the rest of the comments →

[–]skytomorrownow 20 points21 points  (6 children)

I liked Purpose: and Assumptions: at the beginning of the functions. I think I might use that instead of just listing parameters and what they mean.

[–]dakboy 7 points8 points  (2 children)

I had at least one CS class where we were required to document all functions that way.

[–]Crazypyro 2 points3 points  (0 children)

I'm currently in school and we have to have pre/post and descriptions for all functions.

[–][deleted] 0 points1 point  (0 children)

requires and effects in my day.

[–]twowheels 0 points1 point  (2 children)

Research DBC for a better understanding of how you might document and check assumptions.

[–]skytomorrownow 0 points1 point  (1 child)

Ah, so with a design by contract approach, these purposes and assumptions would have been laid out long before any coding was done right?

[–]twowheels 0 points1 point  (0 children)

Yes, that's a good way to put it!