HN user

cf499

32 karma
Posts0
Comments17
View on HN
No posts found.

"Maybe if the infrastructure people were involved in development discussion earlier, they'd be able to raise their hands and say: wait a minute, you're going to blow up our logs."

"Maybe if you invited the operations people earlier, they'd have some ownership in the product."

Awww... You like each other but none of you dare to make the first move :D

"He probably has earned the right to be condescending as much as say Linus has."

It's not about rights, it's about desires and personal insecurities. People who derive pleasure from condescension are just telling you that they're vulnerable to manipulation via flattery. It's bad opsec! :P

My point was that there is no list that anyone can make that lets you sidestep the unpleasant fact that you have to kill something to eat (each of your 5 points involve taking the life of something else. Even eating roadkill implies killing bacteria and parasites). On top of that, you'll never know if the thing you killed felt pain so any choice you make is ultimately arbitrary. I'm not saying I feel good about this bleak conclusion but I'd rather be honest about it. My dinner deserves to know that it wasn't an easy choice!

Both sides of this "readability vs. performance" debate can be argued ad absurdum but that's not my intention. All I know is that I try to conserve resources no matter what level of the stack I'm working on and those generated snippets certainly don't!

Sure, it makes sense if you find something like `len_x` or `x_count` significantly less readable than `len(x)` and if you don't have to worry about resources. Can't say I've been there though.

I did a quick test of this `reverse` function (which probably shouldn't exist in the first place) and, unsurprisingly, it became ~30% faster when `len(arr)` was only called once.

That’s actually roughly len(arr) times, not three, since two of the calls are inside the loop.

You're right! I noticed it a few minutes ago and changed the wording accordingly. Thanks for pointing out how shockingly bad that algorithm actually is! :D

(...) the reverse function mutates its argument and returns it.

Yeah, that mutate + return is confusing. It's also worth noting that, as a result of the mutation, the function doesn't work on immutable types like strings and tuples.

Thanks for letting me know that I'm not alone! :D

I handle QR codes by taking a picture and decoding on the command line using zbarimg. If the decoded output is a URL and looks safe I might visit the site. No way I'm letting an insecure device (basically all smartphones) follow random links blindly like that. And no way I'm giving up my data points for free if I can avoid it (remember how market researchers used to pay people to participate in focus group interviews?)

  # secret_key = random.randrange(1, bitcoin_gen.n) # this is how you _would_ do it
I know the article is mainly for learning purposes but someone should point out that the `random` module in python is not meant for cryptography. Please use the built-in `secrets` module or `os.urandom` instead.