Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Coding style -- we've never really discussed it
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  24 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeremy D. Miller  
View profile  
 More options Jan 6 2012, 6:19 pm
From: "Jeremy D. Miller" <jeremydmil...@yahoo.com>
Date: Fri, 6 Jan 2012 15:19:02 -0800 (PST)
Local: Fri, Jan 6 2012 6:19 pm
Subject: Coding style -- we've never really discussed it

Folks,

We've never really had a conversation about coding style in the fubu projects.
 The prevailing style is (the arbitrary C# style that I adopted years ago at
ThoughtWorks):

* public members are Pascal cased
* anything non-public (private, internal, protected) is camel cased
* fields are prefaced with _'s -- except in unit tests.  I like the
"theSomething" convention that I picked up from an old TW colleage
* Use {} on all if/then statements unless it's all one line like "if (something)
return;"
* Mostly use the "I" nomenclature for interfaces because everyone understands it

Do we care?  I know it's all arbitrary and consistency is all that's important.

And just so you know, I'm feeling like this guy for even writing this post:
 http://www.nbc.com/saturday-night-live/video/cooking-with-the-anal-re...

What's not negotiable, and I think we all do decent job of this anyway:

* Favor composition over inheritance when you can
* Small classes & methods with cohesive responsibilities (all that SOLID mumbo
jumbo, and not because "of fear of CodeBetter guys," but because it makes things
work out better in the long run)

Jeremy D. Miller
The Shade Tree Developer
jeremydmil...@yahoo.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chad Myers  
View profile  
 More options Jan 6 2012, 6:22 pm
From: Chad Myers <chad.my...@gmail.com>
Date: Fri, 6 Jan 2012 17:22:29 -0600
Local: Fri, Jan 6 2012 6:22 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

+1. I twitch a little at the inconsistency of _ and no_ in tests, but it's
all style and taste and there's no accounting for taste, so it might as
well be that or anything.

-Chad

On Fri, Jan 6, 2012 at 5:19 PM, Jeremy D. Miller <jeremydmil...@yahoo.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dru Sellers  
View profile  
 More options Jan 6 2012, 6:33 pm
From: Dru Sellers <d...@drusellers.com>
Date: Fri, 6 Jan 2012 17:33:02 -0600
Local: Fri, Jan 6 2012 6:33 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

I prefer leaving 'private' keyword off of private items as that is the default for fields and methods.

-d

On Jan 6, 2012, at 5:19 PM, "Jeremy D. Miller" <jeremydmil...@yahoo.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Battersby  
View profile  
 More options Jan 6 2012, 6:45 pm
From: Ian Battersby <ian.batter...@gmail.com>
Date: Fri, 6 Jan 2012 23:45:20 +0000
Local: Fri, Jan 6 2012 6:45 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

I prefer 100% explicitness and consistency, I'm afraid I even turn on StyleCop naming conventions (only) to enforce this - test assemblies too.

.. and yes that even means putting "internal" on a console app ;)

PS. Just my two-penniesworth, I already follow the existing convention of any OSS projects in pull requests.

PPS. I was once labelled "StyleNazi" by a colleague of notable ranting reputation :p

On 6 Jan 2012, at 23:33, Dru Sellers <d...@drusellers.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Dymitruk  
View profile  
 More options Jan 6 2012, 8:15 pm
From: Adam Dymitruk <a...@dymitruk.com>
Date: Fri, 6 Jan 2012 17:15:38 -0800
Local: Fri, Jan 6 2012 8:15 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it
Why not adopt what a large code base that is C# has? Project mono
comes to mind...

--
Adam

http://adventuresinagile.blogspot.com/
http://twitter.com/adymitruk/
http://www.agilevancouver.ca/
http://altnetvan.grou.ps/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ahjohannessen  
View profile  
 More options Jan 7 2012, 9:19 am
From: ahjohannessen <ahjohannes...@gmail.com>
Date: Sat, 7 Jan 2012 06:19:14 -0800 (PST)
Local: Sat, Jan 7 2012 9:19 am
Subject: Re: Coding style -- we've never really discussed it

I like all of those and have tried to follow your style to my best.

One thing I like as well is when doing expressions like this:

blah.Each(p =>
{
    // more than one line

});

I prefer having the { vertically aligned with whatever started the
expression instead of having it like this:

chuck.Each(p =>
                        {
                            // code
                        });

A minor OCD thing :D


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Corey Kaylor  
View profile  
 More options Jan 7 2012, 9:21 am
From: Corey Kaylor <co...@kaylors.net>
Date: Sat, 7 Jan 2012 07:21:41 -0700
Local: Sat, Jan 7 2012 9:21 am
Subject: Re: [fubumvc] Re: Coding style -- we've never really discussed it

My preference is the opposite on that one.

On Sat, Jan 7, 2012 at 7:19 AM, ahjohannessen <ahjohannes...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Battersby  
View profile  
 More options Jan 7 2012, 9:24 am
From: Ian Battersby <ian.batter...@gmail.com>
Date: Sat, 7 Jan 2012 14:24:51 +0000
Local: Sat, Jan 7 2012 9:24 am
Subject: Re: [fubumvc] Re: Coding style -- we've never really discussed it

+1, LOL ;-)

On 7 Jan 2012, at 14:21, Corey Kaylor <co...@kaylors.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chad Myers  
View profile  
 More options Jan 7 2012, 10:01 am
From: Chad Myers <chad.my...@gmail.com>
Date: Sat, 7 Jan 2012 09:01:35 -0600
Local: Sat, Jan 7 2012 10:01 am
Subject: Re: [fubumvc] Re: Coding style -- we've never really discussed it

I don't care either way as long as it is consistent.

Is there a way to have solution-wide formatting settings with vs and/or R#
so that this happens automatically and we don't have to think about it?
On Jan 7, 2012 8:24 AM, "Ian Battersby" <ian.batter...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Arnold  
View profile  
 More options Jan 7 2012, 11:31 am
From: Josh Arnold <rncodep...@gmail.com>
Date: Sat, 7 Jan 2012 10:31:35 -0600
Local: Sat, Jan 7 2012 11:31 am
Subject: Re: [fubumvc] Re: Coding style -- we've never really discussed it

I'm with Corey on this one. Sorry, Alex :p

Sent from my iPad

On Jan 7, 2012, at 8:21 AM, Corey Kaylor <co...@kaylors.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ahjohannessen  
View profile  
 More options Jan 7 2012, 12:13 pm
From: ahjohannessen <ahjohannes...@gmail.com>
Date: Sat, 7 Jan 2012 09:13:23 -0800 (PST)
Local: Sat, Jan 7 2012 12:13 pm
Subject: Re: [fubumvc] Re: Coding style -- we've never really discussed it

:p Dru, JDM, heeelp :D


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ahjohannessen  
View profile  
 More options Jan 7 2012, 12:27 pm
From: ahjohannessen <ahjohannes...@gmail.com>
Date: Sat, 7 Jan 2012 09:27:23 -0800 (PST)
Local: Sat, Jan 7 2012 12:27 pm
Subject: Re: [fubumvc] Re: Coding style -- we've never really discussed it

I bet Josh and Corey have huge monitors :p


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Corey Kaylor  
View profile  
 More options Jan 7 2012, 12:49 pm
From: Corey Kaylor <co...@kaylors.net>
Date: Sat, 7 Jan 2012 10:49:37 -0700
Local: Sat, Jan 7 2012 12:49 pm
Subject: Re: [fubumvc] Re: Coding style -- we've never really discussed it

3 of them yes

On Sat, Jan 7, 2012 at 10:27 AM, ahjohannessen <ahjohannes...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ian Battersby  
View profile  
 More options Jan 7 2012, 1:55 pm
From: Ian Battersby <ian.batter...@gmail.com>
Date: Sat, 7 Jan 2012 18:55:21 +0000
Local: Sat, Jan 7 2012 1:55 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

The only solution I know of that would work for me also (CR user) is StyleCop; happy to pass on the StyleCop config file we use for test assemblies as it disables all but naming conventions.

On 7 Jan 2012, at 15:01, Chad Myers wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Arnold  
View profile  
 More options Jan 7 2012, 2:34 pm
From: Joshua Arnold <rncodep...@gmail.com>
Date: Sat, 7 Jan 2012 13:34:44 -0600
Local: Sat, Jan 7 2012 2:34 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

I'm gonna flip a 180 on you and say that I agree with Alex. I read his msg
on my phone and misunderstood him. I like the braces left aligned

On Saturday, January 7, 2012, Corey Kaylor <co...@kaylors.net> wrote:
> 3 of them yes

> On Sat, Jan 7, 2012 at 10:27 AM, ahjohannessen <ahjohannes...@gmail.com>
wrote:

>> I bet Josh and Corey have huge monitors :p

>> --
>> You received this message because you are subscribed to the Google

Groups "FubuMVC Development Group" group.
>> To view this discussion on the web visit

https://groups.google.com/d/msg/fubumvc-devel/-/VvRwEhsBMoAJ.
>> To post to this group, send email to fubumvc-devel@googlegroups.com.
>> To unsubscribe from this group, send email to

fubumvc-devel+unsubscribe@googlegroups.com.
>> For more options, visit this group at

http://groups.google.com/group/fubumvc-devel?hl=en.

> --
> You received this message because you are subscribed to the Google Groups

"FubuMVC Development Group" group.
> To post to this group, send email to fubumvc-devel@googlegroups.com.
> To unsubscribe from this group, send email to

fubumvc-devel+unsubscribe@googlegroups.com.
> For more options, visit this group at

http://groups.google.com/group/fubumvc-devel?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Corey Kaylor  
View profile  
 More options Jan 7 2012, 2:45 pm
From: Corey Kaylor <co...@kaylors.net>
Date: Sat, 7 Jan 2012 12:45:11 -0700
Local: Sat, Jan 7 2012 2:45 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

Ha, ditto. I was a bit confused on the monitors comment, but thought I
would run with it anyways.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Dymitruk  
View profile  
 More options Jan 8 2012, 3:29 pm
From: Adam Dymitruk <a...@dymitruk.com>
Date: Sun, 8 Jan 2012 12:29:41 -0800
Local: Sun, Jan 8 2012 3:29 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it
Braces alone on a line suck. Less context in patches, bad boundaries
for conflicts, etc.

We have resharper and other tools to tell us what our scope is and
indentation alone is just fine. This is one of the reasons that K&R is
used on a big project like mono.

We've been brainwashed by the crap standard that Microsoft gave us in
MSDN over the last 10+ years for C#.

In addition, I can't stand this:

public property Something
{
   get
   {
       return _something;
   }
   set
   {
       _something = value;
   }

}

really?? 12 lines to do what??

If it's doing nothing, give it the right amount space:

public property Something { get { return _something; } set {
_something = value; } }

one line.

I understand the position of "it's my preference" and all that. We
just have to dig a bit to see why "it's your preference".. maybe it's
just the amount of time I spent in C/C++.. I always thought of B&D as
wasteful and inefficient after using it for a few years.

</rant>

--
Adam

http://adventuresinagile.blogspot.com/
http://twitter.com/adymitruk/
http://www.agilevancouver.ca/
http://altnetvan.grou.ps/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Ashton  
View profile  
 More options Jan 8 2012, 3:37 pm
From: Rob Ashton <robash...@codeofrob.com>
Date: Sun, 8 Jan 2012 21:37:52 +0100
Local: Sun, Jan 8 2012 3:37 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

I don't think most of this stuff really matters - I think the biggest
indicators should be "Can it be read and does it loosely conform to the
general principles of the rest of the project" - stopping at what you use
underscores to represent (or not) and casing for method and variables is
probably the most sane thing you can do.

"And just so you know, I'm feeling like this guy for even writing this
post:"

And so you should! I think if you ask a community what coding guidelines
will be you'll find 1000000 opinions on 10000 different little nitpicks
that different people have (even a small community like this), and you'll
come up with a committee-designed document that scares new people away from
contributing ;-)

Is anything broken right now? You guys having a hard time dealing with the
standards in the code being submitted to Fubu? I haven't seen m(any) posts
on the subject, so I don't know what you're trying to achieve by starting
this discussion ;-)

(Sorry, I read the mailing list regularly even though I'm a complete
Javascript obsessee these days - I wouldn't have replied if Ian hadn't
mentioned me above ;-))

Regards,

Rob


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Dymitruk  
View profile  
 More options Jan 8 2012, 4:53 pm
From: Adam Dymitruk <a...@dymitruk.com>
Date: Sun, 8 Jan 2012 13:53:46 -0800
Local: Sun, Jan 8 2012 4:53 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it
Conflicts are directly affected by the number of lines in context.
Most deal with empty lines properly. So yes, it does matter to a
certain extent.

--
Adam

http://adventuresinagile.blogspot.com/
http://twitter.com/adymitruk/
http://www.agilevancouver.ca/
http://altnetvan.grou.ps/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike O'Brien  
View profile  
 More options Jan 8 2012, 5:25 pm
From: "Mike O'Brien" <m...@mikeobrien.net>
Date: Sun, 8 Jan 2012 17:25:10 -0500
Local: Sun, Jan 8 2012 5:25 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

I agree with Rob that style and conventions should just flow from whats
already out there. Outside of that, any color will do for the bike
shed<http://en.wikipedia.org/wiki/Parkinson's_Law_of_Triviality>
.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Dymitruk  
View profile  
 More options Jan 9 2012, 12:23 am
From: Adam Dymitruk <a...@dymitruk.com>
Date: Sun, 8 Jan 2012 21:23:29 -0800
Local: Mon, Jan 9 2012 12:23 am
Subject: Re: [fubumvc] Coding style -- we've never really discussed it
Looks like Jeremy's question has been "Bike Shedded". We can now move
on to important topics.

--
Adam

http://adventuresinagile.blogspot.com/
http://twitter.com/adymitruk/
http://www.agilevancouver.ca/
http://altnetvan.grou.ps/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy D. Miller  
View profile  
 More options Jan 9 2012, 8:42 am
From: "Jeremy D. Miller" <jeremydmil...@yahoo.com>
Date: Mon, 9 Jan 2012 05:42:01 -0800 (PST)
Local: Mon, Jan 9 2012 8:42 am
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

Hey, all I wanted to know was did anyone care.  All I saw was a whole bunch of
"it's fine, I don't care"

Good enough for me.

________________________________
From: Adam Dymitruk <a...@dymitruk.com>
To: fubumvc-devel@googlegroups.com
Sent: Sun, January 8, 2012 11:23:29 PM
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

Looks like Jeremy's question has been "Bike Shedded". We can now move
on to important topics.

--
Adam

http://adventuresinagile.blogspot.com/
http://twitter.com/adymitruk/
http://www.agilevancouver.ca/
http://altnetvan.grou.ps/

--
You received this message because you are subscribed to the Google Groups
"FubuMVC Development Group" group.
To post to this group, send email to fubumvc-devel@googlegroups.com.
To unsubscribe from this group, send email to
fubumvc-devel+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/fubumvc-devel?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Dymitruk  
View profile  
 More options Jan 9 2012, 2:02 pm
From: Adam Dymitruk <a...@dymitruk.com>
Date: Mon, 9 Jan 2012 11:02:38 -0800
Local: Mon, Jan 9 2012 2:02 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it
I care. But the majority doesn't.

On Mon, Jan 9, 2012 at 5:42 AM, Jeremy D. Miller

--
Adam

http://adventuresinagile.blogspot.com/
http://twitter.com/adymitruk/
http://www.agilevancouver.ca/
http://altnetvan.grou.ps/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jaime Jhon  
View profile  
 More options Jan 9 2012, 2:06 pm
From: Jaime Jhon <jaime.feb...@gmail.com>
Date: Mon, 9 Jan 2012 14:06:49 -0500
Local: Mon, Jan 9 2012 2:06 pm
Subject: Re: [fubumvc] Coding style -- we've never really discussed it

How about method group in lambda arguments....

https://gist.github.com/1584393

I like the later. https://gist.github.com/1584393#file_sample2.cs

Thoughts?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »