______________________________
Gary Glass
http://ShutterGlass.com
http://OnlyBegotten.com
--
You received this message because you are subscribed to the Google Groups
"Joomla! Framework Development" group.
To post to this group, send an email to
joomla-dev...@googlegroups.com.
To unsubscribe from this group, send email to
joomla-dev-frame...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/joomla-dev-framework?hl=en-GB.
Michael Babker
Owner, FLBab.com
³You can¹t connect the dots looking forward; you can only connect them
looking backwards. So you have to trust that the dots will somehow connect
in your future. You have to trust in something ‹ your gut, destiny, life,
karma, whatever. This approach has never let me down, and it has made all
the difference in my life.² - Steve Jobs
Regards,
Phill Brown
M 04 2481 9754
Bathurst Software Solutions
-------------------------------------------------------------------------------------------------------------------
However my preference is definitely not to worry about aligning them
anymore (I'm with you Phill). We have sniffs in place to scan
docblocks but for more than that I can't think of an easy, intuitive
way to approach it that doesn't tie us in knots or personal
preference.
@Gary, there are a couple of things we rely on. One is automated
testing and that, hopefully, covers most of the bases in terms of "is
the API doing what it is supposed to". Of course that can only go so
far so each pull request is eye-balled by one or more of the platform
maintainers and, hopefully, other people interested in the changes.
Unfortunately that still doesn't mean there won't be problems because
it's hard to tell if regression is introduced downstream, such as in
the Joomla CMS, not to mention that sometimes you only find odd
problems when you use something in practice. Ideally we need to get
the CMS project set up so that it is pulling a copy of the framework,
probably nightly, and running its suite of system tests. That should
be able to report back any obvious glitches sooner rather than later.
Does that answer the question or is there something else you had in mind?
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers
1. Do all non-private members have phpdoc comments?
2. Is the commenting correct? Does it generate correct PHPDocs? Are all parameters, return values, etc. commented?
3. Is all complex or non-obvious logic commented?
5. Is the logic as simple as it can be?
5. Are all coding standards enforced?
6. Are Joomla patterns consistently implemented?
7. Are methods short?
8. Are abbreviations minimized and consistent?
9. Do PHPDocs include examples?
10. Are unit tests thorough?
...
n. If all non-optional critiques have not been addressed the code should not be merged to production.
And so on. You'd want to have a comprehensive checklist.
Code reviews are mostly about the things that automated testing and linting tools can't catch. But you definitely still want to use those tools too!
I recommend using a code review tool. There are various free and/or open source tools. At work I use Crucible, which isn't free.
> Definitely something else. Good professional-quality code reviews include things like:
> [...]
> n. If all non-optional critiques have not been addressed the code should not be merged to production.
> And so on. You'd want to have a comprehensive checklist.
Would be great, if we reached that level of quality assurance.
> I recommend using a code review tool. There are various free and/or open source tools. At work I use Crucible, which isn't free.
Do you have examples of good OS tools?
Regards,
Niels
--
| http://www.kolleg.de · Das Portal der Kollegs in Deutschland |
| http://www.bsds.de · BSDS Braczek Software- und DatenSysteme |
| Webdesign · Webhosting · e-Commerce · Joomla! Content Management |
------------------------------------------------------------------
It’s just a start, of course, off the top of my head. (Can you tell I’ve done a few code reviews?)
The first one, Rietveld, looks promising. It appears to be backed by Google.
______________________________
Gary Glass
http://ShutterGlass.com
http://OnlyBegotten.com
-----Original Message-----
From: joomla-dev...@googlegroups.com
[mailto:joomla-dev...@googlegroups.com] On Behalf Of Niels Braczek
Sent: Saturday, October 08, 2011 11:41 AM
To: joomla-dev...@googlegroups.com
Subject: Re: [jframe] Coding standards request
On 08.10.2011 14:18, Gary Glass wrote:
> Definitely something else. Good professional-quality code reviews include
things like:
> [...]
> n. If all non-optional critiques have not been addressed the code should
not be merged to production.
> And so on. You'd want to have a comprehensive checklist.
Would be great, if we reached that level of quality assurance.
> I recommend using a code review tool. There are various free and/or open
source tools. At work I use Crucible, which isn't free.
Do you have examples of good OS tools?
Regards,
Niels
--
| http://www.kolleg.de . Das Portal der Kollegs in Deutschland |
| http://www.bsds.de . BSDS Braczek Software- und DatenSysteme |
| Webdesign . Webhosting . e-Commerce . Joomla! Content Management |
------------------------------------------------------------------
> The only tool I've used is Crucible. But here's something I googled:
> http://ostatic.com/blog/open-source-code-review-tools
Thank you, that page is a good starting point.
Seems like I've to do some investigations...
Regards,
Niels
--
> Seems like I've to do some investigations...
Just stumbled upon
http://source.android.com/source/life-of-a-patch.html. It shows the
workflow using Gerrit, a web-based code review tool, which integrates
nicely with Git.
http://www.atlassian.com/software/crucible/pricing.jsp
__________________________
Gary Glass
On 8 October 2011 22:18, Gary Glass <ga...@mccull.org> wrote:
>
> 1. Do all non-private members have phpdoc comments?
We actually required private methods and properties to be fully
documented. You still have to work out what they do if you aren't the
author :)
> 2. Is the commenting correct? Does it generate correct PHPDocs? Are all parameters, return values, etc. commented?
We don't check the generation but we do check comments have been
written and Code Sniffer also does an automated test.
> 3. Is all complex or non-obvious logic commented?
Our CI server does a test for this but our priority has been getting
the Code Sniffer warnings down.
> 5. Is the logic as simple as it can be?
If it's well tested, that usually follows. Unfortunately this can be
arbitrary and spending too much time on it can use up valuable
volunteer time.
> 5. Are all coding standards enforced?
PHP CodeSniffer
> 6. Are Joomla patterns consistently implemented?
Probably something for group review as Elin suggests.
> 7. Are methods short?
Messiness detector dows a report for this.
> 8. Are abbreviations minimized and consistent?
Good thought.
> 9. Do PHPDocs include examples?
If the are short I think that's fine, but we have a repo for more
complex examples.
> 10. Are unit tests thorough?
Code coverage reporting already helps with that.
Our CI server is built on Jenkins.
> Seems like I've to do some investigations...
Look at this article:
http://benjamin-meyer.blogspot.com/2008/08/code-review-should-be-free.html
It explains how to use GitHub for code review (at the very end of the
article), and also covers alternatives.
__________________________
Gary Glass
These are important. Reviewers should also be thinking about those things.
--
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-framework/-/k-iZ1plG5nkJ.
I would like to help with docs too. I'm no framework expert but I am a writer. I think documentation is Joomla's weakest link. I cannot emphasize enough how vital documentation is to improving the product and extending it's reach.
__________________________
Gary Glass
> --
> You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
The first is through the compilation of a "programmers manual" and
this can be found in /docs/. The file format it Docbook and there are
a number of tools around to help you edit them. I use XML Mind myself.
The second is by way of example, so if you have some good examples you
want to share, shoot me a pull request on this repo:
https://github.com/joomla/joomla-platform-examples
I suggest you open up a new thread if you want to discuss documentation more.
Regards,
Andrew Eddie
http://learn.theartofjoomla.com - training videos for Joomla 1.7 developers