Re: Tutorial and guidelines: A proposal for better OpenSource code (long message)

From: Bjorn Reese (breese_at_see.signature)
Date: 05/31/04

  • Next message: Darko M.: "Re: Best way to implement a resettable timer."
    Date: Mon, 31 May 2004 12:19:00 +0200
    
    

    On Sun, 30 May 2004 20:07:35 +0200, Otto Wyss wrote:

    > Tutorial and guidelines: Coding standards, Naming

    Naming, along with indentation, is an emotional topic, and you are
    unlikely the establish any kind of inter-project consensus. Having
    written several coding guidelines (both open source and commercial)
    I have come to the conclusion that the only good rule is: Use the
    same style as the rest of the code.

    > Rules for choosing good names are rather difficult to specify. But

    Indeed they are. If you are seriously interested in this, I suggest
    that you look into the work of Derek Jones, and especially the
    various studies he refers to. See

      http://www.knosof.co.uk/cbook/cbook.html

    > In class oriented languages (C++) it's a good idea to make the scope
    > visible. Global objects should have a "g_" prepended, class objects
    > (members) a "m_" while local object may not have a prefix. Other

    If there is a need to signify member variables, I prefer "this->"
    because it is built into C++ and every programmer will immediately
    know what it means (contrary to having to guess that "m_" is short
    for member -- you may think it is obvious, but I have met several
    programmers who have been puzzled about the "m_" prefix.)

    -- 
    mail1dotstofanetdotdk
    

  • Next message: Darko M.: "Re: Best way to implement a resettable timer."

    Relevant Pages

    • Need development info
      ... My name is Tom and I am new to the open source world. ... programmer for many years and have turned my focus entirely toward linux as I ... Could someone tell me a book or something, especially for the 4Mpg kernel. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Endless Buffer Overruns
      ... He isn't attacking open source, he is saying that they are in the same boat as ... >>both local and remote buffer overflows and requires frequent patching, ... >>>I'm approaching this from a programmer point of view. ... >>>Maybe I don't understand what buffer overrun is/does. ...
      (microsoft.public.security)
    • Re: A question for the open source people
      ... I'm a web programmer, I don't know C or C++ but actually can't live a day ... without open source web content management systems like worldpress which I'm ...
      (Fedora)
    • Re: Endless Buffer Overruns
      ... Why do you always insist on working the fact that the Open Source folks ... > both local and remote buffer overflows and requires frequent patching, ... >> I'm approaching this from a programmer point of view. ... >> buffer overrun areas, shouldn't they have a team that verifies the code? ...
      (microsoft.public.security)
    • Redirect IFrame links
      ... so they say that one of the characteristics of an open source ... programmer is he/she knows the benefits of using other people's code ... next is capture the link clicks from inside the Iframe and have it act ... I'm using PHP, Squid, and Gentoo. ...
      (comp.programming)