ENTRIES TAGGED "Facebook"

Facebook’s Hack, HHVM, and the Future of PHP

What is Hack and what does it mean for the future of PHP?

Photo: thebusybrain https://www.flickr.com/photos/thebusybrain/3283201861/
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.

Strict Typing

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.
Read more…

Comments: 3 |

Computing Twitter Influence, Part 1: Arriving at a Base Metric

The subtle variables affecting a base metric

This post introduces a series that explores the problem of approximating a Twitter account’s influence. With the ubiquity of social media and its effects on everything from how we shop to how we vote at the polls, it’s critical that we be able to employ reasonably accurate and well-understood measurements for approximating influence from social media signals.

Unlike social networks such as LinkedIn and Facebook in which connections between entities are symmetric and typically correspond to a real world connection, Twitter’s underlying data model is fundamentally predicated upon asymmetric following relationships. Another way of thinking about a following relationship is to consider that it’s little more than a subscription to a feed about some content of interest. In other words, when you follow another Twitter user, you are expressing interest in that other user and are opting-in to whatever content it would like to place in your home timeline. As such, Twitter’s underlying network structure can be interpreted as an interest graph and mined for insights about the relative popularity of one user when compared to another.
Read more…

Comment |

Go Native, Go Big, and Go Deep

Android software development at a crossroads

Apps have to get bigger and more ambitious. A key question for the developer community is how do you create big, integrated, multi-functional, configurable apps for the mobile enterprise? Curiously, Facebook is providing some answers by not using HTML5 and not attempting to make a cross-platform app. Go native, go big, and go deep.

Facebook Home is a harbinger of serious mobile apps

Facebook Home has earned positive reviews—in many cases from reviewers who had tired of Facebook and the intrusiveness of Facebook’s privacy policies and practices. Facebook Home is an example of a new kind of Android software development. It spans a variety of functions as a suite of cooperating software. It uses Android’s intent filters, high-level interprocess communication (IPC), shared databases (ContentProvider components) and remote APIs to bond together a software product that replaces many of the standard parts of Android—as they are meant to be replaced.

Facebook Home isn’t some kind of rogue hack, nor is it a “fork” of AOSP, as Kindle Fire is. Facebook Home is a tour de force of correct Android application architecture. It takes over your phone, interface by interface, always playing by the rules, and it does so for justifiable reasons: for putting Facebook’s functionality everywhere you want to perform communications and social media functions.

Going native

Moreover, Facebook Home simply can’t be done on iPhone. iOS has a specific vision of apps that is separate from system software, while Android’s frameworks are the basis of both applications and system software. Facebook Home was built with this difference in mind: It replaces key elements of the Android system user experience. It is a suite of communicating apps. The word “app” doesn’t sufficiently describe it.

Read more…

Comment |

Commerce Weekly: Will NYC taxis get Square?

Square cab fares, Wal-Mart looks to beat Amazon to the same-day punch, and a major player update in the mobile payments war.

Here are a few stories that caught my attention in the commerce space this week.

Square may be courting cabs

Square not only is gearing up to launch in Starbucks stores in November — it may also be looking to enter the New York City taxi cab market. Ryan Mac reports at Forbes this week that negotiations may be underway:

“Late Monday, private company expert PrivCo said that the San Francisco-based startup and the city of New York will be announcing an official partnership with the city of New York to implement Square’s payment systems across the city’s cabs. If negotiations are completed as expected, said New York City-based PrivCo, the partnership may be announced as early as this month.”

Mac reports that neither Square nor New York City’s Taxi & Limousine Commission (TLC) would confirm that a deal was in place, but he notes Square has been testing iPad credit card swipers with TLC since March.

As to its forthcoming foray into Starbucks, Lisa Baertlein at Reuters reports that further innovations are in the works even ahead of the launch. At launch, customers will be able to pay for a coffee by having a barcode scanned off a smartphone, but plans are already in the works to use Square’s GPS to identify a customer in a Starbucks location, who can then pay by giving his or her name to the cashier. Also, Cliff Burrows, president of Starbucks’ Americas region, told Baertlein that by summer 2013, customers will have the option and ability to tip using the technology.

Read more…

Comment |
Commerce Weekly: Streamlining Facebook’s ads

Commerce Weekly: Streamlining Facebook’s ads

One-click Facebook campaigns, PayPal redesigns, and a Best Buy exec identifies in-store mobile issues.

Payvment launches a one-click Facebook ad service, PayPal revamps its website with consumers and mobile in mind, and a Best Buy exec says in-store mobile use has a scale issue. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)

Comment |
Commerce Weekly: Facebook continues its mobile acquisition spree

Commerce Weekly: Facebook continues its mobile acquisition spree

Facebook buys Karma, strategies to battle showrooming, and grocery shopping gets mobile.

Facebook puts its IPO money to use, seven strategies to help retail businesses survive "showrooming," and grocery shopping sans checkout lines. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)

Comment |
Commerce Weekly: Facebook’s shopping spree continues

Commerce Weekly: Facebook’s shopping spree continues

Facebook buys Tagtile, Calacanis predicts Apple disruption, and three surveys look at the state of mobile money.

Facebook buys into e-commerce, Jason Calacanis opines on Apple's entry into mobile payments, and survey results look good for mobile commerce. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)

Comment |
Commerce Weekly: The do’s and don’ts of geo marketing

Commerce Weekly: The do’s and don’ts of geo marketing

The evolution of geofences, Google Wallet's departures, and mobile carriers vs Facebook.

Placecast's CEO describes layers of context that make for rich, geo-targeted messages. Also, talent flees Google Wallet, and Facebook's IPO may make life harder for mobile carriers. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)

Comment |
Commerce Weekly: The mobile payment system that’s ready now

Commerce Weekly: The mobile payment system that’s ready now

Three things that make direct billing attractive. Plus, the growing pains of social commerce.

Direct billing stretches beyond its gaming roots, social commerce disappoints, and a refresher on how to dial a phone. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)

Comment: 1 |
Commerce Weekly: Facebook finds a mobile commerce partner

Commerce Weekly: Facebook finds a mobile commerce partner

Facebook looks to make mobile pay, Google Wallet's security problems, and shopping on subway walls.

Bango will run Facebook's mCommerce platform, Google Wallet hacked, and PayPal pilots shopping walls. (Commerce Weekly is produced as part of a partnership between O'Reilly and PayPal.)

Comment: 1 |