1,063 karma · joined March 20, 2014
That's what they're doing: https://www.theverge.com/2018/11/13/18089300/supersonic-jet-...
Specie A (with this disease) stop cannibalizing after seeing the outcome, better chance of survival.
Specie B (without this disease) eat themselves to the last person... Lower chance of survival as a specie.
Nature "cares" by generating lots of options, then let the fittest to survive. So while nature doesn't intend or plan for a specie to survive, the outcome is no different from if it did. I believe the OP means "care" in this sense.
for (int i = this.bindings.Count - 1; i >= 0; i = Math.Min(this.bindings.Count - 1, i - 1))
Why isn't the last expression a normal i--?Nitpicking here, but the view (rendering) process in Electron can actually use the Node API [1]. The difference in API access privilege between the two types of process is in what Electron API (not Node API) they can use. For example, main process can use native GUI API but renderers can't and must IPC to main if they need to, say, show a system dialog.
[1] https://github.com/electron/electron/blob/master/docs/glossa...
[1] https://www.amazon.com/TED-Talks-Official-Public-Speaking/dp...
* Peopleware
* The Mythical Man-Month
I can't think of better books on managing software projects and software developers.
* Zero to One: Notes on Startups, or How to Build the Future. If you can read only one book on startup this year, read this book.
* Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future.
* Running Lean: Iterate from Plan A to a Plan That Works.
* Alibaba's World: How a Remarkable Chinese Company is Changing the Face of Global Business.
* Start-up Nation: The Story of Israel's Economic Miracle.
* Disrupted: My Misadventure in the Start-Up Bubble. You will like or hate this book a lot, but it's surely an interesting read and perspective.
* Learned Optimism: How to Change Your Mind and Your Life. Good book that gives you a framework to become more optimistic.
* Sapiens: A Brief History of Humankind.
* The Three-Body Problem Trilogy. Great, great sci-fi.
* Understanding ECMAScript 6. Best ES6 reference book.
* Node.js Design Patterns. Best Node book for intermediate/advanced developers.
* CSS Secrets: Better Solutions to Everyday Web Design Problems. Great, great book on advanced CSS tips & tricks.
* Mastering Selenium WebDriver. This is probably the only good book on Selenium among so many bad books on this topic.
* Grokking Algorithms: An illustrated guide for programmers and other curious people. This is a good book but might be too basic for many people. Recommended for those who wants to quickly refresh their algorithms knowledge.
[1]: https://chrome.google.com/webstore/detail/octotree/bkhaagjah...
Can you elaborate what you meant by that?
handleComment(comment) {
if (comment === '') this.dispatch('comment-error', 'empty')
else svc.send(comment)
.then(() => this.dispatch('comment-success')
.catch(err => this.dispatch('comment-error', err))
}
The view/controller (or whatever it's called in React) will then listen to the events and set its state accordingly so that the UI can be re-rendered.It does look quite complicated compared with typical error handling code. Not sure if I misunderstood something or whether this additional layer of message dispatching is worthwhile in most apps.
Basically, how would you migrate the following code to Flux:
click() { doAction().catch(err => showModal(err)) }Does this mean the 2 Redis slaves, 2 SQL replicates etc. are in a secondary data center?