My Technical Notes

Thursday, 6 July 2017

Programming Verbs: Populate

The verb `Populate` means:

A method `PopulateX()` populates an object that is named `X` with data appropriate for `X`. The underlying data source is understood from the method's context. Generally these methods do not return anything, and do not accept parameters.
For example, if you had a method:

public void PopulateStudentGrid() {
    // ...

The `StudentGrid` would be populated with data from a source that is understood from the context.

It is necessary to give such a method a documentation comment because those unfamiliar with the code will not know what data you are populating `X` with or where it comes from.

No comments: