Tagged Questions
6
votes
2answers
426 views
Is this awkward spacing some type of style?
In reading another programmers code, he uses a format I have never seen. E.G.
namespace MyNs.HereWeAre
{//tab here for some reason
public class SomeClass
...
4
votes
4answers
404 views
C# return variables
In a debate regarding return variables, some members of the team prefer a method to return the result directly to the caller, whereas others prefer to declare a return variable that is then returned ...
0
votes
3answers
99 views
Free Newsletters that teach you new coding techniques periodically? [closed]
Are there are any periodic newsletters/articles about unique coding tips/techniques that can be subscribed to? I want to expand my arsenal and I'm sure there's some experienced programmers out there ...
3
votes
4answers
167 views
How to ensure a single coding standard in .NET with tool support
Probably, the basic situation is familiar to everyone. You have agreed on certain coding standards in your team and now it is time to make sure that everybody follows them.
Some do it via heavy ...
2
votes
1answer
267 views
Has anyone thoroughly compared C# common coding standards?
Most of the C# programmers I know embrace one of the common coding standards. However being aware of the standards is one thing, telling the differences is another.
Browsing the common coding ...
2
votes
4answers
207 views
Do more object declarations affect the program?
I am programming in Windows Forms and MySQL.
If I declare this in the program, I can use the connection and command objects in the whole .cs page:
MySqlConnection connection = null;
MySqlCommand ...
32
votes
14answers
1k views
Should I encourage junior developers to use explicit or implicit typing?
I am looking to solicit the community's opinion on whether or not it would be advisable to teach junior developers to code with implicit typing (using var) or should I encourage the use of explicit ...
5
votes
4answers
259 views
Programming standards and principles to become better programmer [closed]
I am a c# developer.
I have always been interested in increasing my skills and knowledge and trying to pickup new technology.
However now I want to enhance my knowledge in Programming standards and ...
5
votes
3answers
316 views
Is it bad idea to use flag variable to search MAX element in array?
Over my programming career I formed a habit to introduce a flag variable that indicates that the first comparison has occured, just like Msft does in its linq Max() extension method implementation
...
9
votes
8answers
879 views
Why are people so strongly opposed to #region tags in methods?
I hear a lot about keeping methods short and I've heard a lot of programmers say that using #region tags within a method is a sure sign that it is too long and should be refactored into multiple ...
4
votes
4answers
66 views
How do you proactively guard against errors of omission?
I'll preface this with I don't know if anyone else who's been programming as long as I have actually has this problem, but at the very least, the answer might help someone with less xp.
I just stared ...
0
votes
4answers
330 views
C# - Correct coding style for IF statements [closed]
Visual Studio formats my code like this:
if (some_condition)
{
// some code
}
And R# formats it like this:
if(some_condition)
{
// some code
}
Which one is more correct ? The same ...
6
votes
3answers
279 views
What should I include in XML documentation comments?
I'm trying to make a point of documenting my code better, especially when it comes to the XML comments on class members, but often it just feels silly.
In the case of event handlers, the naming ...
11
votes
6answers
391 views
When should I use a 2-property class over a pre-built structure like a KeyValuePair?
When should you put Key/Value type of data in it's own class instead of using a pre-built generic structure, such as a KeyValuePair or a Tuple?
For example, most ComboBoxes I create contain a ...
6
votes
7answers
452 views
LINQ Style preference
I have come to use LINQ in my every day programming a lot. In fact, I rarely, if ever, use an explicit loop. I have, however, found that I don't use the SQL like syntax anymore. I just use the ...