Comment by cyberax
6 days ago
One of my personal rules is to ALWAYS suffix the variables and fields with unit names:
`timeout_ms` or `rate_kbps`, NOT `timeout` or `rate`.
Unless the variable type already constrains it (e.g. Duration in Go).
6 days ago
One of my personal rules is to ALWAYS suffix the variables and fields with unit names:
`timeout_ms` or `rate_kbps`, NOT `timeout` or `rate`.
Unless the variable type already constrains it (e.g. Duration in Go).
Until someone comes along and changes it without updating the name, or the value comes from a remote service and they change without you changing your name… etc.
This also helps downstream a lot.