Relative Content

Tag Archive for conventions

Convention on model names in ruby on rails

I was doing my ER diagram for a rails application I’m about to begin with and there I have an entity called Class News so I’d have a model ClassNew but I don’t know if I will have problems in the future with the New part or what would be the right way to do this o how should I call the model? since the right thing would be ClassNews and the table should be class_news

conventions for friend methods in Perl

Perl doesn’t support a friend relationship between objects, nor does it support private or protected methods. What is usually done for private methods is to prefix the name with an underscore. I occasionally have methods that I think of as friend methods. Meaning that I expect them to be used by a specific object, or an object with a specific responsibility, but I’m not sure if I should make that method public (meaning foo ) or private ( _foo ) or if there’s a better convention? is there a convention for friend methods?

Writing data driven reflection based tests to ensure design completeness [closed]

Using naming conventions and associated behavioral or structural rules associated with those conventions, it should be possible to write tests for the product that enforce that behaviors and structures associated with names are implemented correctly by reflecting the available target binaries. Furthermore it should also be possible to enforce a by convention design that doesn’t allow for the misuse of naming conventions by means of having names that fall under the naming conventions that don’t follow those same behavioral or structural rules to be used inappropriately (i.e something with the word Locator in the type name that doesn’t implement the service locator pattern.)

Coding convention question about AS3 duplicate variable definition

AS3’s got some awkward rules about variable scope, due to its use of hoisting. I don’t like pointlessly leaving a bunch of compiler warnings lying around, but it’s more important to me for my code to readable and properly written, regardless. This produces a couple of duplicate variable definition warnings: