The Code Style initiative

204 views
Skip to first unread message

Javier Gómez

unread,
Jan 28, 2014, 12:39:29 PM1/28/14
to joomla-...@googlegroups.com

Hi all,


The Production Leadership Team is committed to make the Joomla CMS fulfil all our Code Style standards http://joomla.github.io/coding-standards/  (see also http://docs.joomla.org/Coding_style_and_standards)


Standardisation is important for many reasons, some of them are:

  • programmers can go into any code and figure out what's going on

  • new people can get up to speed quickly

  • people new to PHP are spared the need to develop a personal style and defend it to the death

  • people new to PHP are spared making the same mistakes over and over again

  • people make fewer mistakes in consistent environments

  • automated tools can check the code


For all these reasons the Production Leadership Team wants to launch a challenge to the entire Joomla community: “Let’s fix all the remaining Code Style issues in Joomla 3.2 together!”


If you want to help we want you to:


This could be an example of a pull request:
https://github.com/joomla/joomla-cms/pull/2694


All contributors will appear at the Contributors page in Github: https://github.com/joomla/joomla-cms/graphs/contributors


IMPORTANT NOTE: please fix no more than one code style issue per pull request. That will make it much easier for the CMS maintainers to merge your contributions.


Thanks for your participation

^_^


Robert Vining

unread,
Jan 28, 2014, 1:14:03 PM1/28/14
to joomla-...@googlegroups.com
Awesome initiative! Thanks Javier for sharing this here, and thanks PLT for caring about our code!

Will try to make a little room on our schedule for our team to dive into this!

Achal Aggarwal

unread,
Jan 28, 2014, 1:29:49 PM1/28/14
to joomla-...@googlegroups.com
How to group them? I mean, number of modification in a PR so that it will be easily to review for a committer?

Matt Thomas

unread,
Jan 28, 2014, 1:44:44 PM1/28/14
to joomla-...@googlegroups.com
Hi Achal,

Typically, I think most pull requests are limited to one style fix. This makes it easy for people reviewing them. Keeping it limited to one file, or extension, also helps keep it easier to test.

--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send an email to joomla-...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/groups/opt_out.

Javier Gómez

unread,
Jan 28, 2014, 2:34:20 PM1/28/14
to joomla-...@googlegroups.com
yes please: no more than one code style fix per pull request. Fix one by one. Is much more useful 10 pull with 1 fix each than 1 pull with 10 fixes.

Thanks :)

Seth Warburton

unread,
Jan 28, 2014, 4:47:34 PM1/28/14
to joomla-...@googlegroups.com
This is fantastic Javier!

Can I suggest that we should consider extending this beyond PHP? I'd dearly love to see such an initiative extended to cover the html, javascript, xml, LESS and CSS as well. Joomla isn't built only with PHP.

Best regards,


Seth

Matt Thomas

unread,
Jan 28, 2014, 5:23:32 PM1/28/14
to joomla-...@googlegroups.com

+1 Seth. Great idea!

Sent from mobile. Please pardon any typos or brevity.

Peter van Westen

unread,
Jan 28, 2014, 8:42:53 PM1/28/14
to joomla-...@googlegroups.com
I'm working my way through the admin components at the moment, correcting basic stuff, like: adding missing whitespace, correcting indentation, adding missing newlines.

Chad Windnagle

unread,
Jan 28, 2014, 8:48:49 PM1/28/14
to joomla-...@googlegroups.com
Great initiative!

A potentially helpful resource I just saw on code style, reuse, best practices that I found really interesting: http://protalk.me/your-code-sucks-lets-fix-it

Hope someone finds it useful. 


On Tuesday, January 28, 2014, Peter van Westen <peterva...@gmail.com> wrote:
I'm working my way through the admin components at the moment, correcting basic stuff, like: adding missing whitespace, correcting indentation, adding missing newlines.

On Tuesday, 28 January 2014 18:39:29 UTC+1, Javier Gómez wrote:

Hi all,


The Production Leadership Team is committed to make the Joomla CMS fulfil all our Code Style standards http://joomla.github.io/coding-standards/  (see also http://docs.joomla.org/Coding_style_and_standards)


Standardisation is important for many reasons, some of them are:

  • programmers can go into any code and figure out what's going on

  • new people can get up to speed quickly

  • people new to PHP are spared the need to develop a personal style and defend it to the death

  • people new to PHP are spared making the same mistakes over and over again

  • people make fewer mistakes in consistent environments

  • automated tools can check the code


For all these reasons the Production Leadership Team wants to launch a challenge to the entire Joomla community: “Let’s fix all the remaining Code Style issues in Joomla 3.2 together!”


--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send an email to joomla-...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/groups/opt_out.


--
Regards,
Chad Windnagle

Matt Thomas

unread,
Jan 28, 2014, 9:10:53 PM1/28/14
to joomla-...@googlegroups.com
Thanks Chad! Will check that out.

It's also worth noting that you can also contribute to the Joomla Coding Standards Manual by making a pull request against https://github.com/joomla/coding-standards/tree/gh-pages


ssnobben

unread,
Jan 29, 2014, 4:46:49 AM1/29/14
to joomla-...@googlegroups.com
Hi Javier,

thanks for a very good initiative.

I was thinking of something similar that also describe the dev process of Joomla dev method and maybe that could be included/described with an overview picture in the introduction to about how the Joomla dev process looks like.  https://groups.google.com/forum/#!topic/joomla-dev-cms/tem_pobPIeU

rgds

Roberto Segura

unread,
Jan 29, 2014, 6:22:19 AM1/29/14
to joomla-...@googlegroups.com
Just a note to avoid confusion. To avoid killing the repo commit stats we are going to merge all the code style commits per day & author.

Example: all today's code style PRs from Peter will be merged tonight in a single commit. This way we ensure that commit contributors stats are almost fair and we don't see a git history with 300 code style commits

Thanks all for your contributions!!



2014-01-29 ssnobben <ssno...@hotmail.com>

NoNumber (Peter van Westen)

unread,
Jan 29, 2014, 11:31:27 AM1/29/14
to joomla-dev-cms
So is it ok to create the PR per file/issue like I have been doing? Or should I combine fixes into larger PRs if I do any more?


--
You received this message because you are subscribed to a topic in the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/joomla-dev-cms/3nosYaSl3Tk/unsubscribe.
To unsubscribe from this group and all of its topics, send an email to joomla-dev-cm...@googlegroups.com.

Roberto Segura

unread,
Jan 29, 2014, 12:34:29 PM1/29/14
to joomla-...@googlegroups.com
What you were doing is ok. I just wanted to notice that commits are going to be squashed before getting in so nobody gets confused.

Thanks for contributing!


2014-01-29 NoNumber (Peter van Westen) <pe...@nonumber.nl>

Don Gilbert

unread,
Jan 29, 2014, 12:46:30 PM1/29/14
to joomla-...@googlegroups.com
While I understand your point there Seth, and fully agree with it, it won't really work for us to do a Code Style Initiative for the other languages involved, as we do not have a published style guide for those languages, unless of course I'm missing something.

Chris Davenport

unread,
Jan 29, 2014, 12:53:29 PM1/29/14
to Joomla! CMS Development
Of course, it would be great if you could help create coding style guidelines for those languages.  Even more so if the compliance tests can be automated.

Chris.


--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send an email to joomla-...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/groups/opt_out.



--
Chris Davenport
Joomla Production Leadership Team
Reply all
Reply to author
Forward
0 new messages