Hello koha-devel, I've put online the first of the coding guidelines [1]. I've started with SQL queries. I want your feedback about what I've written. Concerning inserts and updates, I propose two new functions mass_inserts and mass_updates (that I have already written in PHP, easy to port in Perl). [1] http://wiki.koha.org/doku.php?id=en:development:codingguidelines Bye -- Pierrick LE GALL INEO media system
Pierrick LE GALL a écrit :
Hello koha-devel,
I've put online the first of the coding guidelines [1]. I've started with SQL queries.
I want your feedback about what I've written. Concerning inserts and updates, I propose two new functions mass_inserts and mass_updates (that I have already written in PHP, easy to port in Perl).
I think you write very interesting things, very precise. The problem being we already have 300 000 lines of code ! so, I think we should split the rules in 2 parts : - rules that have to be followed for new code, and fixed in old code when someone spend time to do it. But it's not urgent - rules that have to be followed for new code, and existing code MUST be MODIFIED ASAP. Modifying it for Koha 3.0 is a priority. I also think we should let some freedom to developpers. Although I agree Select borrowers.*,categories.category_type from borrowers left join categories on borrowers.categorycode=categories.categorycode where cardnumber=? on the same line is poor, I think too precise rules won't be followed by anyone strictly. so we should have "mandatory rules" and "suggested rules". for example : I would follow "UPCASE for reserved words" but "probably not 2 spaces ..."[*]) [*] not because i'm against this rule. but because I would probably forget it most of the time ! -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
On Thu, 01 Jun 2006 11:35:34 +0200 Paul POULAIN <paul.poulain@free.fr> wrote:
I think you write very interesting things, very precise.
That was the goal, I suppose :-) Given many details on how to write code, developers can concentrate on the most interesting part of coding: design and implementation.
The problem being we already have 300 000 lines of code ! so, I think we should split the rules in 2 parts [...]
Of course, there's no big hurry to apply rules for existing code. These guidelines are mainly for the code to be written in the future.
I also think we should let some freedom to developpers.
Of course. The guidelines are propositions. Take what you want from it. The more you take, the best it is :-) (once we agree on the rules to keep). Bye -- Pierrick LE GALL INEO media system
Pierrick LE GALL a écrit :
On Thu, 01 Jun 2006 11:35:34 +0200 Paul POULAIN <paul.poulain@free.fr> wrote:
I think you write very interesting things, very precise.
That was the goal, I suppose :-) Given many details on how to write code, developers can concentrate on the most interesting part of coding: design and implementation.
The problem being we already have 300 000 lines of code ! so, I think we should split the rules in 2 parts [...]
Of course, there's no big hurry to apply rules for existing code. These guidelines are mainly for the code to be written in the future.
yes & no : I think the code MUST be cleaned for some rules. Like : API naming (Add... or New... or Create...), variable naming... Where the code is poorly readable by someone not involved in Koha for 3 years in fact ;-) -- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
participants (2)
-
Paul POULAIN -
Pierrick LE GALL