Don’t mind the ||
but I do agree if you’re validating an input you’d best find all issues at once instead of “first rule wins”.
Don’t mind the ||
but I do agree if you’re validating an input you’d best find all issues at once instead of “first rule wins”.
Hoping it remains viable for a long time without updates. Syncing my KeePass database is really key for me. I need to fluidly add and read passwords from at least 3 devices.
Or just skip ahead and unionize.
5th Circuit: “Hold my Trump Bible.”
How does “foo” mean “get”? Half the battle of writing correct code is writing code that’s easy to interpret. Do you always look at the guts of every function you’re about to use?
Don’t know but copyright holders have demonstrated a few cases where they got AI to blatantly rip off copyrighted pictures or music.
branching ≠ if ≠ conditional
They’re all related but can’t just be used interchangeably. “if” is a reserved keyword to indicate a specific syntax is expected. It’s not the semantics the author was trying to change, it’s the syntax, and the overall point is that you aren’t always required to use the specific “if” syntax to write code just like you’re not required to use “while” to achieve looping.
What’s the purpose of foo? Why an ambiguous single character variable? What if the property was there but the value was null? Why not use (assuming JS) optional chaining?
I’d approach it more like this:
function getWhatevrProp(userData) (
const default = { whatevr: "n/a" };
return { ...default, ...userData }.whatevr;
}
Sorry, read too fast the first time. It’s more likely Python. I also don’t know Python well enough to give recommendations on that.
Always love seeing the trope:
*writes awful code*
See! This is why this language sucks!
Usually it doesn’t solve my problems but it gives me a few places to start looking. I know some models are capable of this but to get a perfectly accurate and useful response would probably require it to recall a specific piece of input it was given and not just an “average” of the inputs.
To each their own. Some won’t like the repeating code and some won’t like the distributed logic (i.e. you have to read every if and if-else statement to know when the else takes effect). I think the use of booleans like isDriverClose
makes the repeated logic less messy and reduces inefficiency (if the compiler didn’t optimize for you).
It has conditionals not but actual if statements. Not really different in functionality but a more consistent style.
Hehe. COBOL doesn’t look too bad. Reads a bit like a person that’s never talked to another human being before.
If it’s closed source then it’s a losing battle to try and document code. I mean, do it when you feel it’s 100% necessary (e.g. complex code that you really can’t dumb down, “magic numbers” with a complicated backstory, test cases – it feels like that’s a different part of your brain so the transition is hard). Otherwise write code that almost reads like a sentence and don’t add complexity until you need it.
I’d agree with this recommendation. I believe there were multiple occasions where my router assigned a dynamic IP the same as some other reserved IP. Hard as hell to diagnose. Key indicator was that roughly half the packets were being lost.
Is turning anything into a bomb a good idea?
Actually makes me feel a bit better. Of all the issues this could be the easiest to tackle. Most other issues are completely above your pay grade, unless your boss/PO is adamant about always producing new features and tweaking old code is a waste of time.
Clearly the rest of the world are communists! It’s not us, it’s you! I’m not crying you’re crying! 😭😭😭
ISO 216 paper sizes work like this: https://www.printed.com/blog/paper-size-guide/
It’s so fucking neat and intuitive! How is it not used more???
I have a very similar script. I basically have one branch that’s only manual commits and a “sister branch” that includes all manual commits plus some automatic ones. I determine what is auto-committed based on a simple test script. The test might be as simple as, “Did it build without errors? Commit.”