Difference between revisions of "Talk:Programming Guidelines"

From Dreamwidth Notes
Jump to: navigation, search
(dw-nonfree suggested header: new section)
(removed other headers to move to their own page)
 
(4 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
[[User:Pauamma|Pauamma]] 09:04, 14 August 2008 (UTC)
 
[[User:Pauamma|Pauamma]] 09:04, 14 August 2008 (UTC)
  
== dw-nonfree suggested header ==
+
(LJFUNC should die and we should use something that the rest of the world uses, POD. [[User:Xb95|Xb95]] today when I wrote this)
 
+
    #!/usr/bin/perl
+
    #
+
    # DW::Sort::Pessimal::Bizarre::ThreeNumbers
+
    #
+
    # This module sorts three numbers using absurdly many comparisons.
+
    #
+
    # Authors:
+
    #      J. Random Hacker <jrh@example.com>
+
    #
+
    # Copyright (c) 2009 by Dreamwidth Studios, LLC.
+
    #
+
    # This program is NOT free software or open-source; you can use it as an
+
    # example of how to implement your own site-specific extensions to the
+
    # Dreamwidth Studios open-source code, but you cannot use it on your site
+
    # or redistribute it, with or without modifications.
+
    #
+

Latest revision as of 08:24, 4 August 2009

A few things:

  • I like 80 as the line length limit, not 120. (I can see a point for a longer limit in actual statements, which may be what you meant, but for comments, 80 is (IMO) better.)
  • "&foo;" should probably be rewritten as "foo();" unless there's a reason why it needs to remain that way. (And if there's a reason, it should be explained in code.)
  • There should be a reference for <LJFUNC> function interface definitions. Or a decision to do away with them. If we keep them, adding them should probably be an ongoing clean-up task.

Pauamma 09:04, 14 August 2008 (UTC)

(LJFUNC should die and we should use something that the rest of the world uses, POD. Xb95 today when I wrote this)