From: Michael Widenius Date: March 8 2009 1:26pm Subject: Re: MySQL University Session: Good Coding Style follow up List-Archive: http://lists.mysql.com/internals/36361 Message-Id: <18867.51053.274301.648564@narttu.askmonty.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! >>>>> "Konstantin" == Konstantin Osipov writes: Konstantin> * Michael Widenius [09/03/06 19:22]: Konstantin> I agree. How would you, however, enforce a single style in a Konstantin> distributed organization without a single leader, like ours? >> I am still working on the MySQL code base and at least I will enforce >> the current coding style on the MySQL-Maria distribution. >> I don't see >> why the MySQL group at Sun should not be able to do the same on their >> code base. Konstantin> Because not everybody agrees with the current coding style, Konstantin> and some roles and responsibilities are now missing. You can never find a coding style that everyone agrees with. There is however many resons to keep and enforce the current MySQL coding style: - It's a style that well fits with other common code styles for other projects. - It's resonable well documented and a major part of the code is following it, more or less. - You can't esily change the coding style without causing a LOT of problems with merges between MySQL releases. - The other MySQL forks (Drizzle and MariaDB) are continuing to use and extend the current coding style, but with one coding style trough the whole projects. - It's critical to only have one coding style within a project; Otherwise the code gets harder to read and move around. - Allowing different teams to have different coding styles will never work. Too many variables to take care of: - What happens when team member change or move around - What to do when code moves around or is reused. - What about bug fixers that move around in the code and have their own idea about coding style? - Hard to document coding style per project - Will cause problems for contributiors which coding style to follow when doing new code or extending old code. - Will make it harder to work with the code for people that uses the coding stlyle for their advantage to find things (for example with grep) Roles and responsibility should be given by ones that are doing development; Now it's not anymore only the MySQL database group that are doing development on the MySQL code base and the roles are changing and now roles emerging. We need to ensure that everyone that are participation are part of the decision making. Konstantin> In the proposal, I suggest that a single module always follows a Konstantin> single style. sql/ is mainly runtime and the optimizer. I Konstantin> certainly hope that we will be able to follow a single style. This comes only from the fact that there hasn't been a true leader for the MySQL server group for some time. You should follow the example of MariaDb and Drizzle where we have strong leaders... >> Having different coding styles per team is not something that would >> work in the long term; This is especially confusing when team moves to >> do different things in other parts of the server. It's also hard for >> anyone who wants to contribute code to the MySQL project. Konstantin> I agree. It seems that all server tech leads also accept that we Konstantin> need a single style now, especially after this thread. Regards, Monty