- Elements of Style: Learning Perceptual Shape Style Similarity — code and data for research that helps perceive stylistic similarity between objects that transcends structure and function. For example, we can see a common style such as “Danish modern” in both a table and chair, though they have different structures. Until now, machines have found it difficult to do the same. (That quote cribbed from the phys.org writeup) Our new AI overlords may be cruel and heartless, but they’ll be able to tell Danish Modern from Shaker.
- The Advent of Artisinal Cash (NY Times) — details the rise of local physical currency around the world. Nonetheless, the use of traditional paper money is clearly on the wane. Perhaps these smaller, more attractive artisanal paper notes are merely last bursts of glory before it disappears entirely. Though as Mr. Deller, the artist behind the latest Brixton pound, said, “As long as there are drug deals and criminality, there’ll be a need for cash.”
- Documentation at Scale — 1. Acknowledge that brute force doesn’t work; 2. Make documentation a first class citizen; 3. Make documentation executable; 4. Track the intent.
- Exposure to Ideologically Diverse Information on Facebook (Facebook Research) — Friends shared substantially less cross-cutting news from sources aligned with an opposing ideology. People encountered roughly 15% less cross-cutting content in news feeds due to algorithmic ranking and clicked through to 70% less of this cross-cutting content. Within the domain of political news encountered in social media, selective exposure appears to drive attention.
What is Hack and what does it mean for the future of PHP?
Facebook recently released Hack, a new programming language that looks and acts like PHP. Underneath the hood, however, are a ton of features like static typing, generics, native collections, and many more features for which PHP developers have long been asking. Syntax aside, Hack is not PHP. Hack runs only on Facebook’s HipHop virtual machine (HHVM), a competitor to the traditional PHP Zend Engine.
Why did Facebook build Hack?
Much of Facebook’s internal code is first written with PHP. Facebook can onboard new developers quickly with PHP because the language is notoriously easy to learn and use. Granted, much of Facebook’s PHP code is likely converted to a C derivative before being pushed into production. The point is Facebook depends strongly on the PHP language to attract new talent and increase developer efficiency.
Unfortunately, PHP may not perform as well as possible at Facebook’s scale. PHP is a loosely typed language and type-related errors may not be recognized until runtime. This means Facebook must write more tests early to enforce type checking, or spend more time refactoring runtime errors after launch. To solve this problem, Facebook added strict typing and runtime-enforcement of return types to Hack. Strict typing nullifies the need for a lot of type-related unit tests and encourages developers to catch type-related errors sooner in the development process.
Instantaneous Type Checking
To make the development process and error-catching process even easier, Facebook includes a type-checking server with its HHVM engine. This server runs locally and monitors Hack code as it is written. Developers’ code editors and IDEs can use this type-checking server to immediately report syntax or type-related errors during code development.