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?
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.
Another ridiculous policy I’ve seen (many years ago) is logging in too fast. I used to get locked out of my banks website all the time and I used autotype with KeePass so I was baffled when it wouldn’t get accepted. Eventually I had a thought to slow down the typing mechanism and suddenly I didn’t get locked out anymore.
It’s a good read (or listen if you’re into audiobooks) but it’s also easy to find the main points summarized.
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.
If you’re into short stories the Illustrated Man by Ray Bradbury is a good one.
And while I didn’t read much Issac Asimov myself my wife, who loves reading but dislikes sci-fi, read one of his books (Foundation) in a day and said he’s an excellent writer.
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.
Up. North on a map is always up.
I kind of enjoyed being a tutor in college so maybe go back and be a staff-level instructor (lower level courses). If it wasn’t actual work (for pay) probably I’d focus on contributing to open source projects I thought would really help people.
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?
Yeah, I’m starting to ween my son off of video games. Everything that isn’t video games is “boring” for the mere fact it’s not a video game.
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.
This is the kind of AI they’re “celebrating”: https://en.m.wikipedia.org/wiki/AI-assisted_targeting_in_the_Gaza_Strip
Fucking deplorable.