What is mean by Programming styles?

  • Some experts are saying , we can easily identify the knowledge of the programmer by their programming style. How ?

    karthik

  • Any inputs ?

    karthik

  • Things like the way you use naming conventions, how readable your code is (commenting), etc. It wil also greatly depend on the language you are programming (and speaking and writing !).

    If you write SQL like this, its not consistent and is more difficult to read.

    select * FROM table1,table2 WHERE table1.col1 = table2.col2

    The same statement spread out and made consistent is much easier to follow. Lines 4 and 6 should be tab indented, the forum is not rendering them).

    SELECT

    *

    FROM table1,

    table2

    WHERE

    table1.col1 = table2.col2

  • Style differs from one programmer to another. We all have our prefered way of writing things.

    Other things. Variable and class naming (where appropriate) Use of whitespace. Placing of brackets, begins and other block indicators.

    Good style may not tell you that the developer is good, but poor style, messy layout, meaningless variable name, useless comments are all indicators of a poor developer.

    Andrew Stanton (11/21/2007)


    The same statement spread out and made consistent is much easier to follow. Lines 4 and 6 should be tab indented, the forum is not rendering them).

    SELECT

    *

    FROM table1,

    table2

    WHERE

    table1.col1 = table2.col2

    Whereas I'd do the same code as follows (btw, Andrew, use the code tags to preserve indentation)

    SELECT

    col1,

    col2

    FROM table1

    INNER JOIN table2 ON table1.col1 = table2.col2

    Not better. Just different.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Mostly the naming conventions, usage of variables and logic building and style of coding

  • ... and not forgetting that RBAR [© J Moden] - inappropriate use of cursors - is the sign of the programmer used to variations on

    for i = 0 to n-1 | for (i=0; i < n; i++) | foreach (...)

    who hasn't yet got the hang of set-based thinking.

  • karthikeyan

    Why did you keep posting questions about good programmer and programming styles? How long have you been in the IT business ?

    Bill Gates once said you could find out if the person was a good programmer or not in 3 to 4 years. Every programmer has own programming styles, however I found out good/great programmers had one thing in common, their styles were easy to understand and easy to follow.

  • i am in IT Field for 2 Years.

    karthik

  • I have completed my first year i have step up into the II year before 8 months. So totally i have 1.8 years experience in IT Field.

    karthik

  • karthikeyan (11/22/2007)


    So totally i have 1.8 years experience in IT Field.

    And you call yourself a senior software engineer? Personally I'd consider anyone under 2 years junior.

    Someone claims to be a senior software engineer, I'd expect them to have a minimum of 5-7 years experience, possibly quite a bit more

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Yes you are correct. But i have around 3 years of experience in non IT.

    karthik

  • Sounds like some of the other "Senior Software Engineers" I've interviewed... and rejected :Whistling:

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Very few people are fortunate enough to work on a project from it's inception, so practically everything you do will be either maintaining an existing product or adding features to existing products.

    Your ability to write code that is clearly understandable by whoever needs to update the code next is paramount. So programming styles should always include a layout element as well as a reasonable naming convention and meaningful comments.

  • Good programmers are the ones who tend to think through a problem before writing code. I don't mean they sit there and whiteboard and model everything out. Some can do all but the most complex tasks in their heads. Others do need to whiteboard to think it through. And I don't mean they cover every little variable declaration. But they build the basic outline and flow, they consider details that are likely to have an impact on performance, security, etc. Maybe they don't get everything, but they've thought things through to build a framework for solving the problem. And that's the key: thinking things through.

    Style will often reflect this, as has already been stated. You'll see logical and consistent naming standards. You'll also see blocking and constructs that show the flow and structure they envisioned. You'll see appropriate commenting on the tricky parts of code, if for no other reason, to help them remember why they wrote something a particular way, etc.

    As has also been stated, seeing these things isn't a 100% identification of a good programmer. But when those things are missing, it's usually the sign of a bad or inexperienced programmer.

    K. Brian Kelley
    @kbriankelley

  • GilaMonster (11/22/2007)


    karthikeyan (11/22/2007)


    So totally i have 1.8 years experience in IT Field.

    And you call yourself a senior software engineer? Personally I'd consider anyone under 2 years junior.

    Someone claims to be a senior software engineer, I'd expect them to have a minimum of 5-7 years experience, possibly quite a bit more

    I would tend to agree, but there are always exceptions. The one I can remember is back when I was in the Air Force, I had a guy who had years of SMS experience and he was generally very good at it. But there was something he was struggling with in SMS 2.0, which had just come out. He had spent the better part of a week trying to solve it in a test lab.

    Half jokingly, we told the high school intern we had working for us, to go take a look and solve it. I say half-jokingly because the kid was smart and just "knew" computers and systems. We figured after a week or so he'd work through it and figure out the solution. We were wrong.

    Two hours later he comes back and says, "I fixed it." I need to point out that said high school intern had zero SMS experience. The SMS administrator was beside himself, and asked to be shown what the kid did. Sure enough, he had solved it. And in doing so demonstrated that he had learned enough about SMS in those two hours that it absolutely astonished all of us, especially said experienced SMS administrator.

    Granted, this is the rare exception, and not the rule, but that taught me to not make an arbitrary judgment based on time working with the product.

    K. Brian Kelley
    @kbriankelley

Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in to reply to this topic. Login to reply