berrange,
@berrange@hachyderm.io avatar

API design rule:

consider an API param (or struct field) for a quantity of something. Please don't just call it 'quantity' or 'something_quantity'.

Always include the units in the name.

eg for data 'size_bytes', 'size_kb', 'size_mb', NEVER just 'size'; for time 'duration_secs', 'duration_ms', 'duration_ns', NEVER just 'duration'.

Don't make developers re-visit the API docs to understand it. Including units in the name makes semantics self-documenting when reading code and avoids many bugs

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • osvaldo12
  • magazineikmin
  • tacticalgear
  • rosin
  • thenastyranch
  • Youngstown
  • Durango
  • slotface
  • everett
  • kavyap
  • InstantRegret
  • khanakhh
  • provamag3
  • mdbf
  • ethstaker
  • cisconetworking
  • tester
  • Leos
  • cubers
  • GTA5RPClips
  • megavids
  • normalnudes
  • anitta
  • modclub
  • JUstTest
  • lostlight
  • All magazines