|
|
Wtf is that? I wondered when I started up a small tool on a Windows 8 Embedded machine: most of its UI was in English (as expected, because Windows' UI is in English), but an enumeration control was in German. How can that happen? Did I forget to copy a file? No, can't be: the English texts are always compiled into the main assemblies, only translated texts make it into satellite assemblies.
I investigated the issue further. And had to see:
Current Culture: de-DE
Current UI Culture: en-US
What an odd combination! And while the ResourceManager normally uses CurrentUICulture , the EnumDescriptionConverter used CurrentCulture ...
|
|
|
|
|
It's a mess, but there's a method in the madness.
I'm using a computer with an english UI (CurrentUICulture) so that I can easier search error messages. But I still want to have Swedish format (CurrentCulture) on money, date, time, decimal comma and so on.
The fact that to few people have a clue on what's what or how to us them, is a completely different question.
|
|
|
|
|
Exactly that's the background of the mixed English/German cultures. That's the first time I was faced with such a mixture. And thus I learned to take a closer look what type of Culture to use in future: CurrentUICulture for language, CurrentCulture for formats.
|
|
|
|
|
Bernhard Hiller wrote: That's the first time I was faced with such a mixture. And thus I learned to ... That's the most important thing
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.
|
|
|
|
|
|
More likely a C++ problem: the counter is an unsigned int32, but it was passed to the formatting function as a signed int32... Now have fun with reading 2^32-1 emails.
|
|
|
|
|
If you would be so kind to publish your address here I would gladly help ... as would millions of others ... that said, (sub)empty inbox would bother you no more
modified 19-Nov-18 21:01pm.
|
|
|
|
|
...you look at the commit log, see a couple of messages saying "addressed a few bugs", check what they are and find out that the 'solution' was to comment some lines out!!!!
|
|
|
|
|
Or when I look at my log and it says addressed a few bugs but there is no body text at all! - Because I hate myself I guess.
|
|
|
|
|
The YAGNI Strikes Back
Code Trek 2: The Wrath of YAGNI
Code Trek 3: The Search for YAGNI
Code Trek 4: ....whales...really...?
Sorry, derailed a minute there. I was just going to say that YAGNI usually the cause of bugs that can be fixed with comments. Just saying.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Quite possibly. But if the code itself is unneeded then the commented version is even more unneeded...
|
|
|
|
|
On production version: absolutely.
On source version it can give a good idea of plans and thought process. Or it can be a horrible mess, which will still give the next people who look at it a hint as to the thought process of the author. By and large I tend to find commented code more useful than actual code comments
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
WiganLatics wrote: But if the code itself is unneeded then the commented version is even more unneeded... Ah, you're one of those who can't stand leaving commented code in place.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Yep, that's what source control history is for (with an appropriate comment).
#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 just created a module called "FileEventStreamProviderFactory"
|
|
|
|
|
You might be insane , but it is descriptive; however, I don't think I've ever read a class name with 30 characters before.
When you are dead, you won't even know that you are dead. It's a pain only felt by others.
Same thing when you are stupid.
modified 19-Nov-21 21:01pm.
|
|
|
|
|
|
|
"I don't think I've ever read a class name with 30 characters before."
I find that hard to believe. They seem a common occurrence to me.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Did you at least bury it way down deep in a long namespace?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
It is in Namespace Azure.File
It's not even close to being the longest named class - I think that is "InMemoryIdentifierGroupSnapshotReaderFactory"
|
|
|
|
|
We have one called "EstimatedYearlyCreditOpportunityImportDataSaver"
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
personally I don't see what's wrong with that - too short, its not descriptive enough, at least that says what the class is/does - even if you said "FESStreamProviderFactory", would you remember what acronym FES stood for, 2 years from now, without re-examining the source ?
..as a friend oft quotes "naming things is one of the hardest things in programming"
|
|
|
|
|
It is pointless to question the nonexistent...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|