Why Naming Is Part of Project Organization
A file name is a small piece of project documentation. A well-chosen name helps a collaborator identify what an artifact is for, how it relates to other artifacts, and whether it is ready for a particular use. A weak name transfers that work to memory or to a separate explanation. Names such as analysis_new2.R, config_final.yaml, and run_latest do not reliably communicate purpose or status: their meaning depends on who created them and when.
Consistent naming is not a substitute for separating source files, inputs, and generated artifacts. It complements that organization by making items within each part of a project easier to recognize and compare. A useful convention should be predictable, readable, and stable enough that a name does not need to change every time someone revises a comment or reruns an analysis.
Build Names From Stable, Meaningful Fields
Before choosing separators or capitalization, decide what a reader needs to know from the name. A typical name can be built from a small set of fields: artifact type, analysis purpose or scope, and—when needed—a date, version, or status. Put the fields in a consistent order. If one script begins with its purpose and another similar script begins with its date, both may be individually understandable, but the collection is harder to scan and sort.
This is a design pattern, not a requirement that every name contain every field. Include a field only when it distinguishes artifacts in a useful way. For example, a single analysis-plan document may not need a date in its name if the project already identifies the relevant plan version elsewhere. Conversely, two configuration files for different analysis populations may need the population in their names to prevent accidental substitution.
Prefer words that a new team member can interpret without asking the original author. Use the same term for the same concept across scripts, configurations, documentation, and run folders. If the project calls a population “evaluable” in one name and “per-protocol” in another, readers may reasonably infer that they differ. Abbreviations are useful only when they are established, unambiguous within the project, and applied consistently. Initials, personal names, and locally invented shorthand tend to be less durable.
Choose a separator and capitalization pattern, then apply it throughout the project. Lowercase words separated by underscores or hyphens are easy to distinguish visually; either can work if used consistently. Avoid relying on capitalization alone to distinguish two files, because some filesystems treat names that differ only by letter case as equivalent. Keep the actual file extension intact, and do not add punctuation that some tools or operating systems interpret specially. Detailed path portability is a separate concern, but conservative names reduce avoidable friction.
Worked Example: Replacing Ambiguous Script Names
Suppose a hypothetical pharmacometric project has three source scripts: one assembles the analysis dataset, one fits a base population pharmacokinetic model, and one produces diagnostic plots for that model. The current names are build.R, model_new.R, and plots2.R. These names do not reveal the full purpose, and “new” and “2” are not stable descriptions.
First identify the meaningful fields: all three are scripts, and each has a distinct purpose. Because there is only one dataset assembly script and one diagnostic script, a population or version field is not needed. The model-fitting script needs “base” to distinguish its role from other model purposes. Using the consistent type-purpose order yields dataset_build.R, model_base_fit.R, and model_base_diagnostics.R.
The names now distinguish the three roles without encoding the author or the order in which files happened to be created. If the project later adds a covariate model, the same pattern can produce model_covariate_fit.R and model_covariate_diagnostics.R. A reader can infer the relationship from shared terms, while the distinct purpose field prevents confusion between fitting and diagnostic scripts.
Dates, Versions, and Status Need Different Jobs
Dates are useful when they identify a time-specific artifact, such as a frozen data delivery or a dated report. Use an unambiguous order such as year-month-day, with leading zeros where needed: 2026-10-27 sorts chronologically as text when all dates use the same format. A date should describe the artifact’s relevant date, not be added automatically to every source file. A script that is continually maintained may become misleading if its name retains the date on which it was first created.
A version number is useful when people must distinguish intentional revisions of a controlled artifact. Use one pattern, such as v01, v02, and v03, rather than mixing v2, revisionB, and second_update. Incrementing a version communicates that a distinct revision exists; it does not by itself explain what changed or establish that the newer version is scientifically preferable. Version naming should therefore follow the project’s actual review and change-control practices.
Status is different from identity. An artifact’s identity answers “which item is this?”; its status answers “what state is it in now?” Define a short, controlled vocabulary before using status terms. For example, draft, review, and approved can be meaningful if the team defines who assigns them and what each permits. Terms such as final, latest, and done are weak labels: “final” often becomes outdated, “latest” changes over time, and “done” does not say whether an item was reviewed.
Status can change more often than an artifact’s identity. If changing status requires renaming a file used by scripts or referenced in documentation, the label may create broken references or make old copies hard to interpret. For a working artifact, it can be safer to keep its stable name and record its current status in an appropriate project record. A status term in a filename can be useful for a frozen, distributed snapshot, provided the label has a defined meaning and the snapshot is not silently overwritten.
Worked Example: Naming Configurations and Documentation
In a hypothetical analysis, a team maintains two model configurations, one for the full analysis population and one for a sensitivity population. It also maintains an analysis-plan document with controlled revisions. Current names are cfgA.yaml, cfgB.yaml, plan_new.docx, and plan_final.docx.
The configuration names should state the artifact type and the population represented. If the team’s agreed population terms are full_population and sensitivity_population, consistent names are config_full_population.yaml and config_sensitivity_population.yaml. These names use the same type-purpose order and avoid the uninformative labels “A” and “B.”
For the plan, the team decides that revisions are numbered and that a distributed, reviewed copy may carry a status label. The working document is analysis_plan_v03.docx. After review and approval, a frozen copy could be named analysis_plan_v03_approved.docx, if “approved” has a defined project meaning. The name does not claim that the plan is permanently current; the version distinguishes this copy, and the status describes its state at release. Calling it plan_final.docx would not distinguish a later approved revision from an earlier one.
Run Folder Names: Identify the Run Without Hiding Its State
A run folder name should help distinguish one execution from another and convey the purpose or scope needed for recognition. A useful pattern can combine a date, a unique sequence or identifier, and a concise purpose, for example run_20261027_003_base_model. The date is in year-month-day order, the sequence distinguishes runs on the same date, and “base_model” communicates purpose. The sequence must be assigned consistently; otherwise two folders could receive the same name.
Whether status belongs in a run folder’s name depends on how that folder will be used. If a folder is a fixed snapshot prepared for a particular review state, a controlled suffix such as review or approved can clarify its intended state. If the status changes during work, renaming the folder can undermine references to it. In that case, preserve the run’s stable identifier and record the changing status separately. Do not use names such as run_latest or run_final as substitutes for unique run identity.
Worked Example: Distinguishing Same-Day Runs
Consider three hypothetical executions on 27 October 2026: a base-model run, a second base-model execution after a configuration change, and a sensitivity run. A date-and-purpose pattern alone would give two folders the same name for the base-model executions, so it would not uniquely identify them.
Add a sequence assigned in execution order, using a fixed width: run_20261027_001_base_model, run_20261027_002_base_model, and run_20261027_003_sensitivity. The date indicates the execution day, the three-digit sequence differentiates each execution, and the purpose distinguishes the sensitivity run. The two base-model folders remain distinct even though their purposes match.
Suppose the second run is sent for review. If the folder is a stable execution record, keep its name and record review status separately. If the project distributes an immutable review snapshot, a clearly defined suffix such as run_20261027_002_base_model_review may be suitable. The choice depends on the lifecycle rule; the name must not imply that status is permanent when it can change.
Check a Convention Before Adopting It
A naming convention works only if people can apply it and if its names distinguish the artifacts that matter. A short review can expose weaknesses before many files depend on the pattern. The reasoning is straightforward: names are useful when a reader can infer the intended identity, and identity requires enough distinguishing information. If two different artifacts map to the same name, or if a field’s meaning changes between names, the convention has failed that purpose.
Ask whether the reader must recognize artifact type, analysis purpose, population, revision, or review state. Do not encode irrelevant details merely because they are available.
Choose consistent terms and separators. Check that a term such as “base” or “approved” has one clear meaning in the project.
Include two similar configurations, multiple revisions, and repeated runs. If names collide or depend on an explanation only the author knows, add or revise a meaningful field.
Remove temporary labels and unnecessary dates. Confirm that a status change will not require an unsafe rename and that names remain understandable when listed together.
Useful diagnostics include repeated names with different meanings, a collection in which similar artifacts follow different word orders, and status labels that have no agreed definition. Another warning sign is a name whose meaning can only be recovered from a person’s memory. These are not cosmetic problems: they make selection and review more error-prone, especially when multiple files have similar content.
There are alternatives to descriptive names, but each has trade-offs. A short numeric identifier can be compact and unique, yet tells a reader little without a lookup record. A long prose-like filename can be explicit, but becomes cumbersome and may duplicate information available elsewhere. A useful convention balances recognizable meaning against unnecessary length. It does not attempt to put every detail of an analysis into the filename.
Naming conventions have limits. They cannot prove that a script implements its stated purpose, that a configuration matches a model, or that a run is reproducible. Names also cannot replace records of substantive changes or review decisions. The aim is narrower and practical: make names informative enough to support correct recognition, while keeping identity, status, and detailed documentation from being confused with one another.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A script is named fit_final2.R. It fits a covariate model. Give a clearer name under a consistent type-purpose convention.
- Two configuration files use the same analysis but different populations. What information should their names include, and why?
- A run folder is renamed from run_20261027_002_base_model to run_20261027_002_base_model_review when its review status changes. Give one reason this may be a problem and one circumstance in which the suffix could still be useful.
- Why is 2026-10-27 generally more useful for chronological filename sorting than 10-27-2026?
- A colleague proposes using “latest” in every current document filename. Explain the weakness and suggest a more stable approach.
Solutions. (1) model_covariate_fit.R states the artifact type and purpose without the unstable “final2” label. (2) Include the artifact type and the agreed population terms, such as config_full_population.yaml and config_sensitivity_population.yaml, so the files are distinguishable without guessing what A or B means. (3) Renaming may break references or obscure the stable identity of the execution; a status suffix may be useful for a frozen snapshot distributed specifically for review. (4) A year-month-day format places the largest time unit first and uses consistent, zero-padded fields, so names sort in calendar order as text. (5) “Latest” changes whenever a newer document appears and does not identify a particular revision. Use stable revision identifiers, and record current status in a defined project record or on a frozen snapshot where appropriate.