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

Add CamelCase as a filename best practice #775

Open
rmpeery opened this Issue May 1, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@rmpeery

rmpeery commented May 1, 2018

Within the module https://swcarpentry.github.io/shell-novice/03-create/ under the section "Good names for files and directories" adding information about what CamelCase is might be good for users to see as a concept for naming.

@rgaiacs

This comment has been minimized.

Collaborator

rgaiacs commented May 2, 2018

Thanks for the suggestion.

CamelCase is annoying and I don't think it should be listed under the "Good names for files and directories". Using - is the most popular way to avoid white spaces in names of files and directories except that you can't use it for Python (and I think for R) scripts because - is a "special" character and the parser will read

import foo-bar

as foo minus bar instead of foo-bar.

@gcapes

This comment has been minimized.

Contributor

gcapes commented May 2, 2018

Annoying is subjective. CamelCase looks better than python_underscores_are_harder_to_type variable names.

@jttkim

This comment has been minimized.

Contributor

jttkim commented May 2, 2018

There's been a similar discussion somewhat recently here: #743 (comment)

There sure is a lot of subjectivity in "annoying", but sometimes that can be traced to more intersubjective or objective criteria. One of these is consistentcy, mentioned in the discussion I reference above. As an illustration, if I had files cool_cygnet.txt, grumpy_gosling.txt etc., I'd find UglyDuckling.txt more annoying than in some other contexts.

Generally, I think that in the shell-novice lesson, discussion of file naming practices should be limited to things that will help novices by leading them to use file names so the rest of the lesson and their initial experience goes a bit more smoothly. Many further practices and considerations of file naming make a lot of sense, but are much more easy to discuss and appreciate once all have made some initial experience of their own.

@rmpeery

This comment has been minimized.

rmpeery commented May 2, 2018

My apologies for missing the linked discussion. I see the point of having them start using dashes and trying to make it as simple as possible, but most users who are learning the shell will not be bound to that environment forever and dashes are problematic for the other common tools (as pointed out for python and R). I also value the point (and realize) that beginners need a place to start but a complaint I hear from students a lot when teaching foundations in any field is that we say "this is the way" then they learn more and we say "actually this is the way and what you learned isn't always true". Balancing information overload and good starting practices is tough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment