Why during interviews people ask about “Coding guidelines”?

Many times during interviews we come across a question “Tell me something about Coding guidelines you have been following”.

What people answer for these questions?

  • We put some prefix before naming controls like tx,lbl etc. Example: txtCustomerName.
  • For naming variables we follow some
    guidelines like
    PrefixAccessModifierVariableName.
    Example
    intPriCustomerNo.
  • Blah, blah, blah etc.

 

Do you really believe Interviewer is interested in knowing what kind of guidelines especially naming guidelines you follow in your organization?

Answer is absolutely NO.

It is very important for a candidate to know what exactly an interviewer is looking for,

  • Interviewer is trying to understand, does candidate really knows about candidate’s current organization.
    Person who doesn’t know about companies coding guidelines is not actually a coder or may be a coder who is not interested. Just after working for two days, developer get a basic idea about coding guidelines. If one don’t know anything about coding guidelines means there is some big problem. This is one of the reason why interviewer ask this question.
  • Interviewer is trying to see whether you are aware about different variable naming conventions (like Camel, Pascal, Hungarian etc.) or not.
    Interviewer’s next question may be to explain these terminologies.
  • Interviewer  is trying to understand your role especially in the code review.
  • Interviewer may try find, if you really knows about the importance of naming convention or not.
  • Interviewer may try you to find, if you know the difference between naming convention and coding guidelines or not.

What should we answer?

  • Most important point, from where you should be start is, talking about approach or methodology you are following. Whether it is Hungarian, Pascal or camel etc. Click here to read more about naming conventions.
  • You should explain interviewer about the special conventions about your organization. For example you append access modifier prefix to variable names like pri,pub etc.example private variables should be named as strPriCustomerName.
    Explaining the advantage of doing so will adds extra point.
  • Third point is most important.
    Before you explain it to them you understand it well.

    Naming Conventions! = Coding Guidelines

    Coding guidelines means how code should be written. It’s not just about naming variables.
    It is very important to explain what kind of practice will be followed in your organization while coding.
    Example –

    • Every time some code get  changed a proper notes will be added.
    • Description should be added for every method and class
  • Next explain some guidlines you normally follow other than company guideline?Example:
    • I make sure that Single responsibility principle is strictly followed. It means one method will contains only one logic.
    • There should be any code comment. Code which is kept as commented code for future reference.
  • Don’t forget to explain how code review will be done in your organization. In some organization utilities like FXCOP and STYLECOP are used for code review whereas in some organization it will be done manually. You should be clear about your functionality.
  • Your role should be clearly expressed. Whether you are involved in the development and reviewing your own code only or also in the code review of other developers too.

For technical trainings on various topics like WCF (Windows Communication Foundation), MVC (Model View Controller), Business Intelligence, Design Patterns, WPF, TFS and Basic fundamentals feel free to contact SukeshMarla@Gmail.com or visit www.sukesh-marla.com

For more stuff like this, click here. Subscribe to article updates or follow at twitter @SukeshMarla

Also view complete .net mock interview video as follows: –

Comments

comments

Leave a Reply