Home > Uncategorised > Developers and Coding Standards

Developers and Coding Standards

I found a post on one of the MSDN blogs the other day about Hungarian Notation being adopted by some of the Microsoft Development teams, and how they should go about using it.

Where I work, we don’t use Hungarian Notation, and so far we have managed to cope without it. Having said that, the language that we use (Progress 4GL) is meant for database access, and therefore relatively few types actually exist, and more complex types are created by creating database tables. The most that we really stretch to is “vVarName” for a variable, “ipParamName”/”opParamName”/”iopParamName” for input/output/input-output parameters (respectively). Some people do go further and may use “c” for a string, but that is about it. We also call procedures or functions defined in include-files “i_ProcName” to make it easier to identify their location, and sometimes people may name variables inside of procedures located in include files so that they do not run into “Multiple Variable Declaration” problems.. So far, in the extensive project that I work on, it’s not been a problem.

They also link to a page which describes an internal Microsoft layout format for programs/source code. Again, we don’t have a strict set of rules for this. We have rough guide lines (like “Line up all the equal signs”) but quite often these are broken in order to actually improve readability.

What this actually means though, is that (by knowing each person’s individual style), it can be quite easy to pin-point who did a piece of work where it is not already obvious who had done the work.

I doubt that my Project Managers will ever feel the need to develop a more rigorous standard, or enforce rules about layout and style, and for the most part I don’t think that we will need to either.

We’ll just have to see what happens with time…..

Categories: Uncategorised Tags:
  1. Rich
    March 9th, 2005 at 16:37 | #1

    Change of plan…
    Actually, they changed their minds with .NET: "do not use Hungarian notation"

    (http://support.microsoft.com/default.aspx?scid=/servicedesks/webcasts/wc101201/WCT101201.asp). I had a better ref (in MSDN, I think) which I used in one of my C++ lectures, but I can’t be bothered to dig it out.

    The summary is that with modern IDEs, Intellisense fulfils the role that HN once did: that of providing useful type information wherever the variable is used.

    I’ve never liked it, though the only prefixing I do is _ on member variables, so that constructors are less confusing:

    public MyClass (String name) {

    _name = name;


    for instance.

    Code style discussions rule 🙂

  1. No trackbacks yet.