Click here to Skip to main content
12,448,720 members (53,849 online)

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy except programming questions.

Technical discussions are encouraged, but click here to ask your programming question.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: Transcendence Pin
BrainiacV14-Feb-14 9:10
memberBrainiacV14-Feb-14 9:10 
GeneralRe: Transcendence Pin
RafagaX16-Feb-14 10:40
memberRafagaX16-Feb-14 10:40 
GeneralRe: Transcendence Pin
Simon O'Riordan from UK16-Feb-14 22:54
memberSimon O'Riordan from UK16-Feb-14 22:54 
GeneralRe: Transcendence Pin
C Grant Anderson17-Feb-14 9:12
memberC Grant Anderson17-Feb-14 9:12 
GeneralThat's rude, latest Adobe flash update Pin
{dc7c68de-3931-43b9-9102-6dbe3972c5c3}13-Feb-14 4:02
member{dc7c68de-3931-43b9-9102-6dbe3972c5c3}13-Feb-14 4:02 
GeneralRe: That's rude, latest Adobe flash update Pin
Gregory.Gadow13-Feb-14 4:06
memberGregory.Gadow13-Feb-14 4:06 
GeneralRe: That's rude, latest Adobe flash update Pin
{dc7c68de-3931-43b9-9102-6dbe3972c5c3}13-Feb-14 4:16
member{dc7c68de-3931-43b9-9102-6dbe3972c5c3}13-Feb-14 4:16 
GeneralRe: That's rude, latest Adobe flash update Pin
tgrt13-Feb-14 5:08
membertgrt13-Feb-14 5:08 
GeneralRe: That's rude, latest Adobe flash update Pin
Nicholas Marty13-Feb-14 4:18
professionalNicholas Marty13-Feb-14 4:18 
GeneralRe: That's rude, latest Adobe flash update Pin
Eddy Vluggen13-Feb-14 4:59
professionalEddy Vluggen13-Feb-14 4:59 
GeneralRe: That's rude, latest Adobe flash update Pin
Johann van der Smut13-Feb-14 18:22
memberJohann van der Smut13-Feb-14 18:22 
GeneralRe: That's rude, latest Adobe flash update Pin
jschell13-Feb-14 9:05
memberjschell13-Feb-14 9:05 
GeneralRe: That's rude, latest Adobe flash update Pin
sloosecannon14-Feb-14 8:24
membersloosecannon14-Feb-14 8:24 
GeneralCoding Standards Pin
Matt U.13-Feb-14 3:19
memberMatt U.13-Feb-14 3:19 
Coding standards with my employer are strange based on everything I've ever known, everything I've ever read, everything I've ever been told. They are set in their ways and I don't think anything could change their mind on these internal standards. Here are a few:

1. Excessive commenting -- practically every operation in code has a preceding comment. No matter how descriptive the code is, and no matter how simple the operation may be, there is a comment such as the following:

/// <summary>
/// This is an addition method.
/// </summary>
private int Add(int a, int b)
{
    // Add the two numbers and return the result
    return a + b;
}
 
private void Process(MyFileObj myFile)
{
    // Make sure the parameter is not 'null'
    if (myFile != null)
    {
        // Strip all the bad data from the object
        myFile.StripBadData();
 
        // Add the file to the collection
        _myFileCollection.Add(myFile);
    }
}

2. Variable declaration -- this may not be so bad, so please correct me if I'm wrong. But I've never seen it done this way. According to their standards, all variables in a method must be initially declared at the top of the method, before anything else is done:

private MyClass MyMethod()
{
    int count = 0;
    MyClass someObj = null;
 
    // Iterate over the file collection
    foreach (MyFileObj file in _myFileCollection)
    {
        // Make sure the file's name is not longer than 20 characters
        if(file.Name.Length <= 20)
        {
            // Copy the file to a new location
            file.CopyTo(@"C:\SomePath\" + file.Name);
 
            // Increment the counter
            count++;
        }
    }
 
    // A lot of other code
    // ...

    // Setup the class that will be returned
    someObj = new MyClass();
    someObj.FileCount = count;
 
    // Return the class that has the data we need
    return someObj;
}

The "MyClass someObj" isn't referenced until the very end of the method. Why should it be declared at the very top of the method? Maybe I'm missing something? I've never declared objects until the time I need them.

These are just a few examples. There are some other things I don't really agree with, but I can't change any of them.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.

GeneralRe: Coding Standards Pin
Ennis Ray Lynch, Jr.13-Feb-14 3:25
memberEnnis Ray Lynch, Jr.13-Feb-14 3:25 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 3:29
memberMatt U.13-Feb-14 3:29 
GeneralRe: Coding Standards Pin
Kirk Wood14-Feb-14 15:40
memberKirk Wood14-Feb-14 15:40 
GeneralRe: Coding Standards Pin
Argonia13-Feb-14 3:25
memberArgonia13-Feb-14 3:25 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 3:32
memberMatt U.13-Feb-14 3:32 
GeneralRe: Coding Standards Pin
Marco Bertschi13-Feb-14 3:34
professionalMarco Bertschi13-Feb-14 3:34 
GeneralRe: Coding Standards Pin
Argonia13-Feb-14 3:45
memberArgonia13-Feb-14 3:45 
GeneralRe: Coding Standards Pin
jschell13-Feb-14 9:09
memberjschell13-Feb-14 9:09 
GeneralRe: Coding Standards Pin
John Nurick14-Feb-14 1:25
memberJohn Nurick14-Feb-14 1:25 
GeneralRe: Coding Standards Pin
jschell14-Feb-14 10:15
memberjschell14-Feb-14 10:15 
GeneralRe: Coding Standards Pin
Gerry Schmitz14-Feb-14 10:15
memberGerry Schmitz14-Feb-14 10:15 
GeneralRe: Coding Standards Pin
jschell17-Feb-14 11:47
memberjschell17-Feb-14 11:47 
GeneralRe: Coding Standards Pin
Shameel13-Feb-14 3:35
memberShameel13-Feb-14 3:35 
GeneralRe: Coding Standards Pin
Kornfeld Eliyahu Peter13-Feb-14 3:40
professionalKornfeld Eliyahu Peter13-Feb-14 3:40 
JokeRe: Coding Standards Pin
Richard Deeming13-Feb-14 3:43
professionalRichard Deeming13-Feb-14 3:43 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 4:30
memberMatt U.13-Feb-14 4:30 
GeneralRe: Coding Standards Pin
Jonathan C Dickinson13-Feb-14 21:44
memberJonathan C Dickinson13-Feb-14 21:44 
GeneralRe: Coding Standards Pin
Richard Deeming14-Feb-14 0:27
professionalRichard Deeming14-Feb-14 0:27 
GeneralRe: Coding Standards PinPopular
Pete O'Hanlon13-Feb-14 3:45
protectorPete O'Hanlon13-Feb-14 3:45 
GeneralRe: Coding Standards Pin
MarkTJohnson13-Feb-14 3:50
memberMarkTJohnson13-Feb-14 3:50 
GeneralRe: Coding Standards Pin
HobbyProggy13-Feb-14 3:58
memberHobbyProggy13-Feb-14 3:58 
GeneralRe: Coding Standards Pin
wout de zeeuw13-Feb-14 3:58
memberwout de zeeuw13-Feb-14 3:58 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 4:32
memberMatt U.13-Feb-14 4:32 
GeneralRe: Coding Standards Pin
Gregory.Gadow13-Feb-14 4:16
memberGregory.Gadow13-Feb-14 4:16 
GeneralRe: Coding Standards Pin
wout de zeeuw13-Feb-14 4:26
memberwout de zeeuw13-Feb-14 4:26 
GeneralRe: Coding Standards Pin
Member 1008817113-Feb-14 8:54
memberMember 1008817113-Feb-14 8:54 
GeneralRe: Coding Standards Pin
jschell13-Feb-14 9:12
memberjschell13-Feb-14 9:12 
GeneralRe: Coding Standards Pin
Member 1008817113-Feb-14 9:35
memberMember 1008817113-Feb-14 9:35 
GeneralRe: Coding Standards Pin
jschell14-Feb-14 10:16
memberjschell14-Feb-14 10:16 
GeneralRe: Coding Standards Pin
S Houghtelin13-Feb-14 4:29
professionalS Houghtelin13-Feb-14 4:29 
AnswerRe: Coding Standards Pin
Ravi Bhavnani13-Feb-14 4:39
professionalRavi Bhavnani13-Feb-14 4:39 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 5:12
memberMatt U.13-Feb-14 5:12 
GeneralRe: Coding Standards Pin
Dennis E White13-Feb-14 5:23
professionalDennis E White13-Feb-14 5:23 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 6:05
memberMatt U.13-Feb-14 6:05 
GeneralRe: Coding Standards Pin
jschell13-Feb-14 9:07
memberjschell13-Feb-14 9:07 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 10:37
memberMatt U.13-Feb-14 10:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.160811.3 | Last Updated 26 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid