Having a look at [1] I realized that there seems to be no coding guideline 
regarding column and variable names [2]. In this example there's the field 
'number_next' which IMHO is both hard to read and remember compared to 
something more intuitive such as 'next_number'.

Looking at the source code I see in sale.sale that there's 'total_amount' 
which is clearly an improvement over OpenERP's 'amount_total' but in the same 
sale.sale model there's a field named 'invoices_ignored' instead of 
'ignored_invoices'.

Do you think there should be a coding guideline regarding this?

By the way I highly recommend reading [3], which is a quite insightful and 
stresses the importance of this kind of things: "An API is to the programmer 
what a GUI is to the end-user. The 'P' in API stands for 'Programmer', not 
'Program', to highlight the fact that APIs are used by programmers, who are 
humans."

[1] http://codereview.tryton.org/79002/diff/1/trytond/ir/sequence.py
[2] http://code.google.com/p/tryton/wiki/CodingGuidelines
[3] http://doc.qt.nokia.com/qq/qq13-apis.html

-- 
Albert Cervera i Areny
http://www.NaN-tic.com
Tel: +34 93 553 18 03

http://twitter.com/albertnan 
http://www.nan-tic.com/blog

-- 
[email protected] mailing list

Reply via email to