Till death, my code and I
-
I was writing code the other day and a colleague of mine came by and asked me why I use comments and Function names in Camel Case. For some weird reason, this annoyed me, and I went on to make a case for camel case such as readability, and I noticed myself getting angry as if an attack on my code was an attack on me. Am I the only one who defends my code by whatever means and shirks having to change what we view as 'superior' habits? Or is this a case of the overprotective 'mother hen :-\ ' on her chics?
Know ye not that ye are gods?
-
I was writing code the other day and a colleague of mine came by and asked me why I use comments and Function names in Camel Case. For some weird reason, this annoyed me, and I went on to make a case for camel case such as readability, and I noticed myself getting angry as if an attack on my code was an attack on me. Am I the only one who defends my code by whatever means and shirks having to change what we view as 'superior' habits? Or is this a case of the overprotective 'mother hen :-\ ' on her chics?
Know ye not that ye are gods?
You my friend, deserve a +1. Yes, I do that! I do that everytime, I don't like anyone trying to tell me, "hey don't do that, don't be like that". I mean, if he's perfect enough, why don't he do the job? It's my code, and I write it as I like! If there is a compile time error, complain, if there ain't any, then please shut the damn thing up. Simple as that!
Favourite line: Throw me to them wolves and close the gate up. I am afraid of what will happen to them wolves - Eminem ~! Firewall !~
-
I was writing code the other day and a colleague of mine came by and asked me why I use comments and Function names in Camel Case. For some weird reason, this annoyed me, and I went on to make a case for camel case such as readability, and I noticed myself getting angry as if an attack on my code was an attack on me. Am I the only one who defends my code by whatever means and shirks having to change what we view as 'superior' habits? Or is this a case of the overprotective 'mother hen :-\ ' on her chics?
Know ye not that ye are gods?
-
I was writing code the other day and a colleague of mine came by and asked me why I use comments and Function names in Camel Case. For some weird reason, this annoyed me, and I went on to make a case for camel case such as readability, and I noticed myself getting angry as if an attack on my code was an attack on me. Am I the only one who defends my code by whatever means and shirks having to change what we view as 'superior' habits? Or is this a case of the overprotective 'mother hen :-\ ' on her chics?
Know ye not that ye are gods?
Well, it depends... If the entire team decides PascalCasing is the way to go on function names then you'd just be an a-hole if you went all camelCase, or worse, sHungarianNotation (that's s for stupid :)). Where I work we have a common style defined and everyone sticks to that. There's still some freedom of style though. Personally I like using the
this
keyword, for examplethis.SomeFunction()
, so I know it's an instance method that's called and not a class method. My co-workers don't usethis
that often though. If someone asks why I usethis
that often I can tell them my reason and they can agree with me or be wrong (no hurt feelings either way). Until the entire team decides to not usethis
, in which case I'll have to adjust my style.It's an OO world.
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
} -
Every team should have some kind of common coding style defined and settled. Because you may not be the only one working on a particular code base. It is a poor management style to not get these things sorted out from the very beginning.
-
Well, it depends... If the entire team decides PascalCasing is the way to go on function names then you'd just be an a-hole if you went all camelCase, or worse, sHungarianNotation (that's s for stupid :)). Where I work we have a common style defined and everyone sticks to that. There's still some freedom of style though. Personally I like using the
this
keyword, for examplethis.SomeFunction()
, so I know it's an instance method that's called and not a class method. My co-workers don't usethis
that often though. If someone asks why I usethis
that often I can tell them my reason and they can agree with me or be wrong (no hurt feelings either way). Until the entire team decides to not usethis
, in which case I'll have to adjust my style.It's an OO world.
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
} -
it's interesting how even in teams, we still try to preserve our 'soul' and essence of our personalities, as if to tell the whole world to go to hell and leave our code alone. ;)
Well, it's pretty difficult to turn off our preferences and personalities ;)
It's an OO world.
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
} -
I was writing code the other day and a colleague of mine came by and asked me why I use comments and Function names in Camel Case. For some weird reason, this annoyed me, and I went on to make a case for camel case such as readability, and I noticed myself getting angry as if an attack on my code was an attack on me. Am I the only one who defends my code by whatever means and shirks having to change what we view as 'superior' habits? Or is this a case of the overprotective 'mother hen :-\ ' on her chics?
Know ye not that ye are gods?
I tend to rebel against the new fangled, latest and greatest. The idea that comments aren't needed is asinine as far as I am concerned. My direct report wants us to start putting in TDD stuff for bug fixes to established code. That will take weeks and it doubles the amount of code I will have to write. I can understand, MAYBE, for completely new code, but for stuff that is nearly 8 years old? NO way. Don't screw around with "MY" code.
-
I was writing code the other day and a colleague of mine came by and asked me why I use comments and Function names in Camel Case. For some weird reason, this annoyed me, and I went on to make a case for camel case such as readability, and I noticed myself getting angry as if an attack on my code was an attack on me. Am I the only one who defends my code by whatever means and shirks having to change what we view as 'superior' habits? Or is this a case of the overprotective 'mother hen :-\ ' on her chics?
Know ye not that ye are gods?
eyesark wrote:
Am I the only one who defends my code
I think yes... I prefer to defend mine ;P
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
eyesark wrote:
Am I the only one who defends my code
I think yes... I prefer to defend mine ;P
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
I was writing code the other day and a colleague of mine came by and asked me why I use comments and Function names in Camel Case. For some weird reason, this annoyed me, and I went on to make a case for camel case such as readability, and I noticed myself getting angry as if an attack on my code was an attack on me. Am I the only one who defends my code by whatever means and shirks having to change what we view as 'superior' habits? Or is this a case of the overprotective 'mother hen :-\ ' on her chics?
Know ye not that ye are gods?
eyesark wrote:
what we view as 'superior' habits
While you may have made your 'case' with your colleague, it was probably in vain, as he/she clearly has a different style that is 'superior' in their minds. That said, understand the frustration of having someone nitpick about something that trivial, so you get a +5 for combating stupidity! :laugh:
"Go forth into the source" - Neal Morse
-
I was writing code the other day and a colleague of mine came by and asked me why I use comments and Function names in Camel Case. For some weird reason, this annoyed me, and I went on to make a case for camel case such as readability, and I noticed myself getting angry as if an attack on my code was an attack on me. Am I the only one who defends my code by whatever means and shirks having to change what we view as 'superior' habits? Or is this a case of the overprotective 'mother hen :-\ ' on her chics?
Know ye not that ye are gods?
Just do your own thing if it's comfortable. What other people say are just opinions.