Re: What's up with braces?

2012-06-28 Thread Michael Minutillo
if(blaBla)
  InitializeThisBecauseWeForgotSomething();
else
  WeNeedToDoSomethingElseInHere();

On Fri, Jun 29, 2012 at 2:36 PM, Wallace Turner wrote:

>  comments??? are you feeling ok today mate??
>
>
> On 29/06/2012 2:32 PM, Corneliu I. Tusnea wrote:
>
> The main reason I like the brace on the next line is because I generally
> use that line for a comment explaining that branch of the code.
> For a function is not that relevant but for an if or for statement is
> becomes relevant:
>
>  if ( bla bla )
> { // We need to initialize this because we forgot or something on those
> lines
>  ... more code here
> }
> else
> { // we need to do something else in here
> ... and there goes more code ...
> }
>
>  Squashing the brace on the same line as the statement was ok when we
> could only see 40 lines but now with FullHD screens just feels a "visual
> optimization" that has no reason anymore.
>
>  Corneliu.
>
>
> On Fri, Jun 29, 2012 at 1:26 PM, Greg Keogh  wrote:
>
>>  So Resharper prefers vertical aligned braces (which I have
>> traditionally used). Now we have a schism because most of the sample code I
>> see lately and the Framework design guidelines use indented braces. Which
>> authority do we believe or follow?
>>
>>
>>
>> I was thinking that I must prefer vertical braces because I like visual
>> symmetry and less clutter. Although the right align braces only add a tiny
>> amount of extra clutter on a line they do disturb the symmetry.
>>
>>
>>
>> public void FooBar() {
>>
>>   Something();
>>
>> }
>>
>>
>>
>> Some reputable books I have use vertical braces for namespace and class
>> definitions, but indented ones for functions and properties. Go figure?!
>>
>>
>>
>> Maybe F# has the answer where the actual indentation is more important
>> and there is little need for block delimiters.
>>
>>
>>
>> Greg
>>
>>
>>
>
>
>
>


Re: [OT] It's not Friday, but I've had a tough last 3 weeks ...

2012-06-28 Thread Bec Carter
Haha I have one on the line now, had him for over 20 minutes. I will
stretch this out for hours..

On Wed, Jun 13, 2012 at 12:42 PM, mike smith  wrote:
> On Thu, Jun 7, 2012 at 8:38 PM, Ian Thomas  wrote:
>> As a follow-up –since it is nearly Friday now – I thought this was a very
>> analytical and almost cruel response to our hard-working friends in the
>> (mainly) off-shore call centres. After all, they’re only trying to earn a
>> quid (or rupee), and some of them may be better educated than us and earning
>> very little for their education and the sacrifice to get it.
>>
>>
>>
>> I know their drill, and have the process down pat with these guys.
>>
>> I did this several months ago, and managed to keep them on the phone for
>> about 50 minutes playing as a dumb end user.
>>
>> I even allowed them remote access to a sandboxed VM, and recorded the screen
>> session. They get you to go to run and type “inf virus”. It opens the
>> C:\Windows\inf and they tell you that each of the files listed is a virus J
>> Next, they took remote control of the VM using Citrix GoToAssist, and opened
>> the Windows System event log, and said that everything with a red x is a
>> virus. I threw them because I cleared the System event log prior and it was
>> only informational messages displayed! So the guy stumbled, and said because
>> there was more than 20 informational events, that it was a virus.
>
> With the comments recently about OS versions, I'd be tempted to throw
> them a version of Win3.1, or Metro...
>
>>
>> Classic… I had to help them along with the scam because they were so bad at
>> it.
>>
>> Following on, the rest of the scam is to download a their software from
>> amazon, for around $300 or so to fix the problem, at which point I kept them
>> going on in circles.
>>
>> They caught on at this stage, and after speaking to about 4 different people
>> they realised they weren’t getting anywhere with this “dumb arse” end user J
>>
>> I traced their sources, IP addresses logged, and the screen recorded.
>>
>> Submitted to AFP with the evidence – got a phone call from the AFP a week or
>> so later, saying they traced it back to a service run out of Sydney, but was
>> VoIP and sent offshore from there, so they couldn’t trace it any further.
>>
>
> Damn!
>
>> I think I have done my civic duty J
>>
>> Usually, I just resort to telling them (the helpful computer maintenance
>> guys) to go away, and then I end the phone call.
>>
>> I have more problem with (local) charities that have somehow got my number
>> and name, and won’t be told to desist. And they are exempt from the
>> Australian “Do Not Call” Register.
>
> I want a 1900 number.  THat'd make it worth my while keeping them on the line.
>
> --
> Meski
>
>  http://courteous.ly/aAOZcv
>
> "Going to Starbucks for coffee is like going to prison for sex. Sure,
> you'll get it, but it's going to be rough" - Adam Hills


Re: What's up with braces?

2012-06-28 Thread Wallace Turner

comments??? are you feeling ok today mate??

On 29/06/2012 2:32 PM, Corneliu I. Tusnea wrote:
The main reason I like the brace on the next line is because I 
generally use that line for a comment explaining that branch of the code.
For a function is not that relevant but for an if or for statement is 
becomes relevant:


if ( bla bla )
{ // We need to initialize this because we forgot or something on 
those lines

 ... more code here
}
else
{ // we need to do something else in here
... and there goes more code ...
}

Squashing the brace on the same line as the statement was ok when we 
could only see 40 lines but now with FullHD screens just feels a 
"visual optimization" that has no reason anymore.


Corneliu.


On Fri, Jun 29, 2012 at 1:26 PM, Greg Keogh > wrote:


So Resharper prefers vertical aligned braces (which I have
traditionally used). Now we have a schism because most of the
sample code I see lately and the Framework design guidelines use
indented braces. Which authority do we believe or follow?

I was thinking that I must prefer vertical braces because I like
visual symmetry and less clutter. Although the right align braces
only add a tiny amount of extra clutter on a line they do disturb
the symmetry.

public void FooBar() {

Something();

}

Some reputable books I have use vertical braces for namespace and
class definitions, but indented ones for functions and properties.
Go figure?!

Maybe F# has the answer where the actual indentation is more
important and there is little need for block delimiters.

Greg







Re: What's up with braces?

2012-06-28 Thread Corneliu I. Tusnea
The main reason I like the brace on the next line is because I generally
use that line for a comment explaining that branch of the code.
For a function is not that relevant but for an if or for statement is
becomes relevant:

if ( bla bla )
{ // We need to initialize this because we forgot or something on those
lines
 ... more code here
}
else
{ // we need to do something else in here
... and there goes more code ...
}

Squashing the brace on the same line as the statement was ok when we could
only see 40 lines but now with FullHD screens just feels a "visual
optimization" that has no reason anymore.

Corneliu.


On Fri, Jun 29, 2012 at 1:26 PM, Greg Keogh  wrote:

> So Resharper prefers vertical aligned braces (which I have traditionally
> used). Now we have a schism because most of the sample code I see lately
> and the Framework design guidelines use indented braces. Which authority do
> we believe or follow?
>
> ** **
>
> I was thinking that I must prefer vertical braces because I like visual
> symmetry and less clutter. Although the right align braces only add a tiny
> amount of extra clutter on a line they do disturb the symmetry.
>
> ** **
>
> public void FooBar() {
>
>   Something();
>
> }
>
> ** **
>
> Some reputable books I have use vertical braces for namespace and class
> definitions, but indented ones for functions and properties. Go figure?!**
> **
>
> ** **
>
> Maybe F# has the answer where the actual indentation is more important and
> there is little need for block delimiters.
>
> ** **
>
> Greg
>
> ** **
>


RE: What's up with braces?

2012-06-28 Thread David Kean
I mean the section on coding guidelines, not the rest. :) 

Especially not the section on FxCop at the back on of the second book, I hear a 
really smart person wrote that.

-Original Message-
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Stephen Price
Sent: Thursday, June 28, 2012 10:06 PM
To: ozDotNet
Subject: Re: What's up with braces?

First politics, and now you try to drag in religion?

BAD GREG. BAD.

I guess it IS Friday.

On Fri, Jun 29, 2012 at 1:02 PM, Greg Keogh  wrote:
>>Please ignore the framework design guidelines...
>
>
>
> Holy sh** -- The Pope just told me to ignore that stuff in the Bible.
>
>
>
> Greg
>
>







Re: What's up with braces?

2012-06-28 Thread Stephen Price
First politics, and now you try to drag in religion?

BAD GREG. BAD.

I guess it IS Friday.

On Fri, Jun 29, 2012 at 1:02 PM, Greg Keogh  wrote:
>>Please ignore the framework design guidelines...
>
>
>
> Holy sh** -- The Pope just told me to ignore that stuff in the Bible.
>
>
>
> Greg
>
>


RE: What's up with braces?

2012-06-28 Thread Greg Keogh
>Please ignore the framework design guidelines...

 

Holy sh** -- The Pope just told me to ignore that stuff in the Bible.

 

Greg

 



Re: What's up with braces?

2012-06-28 Thread Stephen Price
Ignore the whole book? Or just that bit about braces?

I was looking at it and thought it might be worth me renewing my
Safari Online for... maybe. Seem to prefer buying them and having them
on my Kindle but not sure which is most cost effective. At least with
Kindle you got it forever (well longer than annual subscription
anyway)

On Fri, Jun 29, 2012 at 11:39 AM, David Kean  wrote:
> Please ignore the framework design guidelines – it’s not representive of
> what the entire .NET Framework uses, and Krzysztof and Brad told me that it
> was their biggest regret in the book.
>
>
>
> From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
> On Behalf Of Greg Keogh
> Sent: Thursday, June 28, 2012 8:27 PM
> To: 'ozDotNet'
> Subject: RE: What's up with braces?
>
>
>
> So Resharper prefers vertical aligned braces (which I have traditionally
> used). Now we have a schism because most of the sample code I see lately and
> the Framework design guidelines use indented braces. Which authority do we
> believe or follow?
>
>
>
> I was thinking that I must prefer vertical braces because I like visual
> symmetry and less clutter. Although the right align braces only add a tiny
> amount of extra clutter on a line they do disturb the symmetry.
>
>
>
> public void FooBar() {
>
>   Something();
>
> }
>
>
>
> Some reputable books I have use vertical braces for namespace and class
> definitions, but indented ones for functions and properties. Go figure?!
>
>
>
> Maybe F# has the answer where the actual indentation is more important and
> there is little need for block delimiters.
>
>
>
> Greg
>
>


RE: What's up with braces?

2012-06-28 Thread David Kean
Please ignore the framework design guidelines - it's not representive of what 
the entire .NET Framework uses, and Krzysztof and Brad told me that it was 
their biggest regret in the book.

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Greg Keogh
Sent: Thursday, June 28, 2012 8:27 PM
To: 'ozDotNet'
Subject: RE: What's up with braces?

So Resharper prefers vertical aligned braces (which I have traditionally used). 
Now we have a schism because most of the sample code I see lately and the 
Framework design guidelines use indented braces. Which authority do we believe 
or follow?

I was thinking that I must prefer vertical braces because I like visual 
symmetry and less clutter. Although the right align braces only add a tiny 
amount of extra clutter on a line they do disturb the symmetry.

public void FooBar() {
  Something();
}

Some reputable books I have use vertical braces for namespace and class 
definitions, but indented ones for functions and properties. Go figure?!

Maybe F# has the answer where the actual indentation is more important and 
there is little need for block delimiters.

Greg



RE: What's up with braces?

2012-06-28 Thread Greg Keogh
So Resharper prefers vertical aligned braces (which I have traditionally
used). Now we have a schism because most of the sample code I see lately and
the Framework design guidelines use indented braces. Which authority do we
believe or follow?

 

I was thinking that I must prefer vertical braces because I like visual
symmetry and less clutter. Although the right align braces only add a tiny
amount of extra clutter on a line they do disturb the symmetry.

 

public void FooBar() {

  Something();

}

 

Some reputable books I have use vertical braces for namespace and class
definitions, but indented ones for functions and properties. Go figure?!

 

Maybe F# has the answer where the actual indentation is more important and
there is little need for block delimiters.

 

Greg

 



RE: What's up with braces?

2012-06-28 Thread Ian Thomas
I'm one of those inflexible people. I prefer braces on a new line, and
indentation. And camel casing. 

 

  _  

Ian Thomas
Victoria Park, Western Australia

  _  

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Corneliu I. Tusnea
Sent: Friday, June 29, 2012 10:42 AM
To: ozDotNet
Subject: Re: What's up with braces?

 

if (RandomFunction() && someValue == someOtherValue)

{

DoRandomStuf();

}

(curly braces on the next line, space before the opening bracket of the if,
spaces around the operators).

Same applies for all the other statements.

 

 

On Fri, Jun 29, 2012 at 10:02 AM, Greg Keogh  wrote:

>It's easy. Whatever is the Default in Resharper after a clean install is
considered the Default in our team :)

 

What is it?

 

Greg

 

 



Re: What's up with braces?

2012-06-28 Thread Corneliu I. Tusnea
if (RandomFunction() && someValue == someOtherValue)
{
DoRandomStuf();
}
(curly braces on the next line, space before the opening bracket of the if,
spaces around the operators).
Same applies for all the other statements.


On Fri, Jun 29, 2012 at 10:02 AM, Greg Keogh  wrote:

> >It's easy. Whatever is the Default in Resharper after a clean install is
> considered the Default in our team :)
>
> ** **
>
> What is it?
>
> ** **
>
> Greg
>
> ** **
>


RE: What's up with braces?

2012-06-28 Thread Greg Keogh
>It's easy. Whatever is the Default in Resharper after a clean install is
considered the Default in our team :)

 

What is it?

 

Greg

 



Re: What's up with braces?

2012-06-28 Thread Corneliu I. Tusnea
It's easy. Whatever is the Default in Resharper after a clean install is
considered the Default in our team :)


On Thu, Jun 28, 2012 at 9:47 PM, Michael Ridland  wrote:

>
> Having Javascript braces on the same line are needed for technical
> reasons.
>
>
>
>
> On Thu, Jun 28, 2012 at 6:11 PM, Michael Minutillo <
> michael.minuti...@gmail.com> wrote:
>
>> Yeah as long as the team agrees to a consistent style and sticks to it it
>> doesn't matter. It can be hard to switch from one brace style to another
>> but as long as the codebase is consistent it's something you can deal with.
>> Over time (and projects) within an organization the problem slowly goes
>> away (unless there's one a-hole that refuses to conform).
>>
>> I know that when writing samples for a book it's common to put open
>> braces next to the expression that owns them to save on printed lines (one
>> line saved on 40 method calls through the book can mean one less printed
>> page). This is common in JavaScript too so there's language idioms to
>> conform to as well.
>>
>>
>> Michael M. Minutillo
>> Indiscriminate Information Sponge
>> http://codermike.com
>>
>>
>>
>> On Thu, Jun 28, 2012 at 3:56 PM,  wrote:
>>
>>> Stylecop ;). If you can convince the team that code that looks the same
>>> is eaiser to debug it elliminates all the posturing.
>>>
>>> Davy
>>> Hexed into a portable ouija board.
>>> --
>>> *From: * "Greg Keogh" 
>>> *Sender: * ozdotnet-boun...@ozdotnet.com
>>> *Date: *Thu, 28 Jun 2012 17:50:40 +1000
>>> *To: *'ozDotNet'
>>> *ReplyTo: * ozDotNet 
>>> *Subject: *What's up with braces?
>>>
>>> When I started PC coding 20 years ago on C and C++ there the convention
>>> about where to put your {braces} was unclear. I remember back then that
>>> there seemed to be more Microsoft sample code with vertically aligned
>>> braces, so I ran with that and I have been ever since, even in my Java
>>> days. I can’t recall ever having a debate with previous colleagues about
>>> which style to use, so in the absence of any memorable disputes I’m
>>> guessing we all used vertical braces.
>>>
>>> ** **
>>>
>>> However, I notice a strong trend towards indented braces over the last
>>> couple of years. The Framework Design 
>>> Guidelinesbook
>>>  also authoritatively states that indented braces are now recommended.
>>> So am I caught on the losing side of a braces battle?
>>>
>>> ** **
>>>
>>> It may seem trivial, but your eyes and brain get used to a certain
>>> appearance of code (like the VB vs C# battle) and a subtle change takes a
>>> bit of getting use to. Are my millions of existing lines of C# code with
>>> vertical braces now a testament to my defeat? Is anyone else suffering from
>>> a project with mixed brace styles?
>>>
>>> ** **
>>>
>>> Greg
>>>
>>
>>
>
>
> --
>
> *Michael Ridland | ThinkSmart Digital*
> Managing Director
> P. 0404 865 350
> E. mich...@thinksmartdigital.com.au
> W. www.thinksmartdigital.com.au
> T. www.twitter.com/rid00z
> L. au.linkedin.com/in/michaelridland
>
>
>  
>
>


RE: no more Macros for VS2012!

2012-06-28 Thread David Kean
You can still write Visual Studio extensibility code, which can use the same 
old DTE that you use via macros.

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of djones...@gmail.com
Sent: Thursday, June 28, 2012 12:26 AM
To: ozDotNet
Subject: Re: no more Macros for VS2012!

Nooo.

I have a bunch of macros that automatically fix stylecop and code analysis 
errors. I will have to do that by hand from now on?

Disappointed Davy
Hexed into a portable ouija board.

From: Arjang Assadi mailto:arjang.ass...@gmail.com>>
Sender: ozdotnet-boun...@ozdotnet.com
Date: Thu, 28 Jun 2012 16:56:55 +1000
To: ozDotNetmailto:ozdotnet@ozdotnet.com>>
ReplyTo: ozDotNet mailto:ozdotnet@ozdotnet.com>>
Subject: no more Macros for VS2012!

FYI Evryone who uses macros, they are gone from VS 11 since less than 1% of 
people were using them:
http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/

But as one of the posts pointed out they were being used by super users that 
most likely would turn off the usage data gathering features.

Regards

Arjang


RE: no more Macros for VS2012!

2012-06-28 Thread Bill McCarthy
You can vote on it on uservoice :
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2650757-bring-back-macros

Also note you can still extend the IDE and write add-ins: it's not a RAD as 
macros though and there's no macro recording. So not as easy to write them or 
discover, but if you have existing macros it shouldn't be that hard to wrap 
them into a package. 

Definitely vote for it if it impacts you: add your voice !

|-Original Message-
|From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-
|boun...@ozdotnet.com] On Behalf Of djones...@gmail.com
|Sent: Thursday, 28 June 2012 5:26 PM
|To: ozDotNet
|Subject: Re: no more Macros for VS2012!
|
|Nooo.
|
|I have a bunch of macros that automatically fix stylecop and code analysis 
errors.
|I will have to do that by hand from now on?
|
|Disappointed Davy
|Hexed into a portable ouija board.
|
|
|From: Arjang Assadi 
|Sender: ozdotnet-boun...@ozdotnet.com
|Date: Thu, 28 Jun 2012 16:56:55 +1000
|To: ozDotNet
|ReplyTo: ozDotNet 
|Subject: no more Macros for VS2012!
|
|FYI Evryone who uses macros, they are gone from VS 11 since less than 1% of
|people were using them:
|http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-
|4647-8c42-e31b669c9f11/
|�
|But as one of the posts pointed out they were being used by super users that
|most likely would turn off the usage data gathering features.
|�
|Regards
|�
|Arjang



Re: What's up with braces?

2012-06-28 Thread Michael Ridland
Having Javascript braces on the same line are needed for technical reasons.




On Thu, Jun 28, 2012 at 6:11 PM, Michael Minutillo <
michael.minuti...@gmail.com> wrote:

> Yeah as long as the team agrees to a consistent style and sticks to it it
> doesn't matter. It can be hard to switch from one brace style to another
> but as long as the codebase is consistent it's something you can deal with.
> Over time (and projects) within an organization the problem slowly goes
> away (unless there's one a-hole that refuses to conform).
>
> I know that when writing samples for a book it's common to put open braces
> next to the expression that owns them to save on printed lines (one line
> saved on 40 method calls through the book can mean one less printed page).
> This is common in JavaScript too so there's language idioms to conform to
> as well.
>
>
> Michael M. Minutillo
> Indiscriminate Information Sponge
> http://codermike.com
>
>
>
> On Thu, Jun 28, 2012 at 3:56 PM,  wrote:
>
>> Stylecop ;). If you can convince the team that code that looks the same
>> is eaiser to debug it elliminates all the posturing.
>>
>> Davy
>> Hexed into a portable ouija board.
>> --
>> *From: * "Greg Keogh" 
>> *Sender: * ozdotnet-boun...@ozdotnet.com
>> *Date: *Thu, 28 Jun 2012 17:50:40 +1000
>> *To: *'ozDotNet'
>> *ReplyTo: * ozDotNet 
>> *Subject: *What's up with braces?
>>
>> When I started PC coding 20 years ago on C and C++ there the convention
>> about where to put your {braces} was unclear. I remember back then that
>> there seemed to be more Microsoft sample code with vertically aligned
>> braces, so I ran with that and I have been ever since, even in my Java
>> days. I can’t recall ever having a debate with previous colleagues about
>> which style to use, so in the absence of any memorable disputes I’m
>> guessing we all used vertical braces.
>>
>> ** **
>>
>> However, I notice a strong trend towards indented braces over the last
>> couple of years. The Framework Design 
>> Guidelinesbook
>>  also authoritatively states that indented braces are now recommended.
>> So am I caught on the losing side of a braces battle?
>>
>> ** **
>>
>> It may seem trivial, but your eyes and brain get used to a certain
>> appearance of code (like the VB vs C# battle) and a subtle change takes a
>> bit of getting use to. Are my millions of existing lines of C# code with
>> vertical braces now a testament to my defeat? Is anyone else suffering from
>> a project with mixed brace styles?
>>
>> ** **
>>
>> Greg
>>
>
>


-- 

*Michael Ridland | ThinkSmart Digital*
Managing Director
P. 0404 865 350
E. mich...@thinksmartdigital.com.au
W. www.thinksmartdigital.com.au
T. www.twitter.com/rid00z
L. au.linkedin.com/in/michaelridland


 


Re: What's up with braces?

2012-06-28 Thread Michael Minutillo
Yeah as long as the team agrees to a consistent style and sticks to it it
doesn't matter. It can be hard to switch from one brace style to another
but as long as the codebase is consistent it's something you can deal with.
Over time (and projects) within an organization the problem slowly goes
away (unless there's one a-hole that refuses to conform).

I know that when writing samples for a book it's common to put open braces
next to the expression that owns them to save on printed lines (one line
saved on 40 method calls through the book can mean one less printed page).
This is common in JavaScript too so there's language idioms to conform to
as well.


Michael M. Minutillo
Indiscriminate Information Sponge
http://codermike.com


On Thu, Jun 28, 2012 at 3:56 PM,  wrote:

> Stylecop ;). If you can convince the team that code that looks the same is
> eaiser to debug it elliminates all the posturing.
>
> Davy
> Hexed into a portable ouija board.
> --
> *From: * "Greg Keogh" 
> *Sender: * ozdotnet-boun...@ozdotnet.com
> *Date: *Thu, 28 Jun 2012 17:50:40 +1000
> *To: *'ozDotNet'
> *ReplyTo: * ozDotNet 
> *Subject: *What's up with braces?
>
> When I started PC coding 20 years ago on C and C++ there the convention
> about where to put your {braces} was unclear. I remember back then that
> there seemed to be more Microsoft sample code with vertically aligned
> braces, so I ran with that and I have been ever since, even in my Java
> days. I can’t recall ever having a debate with previous colleagues about
> which style to use, so in the absence of any memorable disputes I’m
> guessing we all used vertical braces.
>
> ** **
>
> However, I notice a strong trend towards indented braces over the last
> couple of years. The Framework Design 
> Guidelinesbook
>  also authoritatively states that indented braces are now recommended.
> So am I caught on the losing side of a braces battle?
>
> ** **
>
> It may seem trivial, but your eyes and brain get used to a certain
> appearance of code (like the VB vs C# battle) and a subtle change takes a
> bit of getting use to. Are my millions of existing lines of C# code with
> vertical braces now a testament to my defeat? Is anyone else suffering from
> a project with mixed brace styles?
>
> ** **
>
> Greg
>


Re: What's up with braces?

2012-06-28 Thread mike smith
THe hard part is identifying which 'same' to use

On Thu, Jun 28, 2012 at 5:56 PM,  wrote:

> Stylecop ;). If you can convince the team that code that looks the same is
> eaiser to debug it elliminates all the posturing.
>
> Davy
> Hexed into a portable ouija board.
> --
> *From: * "Greg Keogh" 
> *Sender: * ozdotnet-boun...@ozdotnet.com
> *Date: *Thu, 28 Jun 2012 17:50:40 +1000
> *To: *'ozDotNet'
> *ReplyTo: * ozDotNet 
> *Subject: *What's up with braces?
>
> When I started PC coding 20 years ago on C and C++ there the convention
> about where to put your {braces} was unclear. I remember back then that
> there seemed to be more Microsoft sample code with vertically aligned
> braces, so I ran with that and I have been ever since, even in my Java
> days. I can’t recall ever having a debate with previous colleagues about
> which style to use, so in the absence of any memorable disputes I’m
> guessing we all used vertical braces.
>
> ** **
>
> However, I notice a strong trend towards indented braces over the last
> couple of years. The Framework Design 
> Guidelinesbook
>  also authoritatively states that indented braces are now recommended.
> So am I caught on the losing side of a braces battle?
>
> ** **
>
> It may seem trivial, but your eyes and brain get used to a certain
> appearance of code (like the VB vs C# battle) and a subtle change takes a
> bit of getting use to. Are my millions of existing lines of C# code with
> vertical braces now a testament to my defeat? Is anyone else suffering from
> a project with mixed brace styles?
>
> ** **
>
> Greg
>



-- 
Meski

 http://courteous.ly/aAOZcv

"Going to Starbucks for coffee is like going to prison for sex. Sure,
you'll get it, but it's going to be rough" - Adam Hills


Re: What's up with braces?

2012-06-28 Thread Stephen Price
When I first started using braces I put the braces on the next line,
kind of like a begin and end block statements (from Pascal? Basic? I
forget)
Examples seemed to use it and I think its the default for Resharper if
you tell it to autoformat the page. Not sure what VS does without
Resharper by default.

Some years ago my new work place coding standard was to put the
opening brace at the end of the line. For about a week, it did my head
in. After that I preferred it. Now my current project is back to the
opening brace on next line. I also don't care which it is, as long as
its the same through all of the project/solution.

I think consistent is more important then one way over the other. This
likely applies to all coding standards.

It reminds me of a Garfield comic where Garfield is being nice to
everyone and quite quickly they have him in a straight jacket. He
thinks to himself "People don't want nice, they want consistent."

On Thu, Jun 28, 2012 at 3:50 PM, Greg Keogh  wrote:
> When I started PC coding 20 years ago on C and C++ there the convention
> about where to put your {braces} was unclear. I remember back then that
> there seemed to be more Microsoft sample code with vertically aligned
> braces, so I ran with that and I have been ever since, even in my Java days.
> I can’t recall ever having a debate with previous colleagues about which
> style to use, so in the absence of any memorable disputes I’m guessing we
> all used vertical braces.
>
>
>
> However, I notice a strong trend towards indented braces over the last
> couple of years. The Framework Design Guidelines book also authoritatively
> states that indented braces are now recommended. So am I caught on the
> losing side of a braces battle?
>
>
>
> It may seem trivial, but your eyes and brain get used to a certain
> appearance of code (like the VB vs C# battle) and a subtle change takes a
> bit of getting use to. Are my millions of existing lines of C# code with
> vertical braces now a testament to my defeat? Is anyone else suffering from
> a project with mixed brace styles?
>
>
>
> Greg


Re: What's up with braces?

2012-06-28 Thread djones147
Stylecop ;). If you can convince the team that code that looks the same is 
eaiser to debug it elliminates all the posturing.

Davy
Hexed into a portable ouija board. 

-Original Message-
From: "Greg Keogh" 
Sender: ozdotnet-boun...@ozdotnet.com
Date: Thu, 28 Jun 2012 17:50:40 
To: 'ozDotNet'
Reply-To: ozDotNet 
Subject: What's up with braces?

When I started PC coding 20 years ago on C and C++ there the convention
about where to put your {braces} was unclear. I remember back then that
there seemed to be more Microsoft sample code with vertically aligned
braces, so I ran with that and I have been ever since, even in my Java days.
I can't recall ever having a debate with previous colleagues about which
style to use, so in the absence of any memorable disputes I'm guessing we
all used vertical braces.

 

However, I notice a strong trend towards indented braces over the last
couple of years. The Framework Design Guidelines
  book also authoritatively states that indented braces are now
recommended. So am I caught on the losing side of a braces battle?

 

It may seem trivial, but your eyes and brain get used to a certain
appearance of code (like the VB vs C# battle) and a subtle change takes a
bit of getting use to. Are my millions of existing lines of C# code with
vertical braces now a testament to my defeat? Is anyone else suffering from
a project with mixed brace styles?

 

Greg




What's up with braces?

2012-06-28 Thread Greg Keogh
When I started PC coding 20 years ago on C and C++ there the convention
about where to put your {braces} was unclear. I remember back then that
there seemed to be more Microsoft sample code with vertically aligned
braces, so I ran with that and I have been ever since, even in my Java days.
I can't recall ever having a debate with previous colleagues about which
style to use, so in the absence of any memorable disputes I'm guessing we
all used vertical braces.

 

However, I notice a strong trend towards indented braces over the last
couple of years. The Framework Design Guidelines
  book also authoritatively states that indented braces are now
recommended. So am I caught on the losing side of a braces battle?

 

It may seem trivial, but your eyes and brain get used to a certain
appearance of code (like the VB vs C# battle) and a subtle change takes a
bit of getting use to. Are my millions of existing lines of C# code with
vertical braces now a testament to my defeat? Is anyone else suffering from
a project with mixed brace styles?

 

Greg



Re: no more Macros for VS2012!

2012-06-28 Thread djones147
Nooo. 

I have a bunch of macros that automatically fix stylecop and code analysis 
errors.  I will have to do that by hand from now on?  

Disappointed Davy
Hexed into a portable ouija board. 

-Original Message-
From: Arjang Assadi 
Sender: ozdotnet-boun...@ozdotnet.com
Date: Thu, 28 Jun 2012 16:56:55 
To: ozDotNet
Reply-To: ozDotNet 
Subject: no more Macros for VS2012!

FYI Evryone who uses macros, they are gone from VS 11 since less than 1% of
people were using them:
http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/

But as one of the posts pointed out they were being used by super users
that most likely would turn off the usage data gathering features.

Regards

Arjang