Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve names #5

Open
clbarnes opened this issue Jan 26, 2023 · 3 comments
Open

Improve names #5

clbarnes opened this issue Jan 26, 2023 · 3 comments

Comments

@clbarnes
Copy link
Owner

clbarnes commented Jan 26, 2023

The LabView internal docs include units and more explicit names for the fields, which would be helpful to include. Kindly provided for v9 in this comment: JaneliaSciComp/jeiss_fibsem_labview_control#11 (comment) (note this does have some errors, e.g. file length is an int64 (signed, for some reason), not a float64).

Some design goals for names:

  • explicitness over terseness
    • avoid initialisations unless they're repeated and somewhat obvious to anyone who touches FIBSEM data, e.g. FIB and SEM
  • include units
  • use snake_case (controversial)
    • it is trivial to convert snake_case strings to camelCase/ UpperCamel, for languages which require it; not possible to convert the other way while persisting meaningful capitalisation (e.g. for units and initialisms)
    • do not add unnecessary capitalisation, i.e.
  • use a character set which can easily be used as variable names in most common programming languages
    • probably avoid spaces (although these could easily be transformed to either snake or camel as necessary)
    • something matching regex ^\w[\w\d_]*$ fits most programming languages
@clbarnes
Copy link
Owner Author

Notably, MATLAB style guidelines do not recommend UpperCamel: https://sites.google.com/site/matlabstyleguidelines/home?authuser=0

@clbarnes
Copy link
Owner Author

@clbarnes
Copy link
Owner Author

Seeing more implementations in the wild with names further based on the MATLAB is making me lean away from this; I think the horse has bolted. I believe the best we could do would be to include a new column in the spec TSVs which describe fields and their units.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant