Should Shared Library Directory Be Named 'shared' or 'common'?
When programming, there are times when you want to create shared libraries that can be used commonly from various places.
At such times, don’t you sometimes wonder “What should I name the shared library directory? Should it be ‘shared’ or ‘common’?” I often had this dilemma.
While it’s a matter of preference, I wanted to go with the more general option, so I researched and found that shared seems to be better. I’ll introduce what I discovered.
In the Linux world, they’re called shared libraries, so shared seems like the better choice.
Shared Library - Wikipedia
A shared library is a somewhat ambiguous term that encompasses two concepts. The first refers to multiple unrelated programs sharing code on disk.
"Shared Library" Course for Non-Programmers
When working with Linux and UNIX, you often hear the terms “shared library” and “library.”
In the Rails world, shared libraries are also handled with the directory name shared.
3.4.1 Naming Partials
<%= render "shared/menu" %>The above code renders the contents of the app/views/shared/_menu.html.erb partial at that location.
Additionally, the deployment tool Capistrano also uses the directory name shared.
shared contains the linked_files and linked_dirs which are symlinked into each release. This data persists across deployments and releases. It should be used for things like database configuration files and static and persistent user storage handed over from one release to the next.[Conclusion] Shared Library Directory Name Should Definitely Be 'shared'
After researching several sources, it seems like shared is the definitive choice for shared library directory names.
Who was the one worrying about whether to name the directory shared or common…?
It was me.
That’s all from the Gemba.