|
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
|
|
|
|
|
Richard Deeming wrote: Philistine!
And proud about it!
Richard Deeming wrote: Allman style[^] is the only way to go.
Eh. In my eyes it's ridiculous. Thousand lines between the code that make it unreadable.
Richard Deeming wrote: And while we're at it, it's tabs every time. Anyone who uses spaces to indent their code shall be shot.
Agree!
|
|
|
|
|
Stop! You're both wrong. Allman style and expand tabs to spaces.
Heresy!
In my code base only one type of whitespace is allowed (ya ya I don't consider newlines to be whitespace).
Windows 8 is the resurrected version of Microsoft Bob. The only thing missing is the Fisher-Price logo.
- Harvey
|
|
|
|
|
Mandatory code fix post -
Why you not do inline:
Synchronize.Visibility = _Framework.DuplexPlatform ?
Visibility.Visible : Visibility.Collapsed;
speramus in juniperus
|
|
|
|
|
I posted a summarized fragment.
Software Zen: delete this;
|
|
|
|
|
I agree that a ternary should be used when apropriate, but I prefer a more explicit formatting.
Synchronize.Visibility = _Framework.DuplexPlatform
? Visibility.Visible
: Visibility.Collapsed;
A ternary operetar is used rarely enough to expose it.
Greetings - Jacek
|
|
|
|
|
Not in my code it isn't
|
|
|
|
|
Now I see: it is a ";" - and nothing else:
if (_Framework.DuplexPlatform) ;
{
Synchronize.Visibility = Visibility.Visible;
}
{
Synchronize.Visibility = Visibility.Collapsed;
}
|
|
|
|
|
Software Zen: delete this;
|
|
|
|
|
What else would be missing?
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
A code review ?
~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
|
|
|
|
|
Given that this product consists of over 1.2 million lines of code (that was the count two years ago), it's a variant of four products built from the same code base, and they're all maintained by the same group of six overworked developers, who has time for code reviews?
The good news is our testers found the problem.
Software Zen: delete this;
|
|
|
|
|
You seem to have time to find bugs, so ...
~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
|
|
|
|
|
Our test group (a fine bunch of folks, actually) found the problem. I posted my original message here because I thought the missing else keyword was funny. Apparently you agile, oops, pardon me, Agile folks don't find such things humorous. I really would like to do code reviews, given the chance.
Tell you what. Here are my shoes. Take a walk in them, and let me know when you find the management support and the extra time to do code reviews.
I'll wait.
Software Zen: delete this;
|
|
|
|
|
Where I worked a few years ago, we did code reviews even when rushed because we found that they reduced the amount of development time, even when rushed... no especially when rushed.
Windows 8 is the resurrected version of Microsoft Bob. The only thing missing is the Fisher-Price logo.
- Harvey
|
|
|
|
|
I added a feature to one of my apps at the last revision which needed a new column in the DB.
I thought the latest version was slower to start that it used to be, but dismissed it as my imagination - with a note to investigate moving the DB load into a background task when I was doing major mods.
Until tonight...
I just added another feature that needs another column and found that when I load the DB info, I was saving the DB value into the Property of the class, not the backing field. And yes, the property does Update the record back to the DB, in case you were wondering...
So when I load my data, I not only read every record, but I immediately write it back as well...
Adding an "_" character made a huge difference!
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.
|
|
|
|
|
Properties that write back to the database are hell. I've some here and i really hate them.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
"Given the chance I'd rather work smart than work hard." - PHS241
"'Sophisticated platform' typically means 'I have no idea how it works.'"
|
|
|
|
|
They do make sense in some cases, because they prevent data loss if you forget to call the "Update" method after a user makes a change to the form.
But they are a PITA sometimes, yes...
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.
|
|
|
|