|
i once thought that too, but after a short period of time i thought following the above described path would do the trick...
It doesn´t...
|
|
|
|
|
As long as the cursing is limited to the comments it is safe. Unless you show the source code to a client.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
Yes, my opinion, too.
i am convinced, that "distracting" output to the Client can be a reason for instant dismissal...
not good...
edit:
oh,no. as far as i´m concerned, no Client was/is/will be looking into the codebase...
|
|
|
|
|
Clodetta del Mar wrote: i was in rage
I am afraid I must deny this. To be exact, I did not notice anything, but it could be me.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
|
Clodetta del Mar wrote: i can´t even remember writing that class...
Maybe you didn't.
Maybe you left the office without locking the workstation and somebody did it for you. That recently became a tradition in my office.
|
|
|
|
|
|
Well, for me the case is clear: This class translates insults from german to english.. Well, only one, but hey! You can always add some derived classes!
|
|
|
|
|
if (_Framework.DuplexPlatform)
{
Synchronize.Visibility = Visibility.Visible;
}
{
Synchronize.Visibility = Visibility.Collapsed;
} *face-palm*
Software Zen: delete this;
|
|
|
|
|
I have gone the other way too many times, relying on the indentation...
if (_Framework.DuplexPlatform)
Synchronize.Visibility = Visibility.Visible;
Synchronize.Visibility = Visibility.Collapsed;
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre.
Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.
|
|
|
|
|
I'm one of those insecure types who always uses braces, unless the if() fits on a single line.
Software Zen: delete this;
|
|
|
|
|
So am I, because I got caught before, back in my early C days...and it took ages to work out what the heck I had done wrong!
Nowadays, about the most I will let myself get away with is:
if (value > maxRange) break; Everything else gets curly brackets
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre.
Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.
|
|
|
|
|
Do you fully parenthesize too?
I'm lazy, and never want to remember the precedence rules.
Software Zen: delete this;
|
|
|
|
|
Not always: I'm happy with
if (a == 1 && b == 2) But I'd use em for
if (a == 1 && (b == 2 || c == 3)) Or
if ((a == 1 && b == 2) || c == 3) Just to make it obvious what I meant.
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre.
Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.
|
|
|
|
|
A colleage of mine always does
if ((a == 1) && (b == 2))
while I always do
if (i < (n - 1))
Fortunately regarding other styles we use the same format.
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
Fortunately C# cured me of that one - it won't let you write
if (1 && 2) Because that applies a boolean operation to two integers, so there is no confusion possible with
if (a == 1 && b == 2)
But in C and C++, I used to use the brackets as well!
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre.
Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.
|
|
|
|
|
Me too, but a colleague uses different code formatting and he always auto-formats files so the one-line if-statements turn into 2-line if-statements (with no braces).
|
|
|
|
|
Ditto - also I am becoming a firm believer in white space being good in code as it makes it much easier to read.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
modified 13-Sep-13 8:23am.
|
|
|
|
|
That;s not insecurity - that's being a good developer.
I upvoted you just because its nice to find folk coding the same standards as me
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
A colleague of mine is rather fond of not using {} - even over several levels, i.e.
if (...)
if (...)
for (...)
if ()
doSomething();
doSomeOtherthing(); That's why I use the Edit - Advanced - Format Document feature of Visual Studio very often...
|
|
|
|
|
You threw me there for a moment - I use CTRL+K, D (which does the same thing)
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre.
Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.
|
|
|
|
|
wow, that's... that's horrible
|
|
|
|
|
Seen a couple of those in an older code base Wasn't always a happy debugging experience
|
|
|
|
|
That's really awful! In our company we altogether made a programming styleguide and {} has to used everytime (and it has to follow the structure and shall not be places on the next line).
I like this styleguide! We have good readable code everywhere now.
|
|
|
|
|
ihoecken wrote: shall not be places on the next line
Philistine! Allman style[^] is the only way to go.
And while we're at it, it's tabs every time. Anyone who uses spaces to indent their code shall be shot.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|