Skip to content

Improve file naming with advice from R4DS#243

Merged
hadley merged 3 commits intomainfrom
file-advice
Feb 28, 2025
Merged

Improve file naming with advice from R4DS#243
hadley merged 3 commits intomainfrom
file-advice

Conversation

@hadley
Copy link
Member

@hadley hadley commented Feb 19, 2025

Copy link
Member

@jennybc jennybc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Yeah, to @DavisVaughan's point, you might want to rephrase somewhat to account for the fact that the number doesn't necessarily have to go first, if a bunch of filenames start with a common prefix.

Other points I usually make on this topic that aren't here yet (but are perhaps intentional omissions?):

  • Be very deliberate in your use of delimiters (I know you and I have different conventions here)
  • Left pad numbers with zero
  • ISO 8601 for dates

https://speakerdeck.com/jennybc/how-to-name-files-the-sequel

files.qmd Outdated
Comment on lines 5 to 6
1. File names should be **machine readable**: avoid spaces, symbols, and special characters. Prefer file names that are all lower case, and never
have names that differ only in their capitalization. Use `.R` as the extension of R files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soft comment: When I hold forth on this topic, I sometimes go on to say that what "machine readable" really means here is "very approachable with globbing and regular expressions".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't quite figure out where to squeeze that in

@hadley
Copy link
Member Author

hadley commented Feb 28, 2025

I think I managed to get most of your comments in, without having to rework the whole section again. We might want to do that in the future, but this is as much time as I want to spend on this now.

@hadley hadley merged commit 8d69afc into main Feb 28, 2025
1 check passed
@hadley hadley deleted the file-advice branch February 28, 2025 21:52
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

Successfully merging this pull request may close these issues.

3 participants