Skip to content

Commit

Permalink
refactor(ONNX): enforces opLocation naming convention
Browse files Browse the repository at this point in the history
1. `loc`: when searching "loc" across the codebase, this appears in contexts where it could mean "location", "locale", etc. Avoiding abbreviations reduces this ambiguity.
2. `location`: Now the question to answer is "The location of what, exactly?" without having to ping a colleague or scrub the codebase. We see `auto location = binder.getLoc()`, so the (incorrect) inference is "ah the location of the binder, I guess", so we use that to modify the word "location"
3. `binderLocation`: Turns out that "binder" is short for "opBinder", meaning this is actually "location of _op_". So, we switch the "modifying noun"
4. `opLocation`: bakes in the understanding that probably required preceding engineers (like me) to spend theirs and others time clarifying. Adding 7 characters to "loc" avoids time to grok, avoids unnecessary roping in of other engineers, and makes it easier to onboard other engineers. Overall, this is easier to build upon from an organizational standpoint.

This particular name did not exist in the codebase prior to this commit, so reverting this change is trivially easy no matter how far back in time in was added!
  • Loading branch information
bjacobgordon committed Jan 20, 2025
1 parent 9d80e4b commit a78ce26
Show file tree
Hide file tree
Showing 4 changed files with 538 additions and 493 deletions.
Loading

0 comments on commit a78ce26

Please sign in to comment.