Posts

Showing posts from March, 2016

At The Existentialist Cafe

Image
“To philosophize is to learn how to die.” (Cicero) There are books we remember all our lives.   We remember where we first read them, the way they made us feel, the way the world seemed so fresh, so colorful, so new when we finished the last page.   We remember how we never wanted them to end. I had that experience reading Sarah Bakewell’s At The Existentialist Café:  Freedom, Being and Apricot Cocktails (Other Press, 2016).   I knew Bakewell was good— I reviewed her book on Montaigne a few years ago—but this is a masterwork of biography not just of a person, but people, places, a philosophy and a way of life.   In fact, early on, she calls Existentialism more a mood than a philosophy and traces its lineage back to Job and Ecclesiastes in the Bible, up through St. Augustine and Blaise Pascal, to Jean-Paul Sartre, Simone de Beauvoir, Albert Camus , Martin Heidegger, Edmund Husserl, Karl Jaspers, and Maurice Merleau-Ponty.   The last seven names are the ...

Promise-based functions should not throw exceptions

This blog post gives tips for error handling in asynchronous, Promise-based functions. Operational errors vs. programmer errors In programs, there are two kinds of errors: Operational errors happen when a correct program encounters an exceptional situation that requires deviating from the “normal” algorithm. For example, a storage device may run out of memory while the program is writing data to it. This kind of error is expected. Programmer errors happen when code does something wrong. For example, a function may require a parameter to be a string, but receives a number. This kind of error is unexpected. Operational errors: don’t mix rejections and exceptions For operational errors, each function should support exactly one way of signaling errors. For Promise-based functions that means not mixing rejections and exceptions, which is the same as saying that they shouldn’t throw exceptions. Programmer errors: fail quickly For programmer errors, it usually makes sense to fail as quickly...

How To Write A Research Paper

Image
To write a research paper—one that includes peer-reviewed journals, books, and other sources gathered together and analyzed to come to some specific conclusions about the subject studied—one needs a research question.   The question is everything because it kicks off the search for information and evidence, and it will later become the paper’s thesis.   I ask myself, what do I want to know?   What intrigues me?   To write research one has to have an inquiring mind.   It is not a passive act.   Even in the most esoteric subject, the writer must find something of interest, some way into the research.   If it is an exercise to fulfill a requirement, it will read like an exercise to fulfill a requirement.   So, the research question is the equivalent of the Big Bang of a writer’s journey to write something true and meaningful and intelligent.   It is the all-too-crucial starting point. I usually wind up rewriting my research question and thesis ...

The need for multi-platform npm packages

In this blog post, I argue that it should be possible to have multiple implementations of the same npm package (same name, same version). The problem At the moment, when you write an npm package, you can specify on what platforms it works, via the package.json property engines . For example : { "engines" : { "node" : ">=0.10.3 <0.12" } } { "engines" : { "npm" : "~1.0.20" } } That means that you can only have a single implementation per package. However, there are use cases for multiple implementations of the same package: For Node.js you can already use many ES6 features. For browsers, you should stay 100% ES5. There are Node.js-specific polyfills of Browser APIs. For example, node-fetch polyfills the fetch API. The module bundler Rollup needs the ES6 module format to achieve its superior file size savings. But that format doesn’t work anywhere else, yet. An idea for a solution I see two possible solutions: Al...

The Good Death

Image
“There is no good death, I now know,” writes Ann Neumann at the end of The Good Death:  An Exploration of Dying In America (Beacon Press, 2016).   “It always hurts, both the dying and the left behind.”   What comes before this apt and powerful conclusion is a personal and ethical pursuit of the truth on the part of Neumann inspired by the slow decline and death of her father.   Her exploration of the truth about end of life issues is not pretty even as it is also wise and eloquent, a contradiction—a good death with all the sights, smells, and fearful symmetry of how we end.   This is the one constant in human existence:   death comes, no matter how much science and medicine work to stave off the inevitable.   Death comes.   So we ask ourselves:   are we ready for the inevitable? “Grief, I learned, is a journey,” she writes in the midst of witnessing her own father’s end.   “The work of mourning is easier to explain than the emotion of ...