I'm working on an app, and I instinctively have been keeping every filename unique.
As an example, I have two similar 'delete' functions for a particular record type. They are very similar, but different enough that I need to keep 2 different versions.
Each delete function is in a different folder, so technically the could both be named
'delete.xyz'
But I have been prefixing them to help keep track of what each file is for.
function1Delete
function2Delete
My logic is that I want to be able to easily tell what each file is for, and for whatever reason I like them having unique names just to protect the chance that I confuse one file for another and overright it, delete the wrong one, etc.
Thoughts? The downside is that since they are common functions, keeping the names the same would allow me to reference the function generically without having to be specific. Basically a reference to 'delete.xyz' would be dependent on context. Where as by keeping them unique, I have to absolutely define which specific version of the delete script I want to reference.
As an example, I have two similar 'delete' functions for a particular record type. They are very similar, but different enough that I need to keep 2 different versions.
Each delete function is in a different folder, so technically the could both be named
'delete.xyz'
But I have been prefixing them to help keep track of what each file is for.
function1Delete
function2Delete
My logic is that I want to be able to easily tell what each file is for, and for whatever reason I like them having unique names just to protect the chance that I confuse one file for another and overright it, delete the wrong one, etc.
Thoughts? The downside is that since they are common functions, keeping the names the same would allow me to reference the function generically without having to be specific. Basically a reference to 'delete.xyz' would be dependent on context. Where as by keeping them unique, I have to absolutely define which specific version of the delete script I want to reference.