OshaqHennessey

u/OshaqHennessey@midwest.social
0 posts · 84 comments

Recent posts

No posts.

Recent comments

Yeah, it does look like C now that I think about it. You're right about the end result too. I believe C# will let you do inline declaration and assignment like that, so maybe that's what we're looking at? Been a while, could be wrong

function myFunction() {
  try {
    x = new Random().nextInt();
    if (x != 10) {
     throw "not 10";
    }
    else {
      return (10)
    }
    catch(err) {
      myFunction()
    }
  }
}

x = myFunction()

Commit notes: Added error handling

Shit, you're right. x is declared inside the loop, so it doesn't exist until the loop begins execution.

Technically, I suppose you could say the compiler will allocate memory for x without assigning a value before the loop is executed and... I'm understanding what you mean now, I think.

Not in this case. First, i is declared and assigned a value of 0. Next, x is declared and assigned a value of -i or -0. On the first loop iteration, i will decrement to -1, perform the conditional check, then execute the loop body which will assign x to -i or -(-1) or positive 1, and so on.

The only time a variable is created without a value is if you declare one without assigning a value like with

[int]i;

If this is JavaScript, it would have a value of -0, which is actually valid and works the same as normal zero thanks to type coercion. I think the only difference is some methods that detect if a number is negative will return true instead of false, but otherwise, JS treats -0 the same way as 0

on SWORD RULE · c/onehundredninetysix · 1 pts · 286d

The most i said was he wasn't entirely wrong. I also called him despicable and a scumbag. It would seem you and I have very different ideas as to the definition of "congratulate"

The weakest link in any system is the user

Correct. No policy is an adequate substitute for security training or phishing awareness training. That doesn't mean to allow abuse cases though

export sensitive company data onto their own personal machines

Intune can be (and usually is) used to enforce logins only from enrolled devices. Personal devices can be enrolled, then Conditional Access policies can be applied to silo app data from company data, preventing this abuse case

reauth once per hour

No way. One per day, at most. No one should have to re-auth every hour, except maybe Global Admin accounts, which shouldn't be used for day-to-day tasks anyway.

users who generate service account credentials

To do this in Entra, you need the Application Administrator role assigned, which is a Privileged Role, so it should be controlled by PAM to prevent/detect this abuse case.

When your policy teeters towards aggravating users, many of them will just find clever ways to circumvent it

Not for long. And usually not without leaving an audit trail that indicates violating acceptable use policies, security policies, or access control standards, which then becomes an HR issue, not an IT issue

on an iconic rule-o · c/onehundredninetysix · 22 pts · 287d

If your session gets hijacked, max session lengths ensure the attacker doesn't retain access once the session expires. It's more likely someone in your company was phished and the attacker retained access to their Outlook for a few days or weeks before anyone noticed.

on money · c/programmer_humor · 7 pts · 287d

The glut of US tech workers is due to the excessive number of H1B visas being issued. This year, the number was almost the same, but slightly higher than the total number of US tech graduates. Why hire an expensive American new graduate when you can hire someone from India with 3-5 years of experience at 60% market rate instead?

on The Cursed Ooze · c/cosmichorror · 25 pts · 287d

Return the Earth to its primordial state by burning the effluvial rot and releasing the souls of the vanquished back into our world, so that they can draw energy from the radiation of our Cosmic Creator and use it to bake us in the infernal flames of greed and hubris.