-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/26/2012 10:16 AM, Matt Wagner wrote:
On Thu, Apr 26, 2012 at 06:02:00PM +0200, Michal Fojtik wrote:
> On 04/26/12, Maros Zatko wrote: I want to propose this:
>
https://github.com/bbatsov/ruby-style-guide for the general
> discussion :-)
Yes! That's the resource I was thinking of.
This reminds me of one thing I've seen us do inconsistently --
parenthesis for arguments where they're not strictly required.
For example, I prefer: user.update_attribute(:foo, 'bar')
But this is also totally valid: user.update_attribute :foo, 'bar'
It seems that some people try to always use the parens, some try
to never use them, and some (AFAICT) prefer to use them only when
there is more than one argument. The linked style guide suggests
using them when they are part of an internal DSL or considered
"keywords" or accessor methods, but all other method invocations
should use parens. I don't feel too strongly, except that
consistency is nice.
-- Matt
Speaking as someone who has to read this code (and is not super
familiar with it) I would greatly appreciate anything that results in
consistency/making my life easier =).
- --
Kurt Seifried Red Hat Security Response Team (SRT)
PGP: 0x5E267993 A90B F995 7350 148F 66BF 7554 160D 4553 5E26 7993
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJPmamIAAoJEBYNRVNeJnmT7gUP/1QjRPeJdICJUGFxWF36h6sb
atQ9aLYbCoM/TyXzSrakTeOSNjZDXkE+TNL5moqVw2+xBVHIzdxl23MoCrbWe9XE
sEyrkAmgBMc2+VbXCJVnGOgTF5Reje27neUXaH8grobnv4m9NwK4r0HiiDKc/9BR
DWgoRh7B1r6W2ANKPKNUsfPuzW90CzGz+ixMqQNql3PCIbR+RkwLLzL+BUoEbs3m
Fkzp05PLrujjEgNMifXXxNOg3g7SR2TLTYbge0k8EigRjaZiegqinGkv0rDou4Tw
2XoAvBALUp6UZH38M5pqT/iVfLiSiyG49xeg/YP6S6BXP3R8lv3RyNFBwHN6QwKr
cqlCM7DqVBW2skprRZBsBmUeqp2fFEkLVd+5GOVwsjPrq58TubtYrPaq5CNytKHs
xFZ66ngWMzO5pmcjEKDX29snyEQE9ahvimkPnt3xUwUEF8IWwLn1DPKGBj+WHeDs
M25Oe9JIfr6g2u0bV2cnuz247AFQT2y5Zn0OtQKGnyTL/1NpL0URtrEXhnXNk1Nk
9Be5CplTbFKz/LwcGju+p/K/M5Zr4B7lI7mRWVNB7aVSg+8awIh+3hz0M2v250D4
07U733ydzeNS9KMxzleN7S+XNUHuxxRBVEzQE7wtt1IVRyei+ESasig/1L0fUDbo
1sinyIwsnBQ1vdXeFfdL
=mTab
-----END PGP SIGNATURE-----