|
Words, either way it's déjà vu. - (10)
modified 27-Jul-16 3:40am.
|
|
|
|
|
Palindrome? A word that reads the same either way (backwards or forwards)?
Andy B
|
|
|
|
|
Congrats. Guess what what you're doing tomorrow.....
|
|
|
|
|
Is that where the déjà vu starts?
|
|
|
|
|
Yep. And it won't finish until you stop getting them right!
|
|
|
|
|
I hate code comments that say what the code is doing but not why.
if (someObj != null) {...}
Really?
Argh!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
TheGreatAndPowerfulOz wrote: what the code is doing but not why
Because "check for null so we don't get a NullReferenceException when we access the properties of someObj" would be so much better!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yeah, that's worse
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
|
It gets better:
if (string.IsNullOrEmpty(something)) { ... }
|
|
|
|
|
Indeedly!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
When no comments are actually better.
|
|
|
|
|
Yep.
My favorite:
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
I prefer:
#region Private Members
int thingy = 101;
#endregion
|
|
|
|
|
|
That is a line I would expect in a shell. A place marker.
|
|
|
|
|
Well, you've got a lot of "developer" responses, so far, so how about I add a "someone who has to explain to your customers' developers why your developers are such @rseholes" response.
You're absolutely right.
Because there are a thousand reasons for checking for null values, there are a thousand things that could be added to expand on what the statement does, e.g.
if (someObj != null) {...}
if (someObj != null) {...}
if (someObj != null) {...}
There's almost never an excuse for a line of doc that says exactly the same as the line of code.
If the who/why/where/when/what is not needed, then the doc is not needed.
If the who/why/where/when/what is needed, then the doc is needed, and just keep in mind that some other poor b*st*rd has to try and make your program useful.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I am one of the other poor b*st*rd now.
The original developers think their code is so beautiful and wonderful that no comment is needed to explain. They think I should ask if I do not understand. It will take longer than my lifetime to finish project this way.
|
|
|
|
|
You have my deepest sympathy.
'PLAN' is NOT one of those four-letter words.
'When money talks, nobody listens to the customer anymore.'
|
|
|
|
|
My sympathies. Been there, hated it.
Look at the bright side, though: if the job were too easy, you'd get bored.
Mind you, the jury's still out on which of bored and tearing-your-hair-out-in-frustration is worse.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I really dislike code comments in general[^]
Currently, I have a coworker who writes comments like:
int i;
i = 42; He doesn't do it all the time, but such comments are common practice.
Learn to friggin code so you don't have to remind yourself of how to declare and assign a friggin variable!
|
|
|
|
|
Sander Rossel wrote: Currently, I have a coworker who writes comments like: Perhaps he used to teach first level coding in high school.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
He never did coding in school, maybe he's trying to make up for it?
|
|
|
|
|
I was always taught that code comments are to describe a process your code is doing, if it is complex and not easily understood from the existing code base - otherwise, don't comment. It has served me well, all these years, so I stick with it...very minimal commenting in my code.
|
|
|
|
|
Bah!! find something to complain about for Betsy's sake! If some lonely sole feels compelled to write a novel between the lines of code and feels it helps them remember what the heck they are doing why does it bother you? Granted 'Good' comments will help someone else down the road. Let us understand people, we comment as a CYA first and foremost and therefore this is an exercise in self preservation; consequently self serving.
|
|
|
|