Posts

Showing posts from February, 2016

Spotlight On...

Image
If someone were to tell me that a smaller film about journalism and the molestation scandal in the Catholic Church would take home the Best Picture Oscar, I would not have believed it.   Yet, there was Tom McCarthy, writer and director of Spotlight (Anonymous Content / First Look Media / Participant Media, 2015), on stage last night at the end of the lengthy telecast thanking the Academy of Motion Picture Arts and Sciences for their generosity in awarding the film Oscar’s ultimate honor.   It was truly a moment. Why was it a moment? Well, in a time when newspaper readership is in the dumper, a film about hardworking journalists succeeded in generating a discussion. In a time when our culture is mired in gossip, infotainment and the cult of celebrity with those celebrities having done nothing to earn that status except star in their own sex tapes and reality television shows, real, deeper truth and character won out. In a time when most people accept what they are fed by the...

Intersections, Both Dangerous and Otherwise

Image
Patricia Hill Collins posits a thesis in her essay, “ It’s All in the Family:   Intersections of Gender, Race, and Nation ” ( Hypatia , Vol. 13, No. 3, Summer, 1998), that the aspects of gender, race, class and nation are not separate social hierarchies, but integrated or intersecting lines that, as she puts it, “mutually construct one another.”   We are all, in other words, profoundly influenced by our life experiences, and most of those influential moments happen within the structure of a family, which is a microcosm of society. She begins her essay by discussing the concept of family values.   For several decades now, and over the course of many election cycles, family values has been the hot button issue of the Republican Party.   In 1992, former Vice-President Dan Quayle used his bully pulpit to attack a fictional television character named Murphy Brown who had become pregnant, gave birth, and decided to raise her child on her own as a single parent.   Qu...

Arrow functions vs. bind()

ES6 arrow functions are often a compelling alternative to Function.prototype.bind() . Extracting methods If an extracted method is to work as a callback, you must specify a fixed this , otherwise it will be invoked as a function (and this will be undefined or the global object). For example: obj.on('anEvent', console.log.bind(console)) An alternative is to use an arrow function: obj.on('anEvent', x => console.log(x)) this via parameters The following code demonstrates a neat trick: For some methods, you don’t need bind() for a callback, because they let you specify the value of this , via an additional parameter. filter() is one such method: const as = new Set([1, 2, 3]); const bs = new Set([3, 2, 4]); const intersection = [...as].filter(bs.has, bs); // [2, 3] However, this code is easier to understand if you use an arrow function: const as = new Set([1, 2, 3]); const bs = new Set([3, 2, 4]); const intersection = [...as].f...

Examples of name clashes in JavaScript’s standard library

The main use case for ES6 symbols is that you can use them as property keys that can’t clash with other property keys. In case you think that name clashes don’t matter, here are three examples of where name clashes caused problems in the evolution of the JavaScript standard library: When the new method Array.prototype.values() was created, it broke existing code where with was used with an Array and shadowed a variable values in an outer scope ( bug report 1 , bug report 2 ). Therefore, a mechanism was introduced to hide properties from with ( Symbol.unscopables ). String.prototype.contains clashed with a method added by MooTools and had to be renamed to String.prototype.includes ( bug report ). The upcoming Array.prototype.contains also clashed with a method added by MooTools and had to be renamed to Array.prototype.includes ( bug report ). In contrast, adding iterability to an object via the property key Symbol.iterator can’t cause problems, because that key doesn’t clash w...

Schools On Trial

Image
Nikhil Goyal is a writer of prodigious talents, all of which are on display in his book, Schools On Trial:  How Freedom and Creativity Can Fix Our Educational Malpractice (Doubleday, 2016). His thesis is clear:   take students and allow them to study what they want to study at their own pace.   No tests, assignments, homework, or grades.   All work is project-based.   If this is done correctly, students become life-long learners and will naturally gravitate to a program of study that is both self-directed and incredibly rich, mainly because they decide for themselves what avenues to pursue.   In Goyal’s view, one recently formed by his time in compulsory education, a traditional classroom with desks in a row, regular structured assignments and grades, lectures and discussions, and programmed courses of study all meld together to stultify students and actually turn them away from learning. What he advocates has been done before, and he makes this clear in h...

Edward S. Curtis: Anthropologist-Photographer of A Vanishing People

Image
Mosa--A Mojave Girl by Edward S. Curtis (1903) He gave everything to his art.   Over the course of his career, he compiled an amazing anthropological and photographic record of Native American cultures and people.   He did so as they, and the wild western United States and Canada they inhabited, disappeared into the dust of history.   I first encountered his work when I researched George Armstrong Custer and Sitting Bull for a recent book review. Princess Angeline by Edward S. Curtis (1899) Edward S. Curtis was born in Wisconsin in 1868 as America was starting its long climb back from the Civil War.   He dropped school at the end of sixth grade and built his first camera so he could apprentice with a number of artists in this emerging field.   His first American Indian photograph was of Princess Angeline, the daughter of Chief Sealth of Seattle.   The Pacific Northwest and Blackfoot country became his backdrop as he crisscrossed the territories photograp...