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


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

Q. Is this really as harmful as you think?

A. Go to your parents house, your grandparents house etc and look at their Windows PC, look at the installed software in the past year, and try to use the device. Run some antivirus scans. There’s no way this implementation doesn’t end in tears — there’s a reason there’s a trillion dollar security industry, and that most problems revolve around malware and endpoints.

you are viewing a single comment's thread
view the rest of the comments
[–] sugar_in_your_tea@sh.itjust.works 0 points 5 months ago (1 children)

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:

new_list = [value for value in my_list]

Whereas this ran in linear time:

new_list = []
for value in my_list:
    new_list.append(value)

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.

[–] suction@lemmy.world 0 points 5 months ago (1 children)

Runs in constant time doesn’t ring a bell to be honest…do you mean instantly?

[–] sugar_in_your_tea@sh.itjust.works 0 points 5 months ago (1 children)

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.

[–] suction@lemmy.world 0 points 5 months ago

Thanks!

Not sure why you needed to downvote my honest question, maybe the candidate dodged a bullet there, he he he.