Achim,
On Wed, Mar 31, 2010 at 5:34 AM, Achim Hoffmann <[email protected]> wrote:
> Hi Taras,
>
> I guess you'll unintentionally start a philosophic discussion here.
>
> !! - afd
> !! - allowedMethods
> !! - archiveDotOrg
> !! - bing_spider
> !! - content_negotiation
> !! ...
> !!
> !! We can see 2 different naming styles here.
> !! Also in code we can see the same: some methods called as
> !! foo_action_ff() and some in camelcase convention.
> !! As I think it's of course not so important as other bugs in w3af but
> !! also not good =)
> !!
> !! What I suggest is to start writting "W3AF Dev Guide" and follow it.
> !! It also will help new developers of w3af and w3af plugins to start
> !! quickly. I can prepare lite draft version.
> !!
> !! What do you think about it?
>
> If you think OO, namings would be something like:
>
> Object{}; // the Object object
> Object.create(); // Object create method
> Object.value; // a private/public constant/variable in Object
>
> Things may become crazy if the "object" is an interface:
>
> Methods{};
> Methods.initialize();
> Methods.create(Object);
>
> Note: replace Object and Method to whatever word you like.
>
> Now compare to functional/procedural namings:
>
> object{}; // the object object
> object_create(); // object create method
> object_delete();
>
> methods{};
> methods_create(object);
> methods_delete(object);
>
> Some people prefer a "natural language" style naming:
>
> object{};
> methods{};
> create_object();
> create_method(object);
> delete_object();
>
> ... and so on. You get the idea, do you?
> IMHO, each has it's pros and cons.
>
> Traditionally macro names have been written in all uppercase, to
> distinguish pre-compiler constants from other constants. But often
> constants are written in all uppercase too (accidently?).
> Modern developers prefer camle case in strong belief that it is
> better readable/understandable for humans.
> Try: KIIl K1ll kIll ki11 z00 z0O zOO
>
> Just my 2 pence.
> Achim
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> W3af-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/w3af-develop
>
When I started the project I used camelCase everywhere. Now, I'm
starting to prefer underscore_separated names for everything. The code
is now a mixture of both, but the plugin writers guide should be all
about underscore_separated :)
--
Andrés Riancho
Founder, Bonsai - Information Security
http://www.bonsai-sec.com/
http://w3af.sf.net/
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
W3af-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/w3af-develop