Justin du Coeur (jducoeur) wrote,
Justin du Coeur

The programmer's equivalent of a rosary

Say to yourself ten times each day, "Raw Integers and Stringified Integers do *not* make acceptable IDs for your model objects. You should be using strongly-typed ID objects whenever possible."

Yeah, I know -- I really should know better, but it was so *easy* to just use the ints from the initial database representation (and derive type from context) that they wound up laced through the system. But while they haven't caused any Horrible Disasters yet, it's probably only a matter of time, and they will probably fail scalability eventually. So I'm currently doing penance by going through the whole system and replacing them with properly-typed ID wrappers everywhere that I can find them, which should make the next steps a *lot* more solid...
Tags: commyou, programming

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded