Best Practices

new topic     » topic index » view thread      » older message » newer message

Thinking about the scope thread going on right now, I wonder if we don't need a lint checker that goes through and ensures best practices. For example, the whole debate about the scope issue is almost non-existant in most code I work on because there are not top level variables. In general top level variables are bad business. Top level constants, yes. Variables? No.

Even if there is not a lint tool, a wiki page wiki:BestPractices could be solving a whole lot of these problems. I propose we begin to create such a page. There is the wiki:CodingConvention page that contains some wiki:BestPractices but there are hundreds of wiki:BestPractices that would not really fall under a coding convention.

I also think that we would need some type of criteria as to what is a best practice and what is a "my style" practice. For example, one may say a best practice is to use camelCaseVariableNames starting with a lower case letter and function/procedures be named camel case starting with an upper case letter SuchAsThis(). I'm not really sure that could be considered a "best practice." There are different naming conventions such as use_underscores. Now is not using variables named a, b, c to mean first name, last name and birth date could be a best practice, i.e. make your variables descriptive and concise.

Jeremy

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu