|
Agree on the curly braces. There was someone who did a lot of research about which if/else brace pattern worked best for automated merging, but I can never find it.
|
|
|
|
|
Do not attempt the extra check if you are dealing with floating points.
You might really need the extra ELSE clause.
if (x > 1.0) {
}
else if (x <= 1.0) {
}
else {
// yes you can reach this
throw wtf;
}
What are possible values of x?
|
|
|
|
|
Disagree! (contingent on compiler switches set, of course )
else {
throw wtf;
}
if (x == NaN) or some similar hairy answer, the compiler (again, with the correct compilation switches set) will automagically throw an exception.
Sidebar: One would NOT want to set said same switches on an embedded piece of code, since typically exception handling is turned off. Therefore, one would NOT, in such an instance wish to throw wtf .
|
|
|
|
|
The OP never mentioned language or compilers.
Some compilers for whatever language may not support those options.
It was a general stylistic question. Most compilers (and forums) wonβt even warn when you use assignment operator instead of comparison operator.
π
|
|
|
|
|
Hell no! If you must put the second conditional for documentation purposes, make it a comment
if (cond)
...
else // if (!cond)
...
or
if (cond)
...
else // cond
...
I've seen that style used for conditional compilation, not so much for braces.
#if cond
...
#else
...
#endif //cond
|
|
|
|
|
Wordle 951 3/6
β¬β¬π©β¬β¬
π©π©π©π¨β¬
π©π©π©π©π©
|
|
|
|
|
Wordle 951 3/6*
π©β¬π©β¬β¬
π©π©π©β¬β¬
π©π©π©π©π©
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 951 6/6
β¬β¬β¬β¬β¬
β¬β¬β¬β¬π¨
β¬π©π©β¬β¬
β¬π©π©β¬β¬
π¨π©π©π©β¬
π©π©π©π©π©
Phew
|
|
|
|
|
β¬β¬π¨β¬β¬
β¬β¬π©β¬β¬
π¨π©π©π¨β¬
π©π©π©π©π©
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 951 5/6
β¬π©π¨β¬β¬
π©π©β¬β¬β¬
π©π©β¬β¬β¬
π©π©β¬π©β¬
π©π©π©π©π©
|
|
|
|
|
Wordle 951 4/6*
β¬β¬π¨π¨β¬
π¨π¨β¬β¬β¬
π©π©β¬π©β¬
π©π©π©π©π©
Happiness will never come to those who fail to appreciate what they already have. -Anon
And those who were seen dancing were thought to be insane by those who could not hear the music. -Frederick Nietzsche
|
|
|
|
|
Wordle 951 6/6*
π©β¬π©β¬β¬
π©β¬π©β¬β¬
π©β¬π©β¬β¬
π©β¬π©β¬β¬
π©β¬π©β¬π¨
π©π©π©π©π©
I didn't find that easy!
|
|
|
|
|
Wordle 951 3/6
β¬π¨β¬β¬β¬
π©π¨β¬β¬β¬
π©π©π©π©π©
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Venting on! This is a vent!!! <===
Why does Microsoft make everything so D*** difficult? I don't want to use Windows Hello... Stop prompting me!!
Why does the system configuration require editing the registry?
Why are they attempting to duplicate the Mac experience?
Why does updating a simple action mandate a blessing from the Pope and/or a drunk Newfie?
Why are they making the simplest operation a major exercise in futility and frustration???
Why is it that .... H***, I'm could go on for quite awhile but I won't.
Suffice to say I am not a fan of Windows 11.
Venting Off!!
If it wasn't for the fact that I am deeply mired (?) in the Windows environment. I would move to Linux.
I might just consider learning how to develop the a KDE type interface for Linux and write one that emulates Windows 7!!
Cegarman
document code? If it's not intuitive, you're in the wrong field
Welcome to my Chaos!
|
|
|
|
|
|
Hi,
Ok!! Thanks for the info! I will definitely have a look at both of those!!
Cegarman
document code? If it's not intuitive, you're in the wrong field
Welcome to my Chaos and Confusion!
|
|
|
|
|
I feel for you, I am not really doing Windoze software anymore, part of the reason you have described. Windows Peaked with 7, still have it on a couple machines at home. 10 is OK(ish), 11 as you said, I still have a Windows 2000 machine takes an age to start up (only 16 bit!) but you can beat it with a rock it will keep truckin', make a loud noise 11 will fall over (or drain your battery if you are unplugged!)
|
|
|
|
|
After my first attempt at installing Win2000 on a blank machine succeeded in a fraction under 11 minutes, I fell in love with that version. Sadly I've had to move on, but still remember it fondly... It did everything you could want it to, never complained, never crashed, and everything was pretty much where you would expect it to be. Downhill all the way since then as far as I'm concerned...
|
|
|
|
|
The MOD still (or did use it until recently) use it. It's NT at heart it will work on a stone tablet if it meets the basic boot requirements
|
|
|
|
|
Hi,
I traded someone my Windows ME disks (floppy's) for their copy of Windows 2K.
I believe I got the better part of that deal. Sadly, that disk is long gone. I do have a CD with key for Windows XP laying around somewhere. And a copy of Redhat 7 hiding somewhere as well.
Cegarman
document code? If it's not intuitive, you're in the wrong field
Welcome to my Chaos and Confusion!
|
|
|
|
|
I still have an ME installer that I never used all legal OEM copy some where.
|
|
|
|
|
Hi,
Sadly, I got rid of my last copy of OS/2 version 4 about a year ago. That was a solid system even running on a Pentium box with 480 meg drive. I tried it on an I-5 and it was scary fast and very very stable.
Cegarman
document code? If it's not intuitive, you're in the wrong field
Welcome to my Chaos and Confusion!
|
|
|
|
|
Seems useful for figuring out recent changes in Google cloud and Java infrastructure, but it's prone to giving outdated solutions, unless explicitly instructed to avoid such.
|
|
|
|
|
From CP newsletter
Majority of companies not prepared for insider threats[^]
"While 76 percent of organizations have detected increased insider threat activity over the past five years"
"The survey data shows that 74 percent of cybersecurity professionals are most concerned with malicious insiders within their organization in 2024, which is an increase of nearly 25 percent when compared to 2019"
About 15 years ago I was able to see a high priced report from a company that specialized in handling data breach problems within large companies.
At that time it reported that people working inside of companies were responsible for 90% of the data theft problems that the company dealt with.
I doubt there was some incredible decrease since then in internal theft. Thus no increase now.
I even wonder if those that participated were in fact underestimating the threat that already exists.
Amusingly enough, well in a certain way, I worked for a company where the CEO (and majority stock holder) had to make an emergency exit from the country as there was a felony arrest warrant issued due to how he was managing the company.
Bet those security experts are not looking in that direction.
|
|
|
|
|
I agree that internal threats are probably greater. Looking outwardly is a low percentage proposition. Looking inwardly is a target-rich environment. But management doesn't want to hear that.
I see a lot of ads about cyber security certification, and I expect that many of the students who get those aren't yet tuned into corporate politics. What the report might actually be indicating is an increase in new cyber security "experts" who haven't yet learned where not to look.
|
|
|
|