Prevent developers from using constants
I have one one software system which allows developers to specify an ID or name to create NodeReferences
. Both work fine, but ID’s are not guaranteed to be the same across different environments. I’ve tried in documentation and in conversations to stress that ID’s should not be hard coded (since they will break when deployed to a different environments), but some developers are still using them.
Why is (position < size) such a prevalent pattern in conditionals?
In a condition statement (IF) everyone uses (position < size)
, but why?
Only convention or there is a good reason for that?
Is using `continue`, `break` in non-`switch` loops and `?:` bad practice? [duplicate]
This question already has answers here: Are `break` and `continue` bad programming practices? (21 answers) Closed 11 years ago. Back in college I’ve been told that using break; and continue; outside switch statements (e.g. to escape for or while loops) is wrong, bad practice and bad habits at the same time because it only means […]
Microsoft’s coding standards for ASP.NET controls
I cannot find any naming standards/conventions in MSDN for naming ASP.NET controls.
Are there standard style guides for PHP? [closed]
Closed 8 years ago.
The problems with Avoiding Smurf Naming classes with namespaces
I pulled the term smurf naming from here (number 21). To save anyone not familiar the trouble, Smurf naming is the act of prefixing a bunch of related classes, variables, etc with a common prefix so you end up with “a SmurfAccountView
passes a SmurfAccountDTO
to the SmurfAccountController
“, etc.
Implementing a new coding standard to an existing application
Recently we have had some turnaround in the shop I work in, because of this comments in our source code were made hastily and explained very little. We have started working on the departments first draft of coding standards and one of the bigger questions is: Should we implement this standard across the existing source code? Since this is only our coding standards first draft (done to promote flexibility and future considerations), should we be implementing on new features and during maintenance?
Is using “out” or “ref” parameters in Java methods to return extra values bad?
I happened to create a mutable class like this:
Naming of related classes and interfaces
I have created an ObjectParser
class which parses data into strongly typed objects using an IObjectParserDataSource
as the data source (the data could be an Excel file, text file, array, query string, etc).
Should I not try to emulate private class data in javascript?
So I have been building this ORM style library for AngularJS (JavaScript) and since I come from a C++/PHP/C# background, I always try to make sure that private things stay private. While this can be accomplished in JavaScript, I keep running into issues that I have to work around probably because JavaScript really does not have the transitional class system that I am used to.