Rails Model Naming: Fix or Leave As-Is -
this more of philosophical question technical one.
i'm 40 hours working on new rails app. it's retail-related, , on chose name "item" describe single available product sale.
as time has gone on it's become obvious me mistake - word "item" generic, , "product" perhaps have been better choice.
so decision i'm faced is, refactor / rename models, erb code , tables before build more poorly chosen name, or leave as-is, save time , move on? worry it's choosing latter repeatedly results in ridiculous technical debt i've seen on other projects, think might form of premature optimization.
thoughts?
naming convention absolutely necessary mid-to-large projects. go in , refactor make naming specific possible. generic identifiers out of hand new functionality gets introduced (i once on project had class named userreportreportreportparameters
).
the quicker done, less painful be.
edit: should add if impossible due deadlines or other constraints, stick current naming schema until have time refactor @ once. i'm of firm opinion bad naming convention better mixed naming convention.
Comments
Post a Comment