HackerTrans
TopNewTrendsCommentsPastAskShowJobs

cf499

no profile record

comments

cf499
·5 वर्ष पहले·discuss
"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
cf499
·5 वर्ष पहले·discuss
"programmers on six-figure salaries" probably wrote the systems that coordinate and optimise the low-paid tasks you mention.
cf499
·5 वर्ष पहले·discuss
Maybe they're telling you to run.
cf499
·5 वर्ष पहले·discuss
"(...) but there are safeguards against that."

Hah! Nice one :D
cf499
·5 वर्ष पहले·discuss
"It really vindicates everything Snowden has said on the topic."

Did any of his statements really need vindication though? Have we not known about this forever? (e.g. https://en.wikipedia.org/wiki/ECHELON) I suspect the real problem is, and always has been, our perceived inability to change any of it.
cf499
·5 वर्ष पहले·discuss
"Gen Z and Millennials are two of the least religious generations ever in the US, with Gen Z being roughly 50% irreligious."

Thank God!
cf499
·5 वर्ष पहले·discuss
"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
cf499
·5 वर्ष पहले·discuss
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!
cf499
·5 वर्ष पहले·discuss
The only morally sound answer to that question is "anything or nothing" because any other choice implies that you have to justify why one organism is more worthy of life than another. Am I wrong or just not fun at parties? :D
cf499
·5 वर्ष पहले·discuss
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!
cf499
·5 वर्ष पहले·discuss
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.
cf499
·5 वर्ष पहले·discuss
I think the difference is that redundant re-calculation is a code smell in any language, at all times, whereas the float/int division issue requires knowledge of Python 2/3 syntax quirks.
cf499
·5 वर्ष पहले·discuss
> 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.
cf499
·5 वर्ष पहले·discuss
> Isn't "Code you don't understand" the definition of AI/ML?

We don't need to understand the process to evaluate the output in this case. Bad code is bad code no matter who/what wrote it.
cf499
·5 वर्ष पहले·discuss
> The author makes no comment on how hideously bad it is, which makes me suspect he didn’t notice, which… yeah, shows the problems of the whole thing.

The author's comments on that "reverse" function are equally bad - https://youtu.be/9Pw-Roo_duE?t=171

It's described as "efficient" but it calls `len` on an unchanging list in 3 places.
cf499
·5 वर्ष पहले·discuss
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?)
cf499
·5 वर्ष पहले·discuss


  # 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.