Difference between revisions of "Talk:Programming Guidelines"
From Dreamwidth Notes
m (moved Talk:Dev Programming Guidelines to Talk:Programming Guidelines: Remove 'Dev' from beginning, for easier finding) |
|
(No difference)
|
Revision as of 06:22, 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)
dw-nonfree suggested header
#!/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. #
suggested dw-free header for overhauled LJ code
Existing/originally LJ code with major changes should use this header (With the "no parent code remains" dependent on how has been changed):
#!/usr/bin/perl # # LJ::Setting::NCTalkLinks # # LJ::Setting module for choosing whether or not to add ?nc=XX to the # end of entry links, forcing the link color back to unread if the # comment count changes. # # Authors: # Denise Paolucci <denise@dreamwidth.org> # # Copyright (c) 2009 by Dreamwidth Studios, LLC. # # The original version of this program was authored by LiveJournal.com # and distributed under the terms of the license supplied by LiveJournal Inc, # which can be found at: # http://code.livejournal.org/trac/livejournal/browser/trunk/LICENSE-LiveJournal.txt # # This program has since been wholly rewritten by Dreamwidth Studios. # No parent code remains. # # This program is free software; you may redistribute it and/or modify it under # the same terms as Perl itself. For a copy of the license, please reference # 'perldoc perlartistic' or 'perldoc perlgpl'. #
Existing/originally LJ code with minor changes may get a header, once we figure out an appropriate one.
112.200.30.72 01:20, 4 July 2009 (UTC)