|
Ah, I see, but I disagree. I prefer to be able to specify the values. It's kinda important for "flags" type enumerated values.
Maybe there should be an Attribute which enables things -- yes, I know about the FlagsAttribute, but it really only affects how strings are formed or parsed, it has nothing to do with what values are defined or assigned.
public enum Option
{
None = 0
,
UTF8 = 1
,
ASCII = 2 | UTF8
,
All = ASCII
}
Maybe a "bare" enum would enforce a strict value assignment and the ability to specify the values would require the developer to activate other features.
|
|
|
|
|
I would've said Java class Object
But on the other hand I must admit that, when it comes to Java for me personally, a ten-foot-pole aint long enough
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
Javascript - "undefined". 
|
|
|
|
|
Visual Basic -- nothing
Mmm, yeah, quite literally.
|
|
|
|
|
C++ for me would be template
I don't really use the STL that much due to working with tiny amounts of RAM.
To err is human. Fortune favors the monsters.
|
|
|
|
|
You are lucky you have them. Not all embedded systems' compilers support templates (for example some Verifone proprietary systems).
There is only one Vera Farmiga and Salma Hayek is her prophet!
Advertise here – minimum three posts per day are guaranteed.
|
|
|
|
|
I've had this discussion before, and where I come down on it, is if your compiler doesn't support a major language feature, like template, you don't support the C++ language - you support a C++ subset.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Basic = Dim!
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
minding my own business... crafting another QA question...
This is at least the second time that writing the details of what I had tried led me to the answer.
I guess this is kind of a form of rubber-duck debugging.
The bad thing in this case is that the answer leads me to suspect that someone upstream of me is messing with the data feed I get. But that can wait for next year.
|
|
|
|
|
This happens to me a lot.
I'm in the process asking a question, then I test different things, write down a simple use case, try different approaches to make sure the question as clear as possible and I fix the problem.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
PIEBALDconsult wrote: But that can wait for next year.
Don't do today what can be done tomorrow. Words to live by, for sure. 
|
|
|
|
|
"Don't put off for tomorrow what can be put off for the day after tomorrow." -- possibly Mark Twain
Edit: In this case, someone else will be replacing my existing SSIS ETL with another technology next year.
modified 2-Dec-22 11:04am.
|
|
|
|
|
tomorrow is always another tomorrow -- manana
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Me and one of my coworkers do that all the time. We'll get stuck on a problem, I'll call him on Teams, or he'll call me, and just the fact that we have to describe the problem will often lead to the answer without the other person ever saying a word.
I've also heard it being described as "trying to explain it to your dog". If you understand the problem well enough to do that, you'll probably be able to find your own answer.
|
|
|
|
|
On occasion, over the years, I have actually woken up in the middle of the night, instantly knowing the solution to the problem, as if it was magically planted in my brain. It's the weirdest and strangest thing how that works. Every time, the solution works.
|
|
|
|
|
It's happened to me often enough that I keep a pad and pen on my nightstand, along with a little flashlight so I can write down the solution; the flashlight is so I can do it without waking up the spouse . And you're right -- the idea always handles the problem, be it bug or design conundrum.
Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|
|
Happens to me a lot when I'm in the shower. The mind is a wonderful thing.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Same. There's been instances where I got out of bed to scribble some notes, otherwise I know I will have forgotten all about it by morning.
Either that or I'll be so worried I'll forget some important detail I can't relax and go back to sleep.
|
|
|
|
|
PIEBALDconsult wrote: suspect that someone upstream of me is messing with the data I always assume that someone upstream is ing with the data, and they're not wearing a condom.
Best example: I communicate with a device that routinely returns uninitialized data in its responses. The schmuck responsible for the device code complains that guaranteed and complete initialization makes the code take an extra couple of seconds to start under the debugger .
Software Zen: delete this;
|
|
|
|
|
If it's .net (and I guess it isn't) then test for an attached debugger and act accordingly.
|
|
|
|
|
We are in the process of updating our .NET 4.8 solution to .NET 6, which already caused many headaches.
Now we have got the solution building, it needs to go through DotFuscator to protect it.
Surprise! you can not add .NET 6 .exe and .dll files in the usual way anymore.
Now we have to edit all project files like this:
Quote: First remove the Sdk attribute from the project's root <project> tag.
Then, copy the Import tag shown below (replacing the SDK name if necessary) into the appropriate position in your project file.
Protect Your App - Dotfuscator Professional 6.5[^]
|
|
|
|
|
|
Wheeler's Corollary to Hutber's Law: The gain from an enhancement will be offset by a greater deterioration, hidden by the enhancement.
Software Zen: delete this;
|
|
|
|
|
Received an email this morning. It was an invoice, indicating I had paid in full for an each-way airport bus transfer.
I took the trip 5 years ago.
|
|
|
|
|
Well that's better than getting multiple invoices for products not ordered. complete scam I know but some businesses just pay it.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|