Uh-Oh
-
New guy started today, and he's very - ummm - "excited" about coding guidelines. Seems he also doesn't like private member variables since they're "not necessary" in the latest version of C# (and a number of other ideas I don't agree with him on). I suggested that all of the programmers (there are four of us right now) take a small class, and change it to their own style of coding, and then we compare notes in a meeting, taking the best of the lot (in other words, the things we agree on) and establishing a coding style guidelines document.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001Hey... I thought I recognized this... Isnt this the plot to every WWII movie, ever? The new guy comes into the platoon and everyone gives him a hard time cause hes fresh out of the academy... And the next thing you know its the end of the movie and he's ramboo-in it up, and his pecs have gotten bigger somehow... Meanwhile the chick you brought is crying cause "The hot one died.":'( <---Tear
-
New guy started today, and he's very - ummm - "excited" about coding guidelines. Seems he also doesn't like private member variables since they're "not necessary" in the latest version of C# (and a number of other ideas I don't agree with him on). I suggested that all of the programmers (there are four of us right now) take a small class, and change it to their own style of coding, and then we compare notes in a meeting, taking the best of the lot (in other words, the things we agree on) and establishing a coding style guidelines document.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001The younger generation do seem somewhat fixated on style over substance, or box ticking. Software development should be more autocratic that democratic, but in difficult times I can see your dilemma. Instead of debating 'whose style is best' it will probably be better to fall back on pre-existing standards and best practices that everyone could perceive as 'neeutral'. Quick solution: 1. Suggest that for naming conventions and coding style you use Microsoft's recommendations unless there is a clear consensus on ignoring a certain recommendation; use FxCop (built in for VS2008) to enforce. 2. Choose a neutral 'best practice' source for going beyond mere conventions. Bill Wagner's brilliant books 'Effective C#' and 'More Effective C#' should be compulsory reading and between them offer 100 properly argued reasons why you should favour certain practices over others. I know a number of FTSE organizations where the developers stick a photocopy of the Effective C# content page where they can see it for constant reinforcement. I'll pick one at random; Item 25: Use Exceptions to Report Method Contract Failures - Any method that cannot perform its stated actions should report that failure by throwing an exception (rather than by using hand-rolled return codes). and so on. *** By recommending neutral standards you take all the personal feeling out of the choice and this will make the developer buy-in far more likely.
"If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .
-
Thanks for that, sometimes I'm too much of a softie.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
I'm finding it easier and easier to slip into 'Outlaw Programmer' mode. My current project, The Big New Thing™, is driving me toward my debut on CNN.
Software Zen:
delete this;
-
I'd much rather work somewhere that has a strong coding standard that I dislike than have a free for all. Nothing shits me more than projects where every bloody file is formatted differently. The other thing that shits me to tears is when someone makes a small change to code I wrote and re formats the whole file. When you use a diff to review the change you have to wade through pages of pointless modifications to find the actual change.
*ahem* Ignore whitespace is a good start... though it does nothing for variable names obviously...
-
John Simmons / outlaw programmer wrote:
Seems he also doesn't like private member variables since they're "not necessary" in the latest version of C# (and a number of other ideas I don't agree with him on).
With automatic properties that's somewhat true. The private member is created for you. So coding guidelines should be updated to incorporate that feature. If he means there's no longer any use for private member variables then of course he's mistaken and should be thrown out with the rest of the garbage :D
Todd Smith
Todd Smith wrote:
With automatic properties that's somewhat true. The private member is created for you.
Well, even if that is automatically created for you I still consider a bad practice to not use them. I also think it is kinda lazy, it won't make you a better programmer and I'd rather stick with private members.
-
New guy started today, and he's very - ummm - "excited" about coding guidelines. Seems he also doesn't like private member variables since they're "not necessary" in the latest version of C# (and a number of other ideas I don't agree with him on). I suggested that all of the programmers (there are four of us right now) take a small class, and change it to their own style of coding, and then we compare notes in a meeting, taking the best of the lot (in other words, the things we agree on) and establishing a coding style guidelines document.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
Coding Guidelines are the first step towards project failure. I wish you luck.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.Ennis Ray Lynch, Jr. wrote:
Coding Guidelines are the first step towards project failure. I wish you luck.
Not always. I still remember the case back in '96 where I told a junior programmer about a clear violation of a rule from Effective C++ that I'd found in his code - his response was, hmmm, dismissive. He was also slightly irritated two weeks later when I reminded him of what I said after the bug appeared, the one that specifically arose from his choice to ignore that rule. Coding standards are not necessarily a step toward project failure. Useless coding standards that require rewriting of code that already works, that won't fail under special circumstances, and that don't insure that the code can be maintained by any member of the team are a step in that direction.
-
:laugh:
The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.
-
Surely he's just going to hit back with 'FIFO'? Which does sound a bit like a poodles' name!
"If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .
-
Surely he's just going to hit back with 'FIFO'? Which does sound a bit like a poodles' name!
"If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .
-
It is not easy to get an agreement on guidelines in a small team. I had the experience before.
TOMZ_KV
I have also had difficulties in a small team with coding standards. The best solution I found was to use Juval Lowy's coding standards (see website http://www.idesign.net/idesign/DesktopDefault.aspx). Using them stopped the me-versus-you stuff.
-
I have also had difficulties in a small team with coding standards. The best solution I found was to use Juval Lowy's coding standards (see website http://www.idesign.net/idesign/DesktopDefault.aspx). Using them stopped the me-versus-you stuff.
-
Here is the coding standard: [http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip](http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip)[[^](http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip "New Window")]
-
Here is the coding standard: [http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip](http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip)[[^](http://www.idesign.net/iDesign/download/IDesign CSharp Coding Standard.zip "New Window")]
-
John Simmons / outlaw programmer wrote:
Seems he also doesn't like private member variables since they're "not necessary" in the latest version of C# (and a number of other ideas I don't agree with him on).
With automatic properties that's somewhat true. The private member is created for you. So coding guidelines should be updated to incorporate that feature. If he means there's no longer any use for private member variables then of course he's mistaken and should be thrown out with the rest of the garbage :D
Todd Smith
I agree with you Todd. Yes, using this method is easier and convenient and I also use this method. Sadly to say, I have started using the var method to declare local variables. There are times when I cannot use the automatic variable method, say, when I need to monitor when a class data item changes (for example, setting a dirty flag). Although, it does save typing, I'm not against it. You will need to use the getter and setter parts of the property (or else, how can you get or set the value?) You can still declare the entire property as private or either the getter or setter part as private so you only have to expose what you want.
-
New guy started today, and he's very - ummm - "excited" about coding guidelines. Seems he also doesn't like private member variables since they're "not necessary" in the latest version of C# (and a number of other ideas I don't agree with him on). I suggested that all of the programmers (there are four of us right now) take a small class, and change it to their own style of coding, and then we compare notes in a meeting, taking the best of the lot (in other words, the things we agree on) and establishing a coding style guidelines document.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001Use stylecop if your coding in C# or Resharper's standards which allows you to auto fix most code. There is a http://www.codeplex.com/StyleCopForReSharper[sytle copfor resharper plugin ] too. Which is really quite good. I've been using stylecop for resharper for a few months now and I found I just got used to the conventions, even though I only agreed with around 80-90% of them originally. If I see code that isn't formatted that way I wince. Tim
-
The younger generation do seem somewhat fixated on style over substance, or box ticking. Software development should be more autocratic that democratic, but in difficult times I can see your dilemma. Instead of debating 'whose style is best' it will probably be better to fall back on pre-existing standards and best practices that everyone could perceive as 'neeutral'. Quick solution: 1. Suggest that for naming conventions and coding style you use Microsoft's recommendations unless there is a clear consensus on ignoring a certain recommendation; use FxCop (built in for VS2008) to enforce. 2. Choose a neutral 'best practice' source for going beyond mere conventions. Bill Wagner's brilliant books 'Effective C#' and 'More Effective C#' should be compulsory reading and between them offer 100 properly argued reasons why you should favour certain practices over others. I know a number of FTSE organizations where the developers stick a photocopy of the Effective C# content page where they can see it for constant reinforcement. I'll pick one at random; Item 25: Use Exceptions to Report Method Contract Failures - Any method that cannot perform its stated actions should report that failure by throwing an exception (rather than by using hand-rolled return codes). and so on. *** By recommending neutral standards you take all the personal feeling out of the choice and this will make the developer buy-in far more likely.
"If you reward everyone, there will not be enough to go around, so you offer a reward to one in order to encourage everyone." Mei Yaochen in the 'Doing Battle' section of Sun Tzu's: Art of War. .