2 spaces are suppose to be used instead of tab characters. You usually can set your editor on what to do when tab is pressed.

Brackets should be on the same line, see function declaration of http://drupal.org/coding-standards

(http://drupalcode.org/viewvc/drupal/contributions/modules/force_password... :-{ )

Comments

jaypan’s picture

Status: Active » Closed (won't fix)

I prefer to code this way. I've never agreed with the Drupal coding standard.

adrinux’s picture

Status: Closed (won't fix) » Active

"Rebel! Rebel!" Yeah! Stick it to the man!

Or not, actually. That's not very community spirited Jay. Following the coding standards means that everyone can easily read your code and make patches.

Of course you're perfectly free to do what you want, and go live in your own little sandbox but if you're intent on going your own way why even bother putting your module in drupal crontrib?

skwashd’s picture

Category: feature » bug

Complying with coding standards shouldn't be an optional "feature" of a contrib module, marking this as a bug.

jaypan’s picture

Status: Closed (won't fix) » Closed (fixed)

"Rebel! Rebel!" Yeah! Stick it to the man!

Or not, actually. That's not very community spirited Jay. Following the coding standards means that everyone can easily read your code and make patches.

Of course you're perfectly free to do what you want, and go live in your own little sandbox but if you're intent on going your own way why even bother putting your module in drupal crontrib?

If you feel you aren't getting your money's worth, I suggest refusing to use the product.

jaypan’s picture

Status: Active » Closed (won't fix)
afreeman’s picture

Status: Closed (fixed) » Needs work

I have a competing suggestion: since you're clearly not interested in maintaining this module why not hand it over to someone who will?

Anonymous’s picture

@afreeman: That's not an accurate statement. Jay Matwichuk is actively maintaining the module, and there is lots of activity. http://drupal.org/project/cvs/693192

As far as I know, Drupal contrib project maintainers are not obligated to follow Drupal's coding standards. However, the cost of not following coding standards is that it's harder for other people to make patches. When multiple people contribute to a useful module, this is a beautiful thing that should be encouraged.

But cooperation isn't cost free either, and Jay gets to set his own priorities in working and contributing. Please don't turn this issue into a flame war. Please don't harass module maintainers.

Jay: I do encourage you to make some adjustments for the sake of fostering cooperation. hefox's expertise is very great on Drupal and hefox's willingness to help and contribute are second to none.

jaypan’s picture

Thank you for the balanced comments.

I do actively maintain this module. Coding and maintaining this module is something I do purely to give back to the community in my own way as a person. I don't ask for anything, and if people don't want to use my module because the code is laid out bad, then I have no hard feelings whatsoever, and can understand where they are coming from.

When I'm working on a paid project, I meet whatever standard my client wants. But this issue is simply a matter of style. It makes no difference to the execution of the code whether code is laid out the with two spaces, a tab, or something else. All that it changes is the way of looking at the code. I can work with pretty much whatever coding standard there is for a project, and I've worked with a number of different code standards. I don't mind switching. But when I'm on a project that I choose to put time and energy into maintaining on a regular basis, I will choose the coding standard that works for me, seeing as I am the one who spends the most time on it. I take a lot of pride in trying to get my code to run as cleanly and efficiently as possible, writing code that is secure and works within the Drupal APIs.

I'm not looking for money here. I put together this and other modules in order to give back to the community in my own way. I don't ask anyone for anything, not even to use my modules. It's there as is, and if people think that it is something that they want to use, then I am happy to support it. But if it's not something they want to use, as is, then they are very free to use any other solution, and I will not be hurt whatsoever.

If someone wants to hire me to write some code for them however, then I am happy to meet whatever standard of code you deem necessary for the project.

jaypan’s picture

Status: Needs work » Closed (won't fix)
tim.plunkett’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new84.7 KB

The CVS Application specifically states that modules must follow the coding standards.

Jay, you say that you don't mind switching if a project dictates a coding standard, but will use your own for your own work. Logically, Drupal is the project you're working on, and it does dictate a coding standard. Your project becomes a Drupal project when you commit it to Drupal CVS.

This patch should do the trick. I'm not 100% sure, since those multi-line db_query's were really strange.

jaypan’s picture

Status: Needs review » Closed (won't fix)

Sorry, I appreciate your effort, but it's not going to happen.

gerhard killesreiter’s picture

Status: Closed (won't fix) » Reviewed & tested by the community

Coding standards are a very useful convention. They make coding together much easier.

If you prefer not to code together with the Drupal community, you maybe want to consider to not use the services that drupal.org offers.

jaypan’s picture

Status: Reviewed & tested by the community » Closed (won't fix)
sime’s picture

I'm with @bangpound here. Rules shouldn't be followed for their own sake. If the author is passionate about his code then it's 1000x better than someone who doesn't pay attention to secure code or someone (like say, me) who has projects getting dusty.

I looked at Jay's code. The first thing I notice is it's very neat. His issue queue is very tidy too. His code has less comments than I would like and isn't Drupal convention. All in all, he is clearly making an effort doing something that he loves and there is a nett benefit to Drupal. All of this adds up to something real and human folks.

(To think I came here mourning after @DRUPALHULK)

gerhard killesreiter’s picture

Status: Closed (won't fix) » Reviewed & tested by the community

Dude, you totally overstepped your bounds here. I've disabled your cvs access since you are apparently not worthy of it.

jaypan’s picture

Fair enough.

Though that being said, my original code that I submitted to get CVS access was written the same way - and it was accepted. You people seem to have a bit of a consistency issue there. You should probably figure out the rules and try to apply them uniformly.

Anyways, I enjoyed contributing for Drupal, and apparently my contributions are not wanted or needed anymore. Thank you to those who supported me, and I apologize to those for whom I won't be able to apply submitted fixes.

greggles’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

I totally disagree. If we're going to make this a policy it has to become a policy before we execute on it arbitrarily.

Otherwise, we should enforce this new policy universally and start with those in this thread.

I've re-enabled Jay's cvs account.

greggles’s picture

Jay - we crossposted a bit. Please don't let the overly aggressive (and frequently hypocritical) few give you a bad experience of the whole Drupal community.

jaypan’s picture

Status: Closed (won't fix) » Reviewed & tested by the community

I've opened a thread in the webmaster queue to ask why the rules are not being applied consistently: http://drupal.org/node/891044

jaypan’s picture

Thank you Greggles. We cross-posted again!

But before someone decides to come in and cut me off once again, can you guys maybe discuss it amongst yourselves in that place where these discussions take place, and come up with a final decision? At the moment, it seems a bit up in the air - I have one mod? admin? (I don't really know how it works here) saying I'm out of line, and another saying I am in line, so it would be nice for an official decision on the matter.

If the formatting of my code is deemed to be more important than my contributions to Drupal, I can understand, and I will understand if my CVS access is cut off. But I personally enjoy contributing to the community from which I receive so much, and definitely would like to continue in the future as I have until now.

dave reid’s picture

Either way, flat-out rejecting someone's patch to help bring a module up to coding standards is a jerk move. Contributing should not be a one-way street of only giving out code. You should be able to consider valid suggestions and improve as well.

greggles’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Dave, that is of course an important difference between how Jay behaves and how others behave: accepting a patch to fix coding standards. But the idea that we're going to block people who don't follow coding conventions would have serious repercussions. For example, FGM (osinet) and merlinofchaos have both deviated from the coding standards. Do we plan to block their contributions? Earl's difference was later adopted as the standard of course, and this shows why we shouldn't be so strict: diversity sometimes helps us find better ways.

The other thing is, Jay was very up front from the beginning that this is not his style. So, marking the patch as won't fix was just being consistent with what he said he would do. I consider posting a patch to a "won't fix" issue to be a bit presumptuous.

dave reid’s picture

Right I do disagree with the decision to block CVS (never said I did). If someone can't follow standards or has no desire to maintain a module, then it's my understanding there is not much that can be done unless the project creator accepts co-maintainers (again requires cooperation) or the abandoned project procedure is followed and a project is transferred to someone else that cares.

tim.plunkett’s picture

For the record, I wasn't trying to be a smart-alec or presumptuous by posting that patch. I posted it only in the hopes that he won't-fixed it because he didn't feel like making any changes, and I hoped if I did the leg work, he might decide to commit it after all.

roball’s picture

This module's author refuses to respect Drupal's coding standards, refuses patches that would harmonize the code with the standards, and refuses #739902: Request for co-maintainer access co-maintainership, so for me this is not the way to go with in a community. If I have read this thread before, I would have saved time to install, check and finally remove this module from al my sites.

jaypan’s picture

I respect that. That's your right.

It's never been a requirement to code according to the 'Drupal standards'. I chose to share this code with the community, coded to my own personal standard. I also choose other ways to share with the Drupal community. You may not agree with the my manner of sharing, but it's my choice to share with the community in the manner that I do. With git, you can take my code and fork it yourself, and use it however you would like. There is no requirement to continue with my version of the code.

roball’s picture

Title: Follow coding standards for spaces, bracket placement » This module does not respect Drupal's coding standards
Status: Closed (won't fix) » Active

Your opinion is clear. It may be fine for you, but for others maybe not. Thus, I am asking you if you are willing to add a link to this issue on your project home page so others know the policy of this module?

jaypan’s picture

Status: Active » Closed (won't fix)