IE 6 and 7 didn't follow many of the w3 standards, like event handling, making it necessary to write code for the standards compliant browsers, and then write MORE code for Internet Explorer. Will IE 8 take us out of this dark age and stabilize web-development? Will it be easier to write one set of code that all browsers will display the...
No doubt some of you have seen my recent posting, all regarding the same program. I keep running into problems with it. To reiterate: still learning, not very advanced, don't understand pointers very well, not taking a class, don't understand OOP concepts at all, etc. This code just merges two sorted vectors, farray and sarray, into a si...
I don't intend this to be subjective, but if the answers can be seasoned a little with advice or direction I would appreciate it :)
Over the past couple years my job has been to develop and now maintain/extend a fairly large application. The application was among the first .NET projects ran by our department and for nearly the whole de...
I keep a lot of settings in AppSettings, and I was wondering if it's considered good practice to name them in UpperCase. Essentially, they're the same as Constants right? As I understand it, if you change the Web.Config, the app does a recompile.
So, I was thinking, should you keep the settings in AppSettings in UPPERCASE (Assuming you...
I am trying to write a program to check that some C source code conforms to a variable naming convention. In order to do this, I need to analyse the source code and identify the type of all the local and global variables.
The end result will almost certainly be a python program, but the tool to analyse the code could either be a python...
I feel I'm a well rounded programmer, I'm comfortable in C# and java (several large projects with both) but I tend to use C++ for most applications when I have a choice. (and sometimes R,Python, or Perl as appropriate..)
But I am astounded to see the popularity of C# here on SO. There are 18500 C# topics, more than C, C++, and java comb...
what is the best way to declare variable names.... in uppercase ...? .. lowercase? in which area must be declared in any case ... and what name is appropriate depending on the roll of the standard variable ... there are some variables to declare?...sorry for the question..I'm new to the world of programming ... I hope not bother .... =)...
How can I make developers follow coding standards?
In our company:
I've given documents and they don't have the patience to read it and follow it.
I've tried telling them again and again "please do it this way" they nod their heads, but still do it the wrong way
We're doing a project for the third time and still they don't seem to fo...
Which one is preferable or more clear?
public int FrozenRegionWidth { get; set; }
Or...
public int WidthOfFrozenRegion { get; set; }
...
What are some ways in which I can write code that is easily modified?
The one I have learned from experience is that I almost always need to write one to throw away. That way I have developed a sense of the domain knowledge and program structure required before coding the actual application.
...
We were having the (never ending) underscore prefix versus no underscore prefix debate on member variables and someone mentioned that is you use "this." instead of "-", your code will be slower due to the "." in "this.". Is this true and can anyone quantify this?
...
We are a .NET shop, mostly coding using C# in VS. We created coding standards for our organization, and now we need to enforce them. We can use tools like FxCop & StyleCop.
What we want:
On each developer's PC, have settings that will give them a warning or error when they compile their code.
When they check in the code into version...
It is very difficult to write perfect code because the standards upon which our code is judged is evolving every day. The beautiful as it may be now, is probably going to be ridiculed later.
Have you ever look back at some of your old code and grimaced in pain? If yes, do you have any idea how to overcome this?
...
I am on a large project, and have not really made any comment 'headers' in my program yet. I just started using SVN for the project the other day. I want to add the SVN tag $id$, but have not decided on any standard commenting.
So, my question to everyone here, is how does your initial comment block look in all your programs?
i.e:
/...
From MSDN, code analysis warning CA1032:
Exception types must implement the following constructors:
public NewException()
public NewException(string)
public NewException(string, Exception)
protected or private NewException(SerializationInfo, StreamingContext)
I understand the purpose behind the serialization constructor, but is the ...
Example:
Is the following code valid against the JSON Spec?
{
precision: "zip"
}
Or should I always use the following syntax? (And if so, why?)
{
"precision": "zip"
}
I haven't really found something about this in the JSON specifications. Although they use quotes around their keys in their examples. (So I'll do that too f...
I've worked with a number of C projects during my programming career and the header file structures usually fall into one of these two patterns:
One header file containing all function prototypes
One .h file for each .c file, containing prototypes for the functions defined in that module only.
The advantages of option 2 are obvious t...
Say you have a menu item and a button that do the same task.
Why is it bad practice to put the code for the task into one control's action event and then make a call to that event from the other control?
Delphi allows this as does vb6 but realbasic doesn't and says you should put the code into a method that is then called by both the me...
Possible Duplicate:
Do you prefix your instance variable with 'this' in java ?
Coding standards question. Maybe should be Wiki, let me know. Should I qualify all my instance properties and methods with this. or should I leave it off. Do you think it makes statements more readable and traceable? Or is it just a few wasted key...
Hi, I have set error reporting in my development environment to E_STRICT by adding to the top of my wp-config.php file:
ini_set( 'error_reporting', E_STRICT );
This shows many places where return values are passed by reference, eg $wp_the_query = &new WP_Query(); throws the error Strict standards: Assigning the return value of new by r...