The graph makes no sense. Did a generative AI make it.
Technology
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related news or articles.
- Be excellent to each other!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
- Check for duplicates before posting, duplicates may be removed
- Accounts 7 days and younger will have their posts automatically removed.
Approved Bots
I think there's a good chance of that:
-2x
instead of~2x
- a human is unlikely to make that mistake- no space here:
==0
- there's a space every other time it's done, including the screenshot - the numbers are wrong - the screenshot has different data than the image
- why are there three bars? A naive approach would have two.
Looks like it. It's a complete fever dream graph. I really don't get how someone can use an image like that. Personally I don't really like AI art anyways, but I could somewhat understand it as a sort of "filler" image to make your article a bit more interesting. But a graph that is supposed to convey actual information? No idea why anyone would AI gen that without checking
yeah I got angry just looking at it
My ad blocker has blocked all pictures on this article, so I can't say. 😄
There are decades of articles on c++ optimizations, that say "use empty() instead of size()", which is same as here.
except for c++ it was just to avoid a single function call, not extra indirection. also on modern compilers size() will get inlined and ultimate instructions generated by the compiler will likely be the same
Isn’t “-2x faster” 2x slower?
That woulb be 0.5x. −2x implies negative duration, which makes no sense. Neither does the layout of anything else in the image.
I think it was supposed to be a ~
, since they use that in a paragraph below the image.
Blame AI
It probably is AI. Either that, or a drunken stupor that produced that graph.
I don't like it very much, my variable could also be None
here
You'd need to explicitly check for None if using the len() construct as well, so this doesn't change the point of the article.
But None
has no len
if not foo:
-> foo could be an empty list or None
, it is ambiguous.
len(foo)
will lead to an exception TypeError
if foo
is None
, I can cleanly catch that.
It suggests I deal with a boolean when that is not the case. Explicit is better than implicit, and if not foo
to check for an empty list may be pythonic, but it's still implicit af
it's still implicit
I don't see it that way. If you're doing if len(foo) == 0
, you're implying that foo
is expected to not be None
, and expecting an exception should not be the default assumption, because exceptions should be... exceptional.
Here's what I assume:
if foo is not None
- empty values are explicitly acceptableif not foo
- the difference between an empty andNone
value isn't importantif len(foo) == 0
- implicit assumption thatfoo
is notNone
(I frequently forget thatlen(...)
raises onNone
)
If an exception was intended by the last bullet point, I prefer an explicit raise:
if foo is None:
raise ValueError("foo may not be None")
I actually use schema validation to enforce this at the edge so the rest of my code can make reasonable assumptions, and I'm explicit about whether each field may or may not be None
.
From that little image, they're happy it takes a tenth of a fucking second to check if a list is empty?
What kind of dorito chip is that code even running on?
I could have tripped, knocked over my keyboard, cried for 13 straight minutes on the floor, picked my keyboard back up, accidentally hit the enter key making a graph and it would have made more sense than this thing.
-2x faster. What does that even mean?
There's probably an "import * from relativity" in there somewhere.