Yeah, userstyles are wild. You learn so many ways how to not use CSS. Everything is !important and rather than adjusting the HTML to change the structure, you get to do it all in CSS. 🫠
This is an overstatement, definitely. C is one of the few (mainstream) languages where memory safety vulnerabilities are even possible. So if you batch C and C++ together, they probably cover more than 90% of all the memory unsafe cove written in last 50 years, which is a strong implication that they will contribute to 90% of memory vulnerabilities.
All that said, memory vulnerabilities are about 65% of all high implact vulnerabilities on Chromium project^1 and about 70% of vulnerabilities at Microsoft ^2.
Well, you’re right. I wasn’t getting it, but I’ve also never seen any piece of software that would treat a single leading zero as octal. That’s just a recipe for disaster, and it should use 0o116 to be unambiguous
(I am a software engineer, but was assuming you meant it was hardcoded to parse as octal, not some weird auto-detect)
It’s been a long time, but I’m pretty sure C treats a leading zero as octal in source code. PHP and Node definitely do. Yes, it’s a bad convention. It’s much worse if that’s being done by a runtime function that parses user input, though. I’m pretty sure I’ve seen that somewhere in the past, but no idea where. Doesn’t seem likely to be common.
If the input string, with leading whitespace and possible +/- signs removed, begins with 0x or 0X (a zero, followed by lowercase or uppercase X), radix is assumed to be 16 and the rest of the string is parsed as a hexadecimal number.
If the input string begins with any other value, the radix is 10 (decimal).
You seem to have missed the important phrase “in source code”, as well as the entire second part of my comment discussing that runtime functions that parse user input are different.
I guess this is one of the reasons that some linters now scream if you don’t provide base when parsing numbers. But then again good luck finding it if it happens internally. Still, I feel like a ZIP should be treated as a string even if it looks like a number.
Yep. Much like we don’t treat phone numbers like a number. The rule of thumb is that if you don’t do any arithmetic with it, it is not a “number” but numeric.
Well, we don’t, but every electonic tables software out in the wild on the other hand…
/jYes, I know that you can force it to become text by prepending ’ to the phone, choose an appropriate format for the cells, etc, etc The point is that this often requires meddling after the phone gets displayed as something like 3e10
Who tf decided that a 0 prefix means base 8 in the first place? If a time machine was invented somehow I’m going to cap that man, after the guy that created JavaScript.
Lol imagine having management that give a shit about anything but firing as many workers as possible to make themselves look better. Deloitte can suck my fat fucking balls.
Makes sense. It’s like having your personal undergrad hobby coder. It may get something right here and there but for professional coding it’s still worse than the gold standard (googling Stackoverflow).
Nah, you just need to be really specific in the requirements you give it. And if the scope of work you’re asking for is too large you need to do the high level design and decompose it into multiple parts for chatgpt to implement.
If you were 100% specific you would be effectively writing the code yourself. But you don’t want that, so you’re not 100% specific, so it makes up the difference. The result will include an unspecified percentage of code that does not fit what you wanted.
It’s like code Yahtzee, you keep re-rolling this dice and that dice but never quite manage to get the exact combination you need.
There’s an old saying about computers, they don’t do what you want them to do, they do what you tell them to do. They can’t do what you don’t tell them to do.
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.