HNHacker News
TopNewBestAskShowJobs

_zhqs

10,694 karma · joined October 26, 2008

when in doubt, choose (b). when in doubt, wear black.
submissionscomments
_zhqs··on Why asynchronous Rust doesn't work
> caught a multi-threading bug

The compiler complained: “error[E0308]: mismatched types”

_zhqs··on Why asynchronous Rust doesn't work
> anything where you want to pass functions around.

You should read the article! The author goes into this in fascinating detail.

_zhqs··on How can you not be romantic about programming? (2020)
Maybe it’s a style/taste thing.
_zhqs··on Algorithms for Decision Making
I can also recommend "Algorithms to Live By", by Brian Christian & Tom Griffiths. https://www.amazon.com/Algorithms-Live-Computer-Science-Deci...

Super accessible.

_zhqs··on I overslept because iOS 14 disabled my alarm
Off the cuff, a better user experience altogether might be to prompt attendees afterwards to submit their biggest take-away, instead of a patronizing poke.

That way, not only does it confirm paying attention, but you can also get a signal of course effectiveness.

_zhqs··on Choosing the right data structures
I often come across developers who only think to use data structures that are native to their language (a Sapir-Whorf trap, if you will).

For example, in JavaScript, we essentially have arrays (great for tracking order, O(n) lookup) and objects (great for O(1) lookup, no order), but that doesn't mean you can't: a) implement other data structures such as doubly linked lists, heaps, red black trees, etc. b) combine the strengths of two different data structures in a new object

I think it was Bill Gates who emphasized the importance of picking good data structures up front.

A book I recommend for learning how to implement data structures (and concomitant algorithms) is: Introduction to Algorithms (http://mitpress.mit.edu/books/introduction-algorithms)

It is also useful to have some heuristic for picking data structures, and I have found the recipe proposed by Gayle Laakmann in her book, Cracking the Coding Interview, useful in most non-esoteric cases.

_zhqs··on The tyranny of choice: making decisions becomes hard work
The obligatory TED Talk by Barry Schwartz - http://www.ted.com/talks/barry_schwartz_on_the_paradox_of_ch...
_zhqs··on Ask HN: How to get a U.S. Visa (and work on your own startup)?
Yes. DOMA also prevents the recognition, at federal level (e.g. immigration benefits), of foreign same-sex marriages (e.g. Canada, South Africa, etc.)

A number of countries that do not have same-sex marriage do recognize foreign same-sex marriages for immigration (Israel is one example).