this post was submitted on 01 Jun 2024
0 points (NaN% liked)
Technology
59672 readers
2965 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- 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, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Couldn’t you use a separator to make it one line of code? That way it’d be even more dangerous
Are you... Are you saying EVERYTHING can be hacked with one line of code?
Ever since those Aliens brought us their ancient and mysterious line separator tech, we have all we need to do just that!
Independence day was indeed a great movie. Who would have thought they also use X86 architecture?
I did an interview where the candidate said that if it's one line, it runs in constant time. And they were completely serious. And this was in the context of Python list comprehensions.
They claimed this ran in constant time:
Whereas this ran in linear time:
We asked clarifying questions, like what happens to the runtime if the list gets really large, and they doubled down.
And this was for a senior Python dev position... No, they didn't get the job.
Runs in constant time doesn’t ring a bell to be honest…do you mean instantly?
No, constant time means it'll take the same amount of time whether you have 10 items or 10,000.
A list comprehension will take roughly the same amount of time as a for loop, it's just syntactic sugar.
Thanks!
Not sure why you needed to downvote my honest question, maybe the candidate dodged a bullet there, he he he.